Hey, I'm working on a 2d top down rpg where players wander around the world, and battle in a separate scene where the layout is similar to older Final Fantasy games.
Example here.
For random encounters the default battle spots appear to work well, but for boss fights I would like to explicitly place them at a specific position. Ideally I could just create a custom battle scene with its own start event and pre-place all the combatants. When I try to do that though, the enemy still gets spawned, even though it's already there.
Alternatively I updated the Battle component settings to use "Own Spots", with an empty game object specified for each player and enemy at the corresponding position, but they do not appear to get used. I feel like I'm using this feature incorrectly? Not sure what type of game object these spots are expecting. I think what I'm trying to do is similar to
this post but I don't think I quite understand the solution described, specifically:
1) Make them child objects of your battle's game object - they should be transported over to the new scene as well.
Again though, I'd prefer if I could just drop the enemy in to the battle manually in this case and not have it spawn another.
I invoke the Start Battle node with the enemy combatant I want to fight, which points to a Battle object in the same "field" scene that uses a custom Start Battle Event that loads a custom battle scene. Here are some screenshots for context:
Where each "spot" is an empty game object just indicating the position (I get the feeling that is incorrect).
I've tried playing around with a few settings here and there but can't get it to work. Appreciate your help. Thanks.
When the battle loads a new scene, only the Battle component's game object and it's child objects will be transfered over (and placed at the defined spawn point).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
It still seems a bit confusing to specify the spots under the Battle object in the Field scene, when the positions correspond to the Battle scene, but can definitely work with that. I suppose there isn't a way to just manually add the combatant to the Battle scene without it being spawned again (as a duplicate) when the battle starts?
The 1st way (Battle in the scene, combatant spawners or using Random Battle Areas) is the usual go-to method, but the 2nd one could be a good option for loading into special battles, e.g. boss encounters that should be set up a certain way in the new scene (but you'll have to use different battle start/end events if there's a different setup, e.g. no scene loading needed).
The Auto Join Settings in Battle System > Battle Settings allow you to set up combatants joining an ongoing battle, i.e. a placed combatant in the battle scene could join in like that - but for getting into the scene, you already need at least 1 enemy in the battle set up or the battle can't start. For this scenario, loading the boss battle via a regular event and having the battle set up in the scene as you need it might be the better option.
Generally, the battle's game object is kept alive and placed at the spawn point, i.e. the child objects you're using as battle spots would stay at the same position relative to the battle game object.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I'll give the approach you mentioned a try. It's at least helpful to understand what options are worth pursuing.
Thanks again for your help.
This behaviour seems consistent with a similar issue I noticed in another project where the autostart event wasn't triggering. In that case I ended up justing placing a trigger over the player spawn position, but that's not really an option this time.
Any idea why this might be happening? I've tried adding a delay (eg. start after 0.5s) but still behaves unpredictably. I just updated to the latest version 2.30.2 available in the asset store, but I noticed my ORK Project is still 2.30.2. Not sure if there is anything else I'm supposed to do when upgrading. Thanks.
E.g. coming from the other scene, it could be due to the controls being blocked, enabling In Blocked Control would prevent that.
The latest version is ORK 2.31.0, but there's a know issue/bug in the package manager that doesn't download the new version. Only clearing the package manager's cache would fix that.
Unity just posted today that they finally rolled out a fix for this with 2020.3.0 and 2019.4.23.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
And I will look into that update. Thanks.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I have an event with some dialog, and at the end it changes a quest task status, stores the scene, and then loads the boss battle scene. The boss battle scene has its own battle object with its own battle start event (plays a sound and spawns combatants) however often I'm seeing the battle start event doesn't even get invoked (my debug message at the beginning of the event doesn't get logged).
My battle uses the Autostart type with "In Blocked Control" checked and whether I specify "Start After" to 0.1s or 1s I see similar behaviour.
Is there anything that sounds off to you? Let me know if there's anything else I can provide that'd be helpful. Thanks
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I gave up on autostart since (from my experience with multiple ORK projects) it doesn't work reliably when a new scene is loaded. Instead I have the battle to start on "Trigger Stay" and that appears to be working. The problem now is that the "own" player battle spots are being ignored.
To recap my setup...
- I have a game event that shows some dialog, unblocks player control, then stores the current scene and loads the battle scene (spawning players at spawn point 0)
- as mentioned above, in the battle scene the battle starts by the player triggering the collider attached to the battle component
- the battle start event plays a sound and spawns the battle combatants
- the battle components has its "own spots" set pointing to empty game objects for the player and enemies. the enemy is spawning in the correct location, but the players are not. i imagine this might be because they are already present in the scene, and they aren't getting moved/spawned in the "own spots" locations?
ultimately i just want my players to have a dialog with a boss character, fight the boss in a separate scene, then continue the dialog with the boss in the original scene after the fight.
any help you could provide would be super appreciated. ty!
The Place At Spots node is used to place already existing combatants at their battle spots in your battle start event.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!