Hey GiL,

1) I'd like to randomise the dungeon scene that loads, then make that inaccessible for the rest of that specific run-through.
I could use a chance node for each scene in the scene change schematic, but that won't remove it from being listed in the available list for the next change.

1b) How do I increment a level zone. Example I have 5 forest scenes. I would like to randomise their order as per 1) but I want each subsequent area to be 2 levels higher - as such I cannot hard-code the zone. I see there are options for both Formula and Variable key to be used, but how would I keep track of that variable? Does it need to go in a global machine? In Godot i would likely track area level in a global scene(script) and increment that each scene change, then reset it to default value upon Death or Escape.

2) How do I implement using a schematic for scene change in an openworld area instead of using a Scene Changer? Can I use a Trigger Machine component on a box collider?

  • 1) You'll need to set global variables to keep track of that, e.g. a global bool variable using the name of the scene as variable key. You can use an Auto Machine in the scene to automatically set the variable when the scene was loaded.

    Scene loads will need to check those variables, if they're set, don't load the scene and use a different one instead. The setup depends on how you handle your scene loads (e.g. schematic or scene changers).

    1b) Use a global int variable to keep track of those levels. The level zone can e.g. use a formula, passing on the default level as start value of the formula. The formula simply adds that global int variable to the value and you'll have your updated level.
    Naturally, you'll have to change that global int variable accordingly, e.g. at the end of a level before loading the next one.

    2) Yes, scene changers are basically just a component used for convenience. You can do all of that via schematics and machines as well - e.g. a Trigger Machine starting on trigger enter.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I'll work on those, but i've realised first I'm having an issue starting 2 battles in a row.
    It appears my "Battle Start" schematic isn't being run on the 2nd floor. I've tried setting it as a "own start schematic" and changed the battle from autostart to "when scene is loaded", but it's still the same.

    In the below video, you can see the scene loaded from unity successfully, and then from the previous floor. Below that is my scene change schematic.
    video

    image
  • I've fixed this by added a small delay to the autostart of the new scene. Found this in one of your responses on an old post.
  • Delays can often do wonders, especially in things that can be an issue based on timing. E.g. setting a variable or some other thing that's used in a condition at the same time as it's checked by something (like on scene load or spawn of a game object).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • 1b) Use a global int variable to keep track of those levels. The level zone can e.g. use a formula, passing on the default level as start value of the formula. The formula simply adds that global int variable to the value and you'll have your updated level.
    Naturally, you'll have to change that global int variable accordingly, e.g. at the end of a level before loading the next one.
    How do I do this? I've created a formula called LevelZone that I use in each of the Level Zone components. The formula is:
    image

    It works for the first scene change, everything changes from level 1 to 2, but form then on, they stay at level 2. I can't find a node in the schematics to add a value to a variable.
  • Yeah ... no, not like that.
    The first Value node is all you need, i.e. add the level zone variable to the formula.

    You need to increase the variable itself.
    E.g. in the schematic you use to load the scenes, before scene load increase the variable by 1 (or whatever you want to jump up) or set it to the value you want to use.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • How do i access it in a schematic though?

    Ah I see, there is the Change Variable node that i can use in a schematic. I spent ages looking through the Value>Variable node list last night and nothing usable jumped out at me.
  • I'd recommend to use the search field when adding nodes - that'll speed up your workflow :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Having a weird issue with camera control at the moment.
    I've moved my camera as a child of the battle (because i move the battle during Awake() so that i can randomly spawn the player, and the camera needs to move with it so that I can maintain a constant distance from the battle)

    In the video below you can see the scene loads fine if I run that scene. However if I change TO that scene, something goes awry. It start off fine, but once the battle starts you can see it snap away and change position.
    video

    image
  • I've ended up undoing the Parent/Child thing and giving the camera a random spawn as well, it makes the camera animations change enough that any weird looking ones only happen once in a while.
  • Unblocking control will have the camera control kick back in and handle placement of the camera. I guess it either targets the wrong thing or gets mixed up somehow.

    Generally (especially when using the built-in controls) I'd recommend to not have the camera be a child object of something and handle placement via nodes in schematics and the camera control.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.