Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Random Encounter's for RPG games

Lately i've been interested and passionate with unity game engine and wanted to make my own rpg games, and i found brackey's video's are easy to engage and easy to understand, now i wanted to implemented a random encounters event but idk how to make one because i am not good at programming

Comments

  • jtok4jjtok4j Member

    Greetings,

    You'll need something to trigger the random encounter, such as a gameobject with the mesh disabled, (such as a sphere) and the "is trigger" option enabled on that game object. It will also need a collider attached to it.

    Then you can write your random encounter script to start the encounter upon detecting a trigger collision with the Player.

    (Use OnTriggerEnter, found here with some examples.)

    https://docs.unity3d.com/ScriptReference/Collider.OnTriggerEnter.html

    Questions? Just send 'em along!

     Keep on Creating! 


    Justin of JustinTime Studios (http://unity3d.expert) 

Sign In or Register to comment.