I've been trying to start a battle (turn based) from an event but I haven't been able to get it to work at all.

I made an event with a Battle Start step and here's the first problem: how do I configure it exactly?

I also have an object in the scene with an Event Interaction set to trigger enter and with the previously made event set.
Now I tried a number of things:
- tried to make a separate gameobject with the battle, assigning it in the event's prefab field and setting up the event's battle step to use that prefab. Didn't work
- Tried to add a battle as a component to the event object, nothing happens and I'm not even sure what kind of start type I'm supposed to set.

So what's the way to do this exactly?
  • Is the object a combatant? Or a random object? It differs depending on what you are using? As soon as I am on my computer I will give you the steps. If it isn't already answered.
  • I'm interested in starting up a predefined battle from an object I interact with, for example a button that when activated it triggers an encounter
  • Instead of making the battle a prefab, make the battle an actor instead and find the battle by name, let me know if this helps you. I will try to add a video later if possible
  • edited February 2016
    The Start Battle step needs either a Battle component or a Combatant attached to the used game object.

    It's probably easiest to set up your battle with the Battle component, using the None start type to disable starting it any other way. Either add the Battle component to the event's game object (where the Event Interaction is attached), or add it to a different game object and use that as an actor in the event (you can select game objects for actors in the event interaction's inspector if they are of type Object without using Event Object or Find Object).

    Also make sure your battle is set up correctly, e.g. using an enemy faction - you can't fight an allied faction.
    Post edited by gamingislove on
    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!
  • edited February 2016
    Instead of making the battle a prefab, make the battle an actor instead and find the battle by name, let me know if this helps you. I will try to add a video later if possible
    This does work, I hoped there would be a way that felt less "hacky", thanks at least now I got it to work!
    Either add the Battle component to the event's game object (where the Event Interaction is attached)
    Just tried this too, that's exactly what I was missing! I wasn't sure what to actually set in the event to start it off the added component.

    In the end though the separate object way seems to be better since I need to have some specific coordinates and I can't do that easily with the component
    Post edited by MaddoScientisto on
  • edited February 2016
    Like I said, when using a separate object, you can also select it in the inspector - add an actor and change:
    - set Type to Object
    - disable Event Object
    - disable Find Object

    Now you can select a game object in the scene as an actor in the Event Interaction that uses the event. No need to use find object for using a defined game object :)
    Post edited by gamingislove on
    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!
  • And there we go! That was the missing link.
    Thank you, now I feel like I'm "doing it properly"!
  • - disable Find Object
    I never tried that. Learned something new
Sign In or Register to comment.