Transport the character to a random scene

  • #1, by TymorSaturday, 29. October 2016, 20:02 4 years ago
    In my game I want to have a puzzle where the player has to use a magic door. If the puzzle is not solved correctly and the player uses the door the player is transported to one of the four surrounding rooms. It would be neat if the room was chosen randomly, but I don´t know if there is any easy way to accomplish this? 

    Newbie

    26 Posts


  • #2, by afrlmeSaturday, 29. October 2016, 20:26 4 years ago
    you could do it with action parts easy enough.

    1. create a value & rename it appropriately. This value will be used to determine which scene to teleport to.

    2. create a called by other action & rename it to something like "random_scene_teleport"

    3. inside of the called by other action you created add some action parts like so...
    https://i.gyazo.com/b193be9011b6d3ae2589f79d6216bccc.png

    Just call the called by other action you created when you want to teleport the character to a random scene.

    P.S: you could technically sort it out with Lua script too, but you would have to specify the characters scene, their position in the scene & the direction they should be facing. So, using action parts is probably the safer bet.

    Imperator

    6842 Posts

Write post