hello again!

I have a question in relation to the positioning of player/enemy spots around battle spots in randomly spawned battle areas.

Currently I have my player set to spawn at (3,0,3) and the enemy set to spawn at (-3, 0, -3). This works fine, however the battle will always take place facing a certain direction; south west basically. I can see that I can add a random offset to this, however it doesn't change the fact that the battle will always take place facing the same general orientation.

What I would prefer is that the battles can occur at a random orientation around the battle spot. e.g. a fixed distance but random bearing. Is this possible? I can see a setRotation parameter but presumably this is about rotating the spot around its own pivot point rather than around the battle spot itself? Can I do some sort of setRotation for the actual battle spot upon its spawn?

Thanks once again :)
  • No, that's currently not possible. However, you can access the game objects for the battle spots in events as waypoints (e.g. in the battle start event) and change them there.
    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!
  • GiL, thanks once again. I think I understand how I can use your suggestion to get the effect I am looking for. I'll have a go this evening.
  • I thought I was ok with this, but evidently not.

    I'm trying to use the 'change game variables' event action during a battle start event, referencing the enemy spot waypoint. I'm stuck on what variable key to be changing though. I've selected game variable and typed 'spot' as the value, as looking at the api that seems to be where the vector3 of the battleSpot objects are stored.

    It doesn't seem to work though; the waypoint doesn't change from my default defined position, and when I inspect the variable it hasn't changed. Should I be defining something else as the key?

    Additionally, I tried doing this through a script, setting the BattleSpots.enemySpot[0].spot manually to some other vector. It kinda works, but only for battles started after the script is called. Is there a way that I can call this prior to the combatants being spawned and placed at spots?
  • Game variables have nothing to do with that. Where did you read that this would work or that a 'spot' variable would give access to the battle spots?

    You can access the battle spots in the battle start event by using the Waypoint object and selecting the battle spots you want. E.g. in a Change Rotation node using the Random value type.
    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.