Hi,

I have been looking at the actions in the event system but cannot find what I'm looking for.

I am basically trying to start a fight from a cut scene. I have 3 people talking and at the end of the talking a battle starts with one of them.

What would be the best way of doing this?

Thanks
  • edited September 2015
    There's the Start Battle step for that :)
    The object used for it must either have a correctly set up Battle component attached (probably best with start type None to prevent it starting in any other way) or be a combatant of an enemy 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!
  • I dont suppose there is a tutorial for this is there?

    I am trying to run everything from the same event.

    I have my dialogue then set it to start battle, didn't fully understand what you meant after that :)

    Thanks
  • I am using the combatant "Forest Goblin"

    I have dropped him into the scene and added the Battle Component (script). left all the default settings but set the start to NONE.

    In the event I have, the event settings I have created a prefab and set the Forest Goblin as the prefab.

    After the dialogue step I have added the Start Battle, with the following settings;

    Enabled - Yes
    Override Node Name - Disabled
    Object: prefab
    Prefab: Prefab 0
    Spawned Prefab ID - 1

    When testing it does the conversation etc but at the end it doesn't go to the battle. Anyone know whats up...probably something simple lol
  • Just adding the goblin's prefab to the scene is not making it a combatant (unless you're using a combatant spawner to do that). You'll need to set up the Battle component correctly, i.e. set up a combatant or group to fight there with a correct faction (being an enemy of the player).

    Also, using a Prefab object in the Start Battle step is only used if the prefab was spawned by the event. If it's a game object in the scene (i.e. you've added the prefab in the editor to your scene), you'll need to add it as an actor and use the actor in the step.
    You can use scene objects that are already present in the scene as actors by either using the search function in the actor's settings, or add it to the event interaction for that actor.
    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!
  • Great thanks!

    I think I have managed to get it working! I just need to figure out how to get it to fight in another scene - as I have managed this with my random encounters.. think it may just be adjusting the scene ID?

  • edited September 2015
    That's up to your battle's setup - if your default battle start/end events are for fighting in a different scene, you should already be good to go. Otherwise, you can set up those battle start/end events in the Battle component.

    The Scene ID is used to keep track of battles, i.e. it identifies if a battle has already been finished or not. When returning to the scene, a battle using a scene ID that was already finished wont happen again.
    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!
  • Hey

    I have just managed to find time to look back into this, work has been a nightmare!!!

    I have got it all working, the character goes to another scene and fights, however...

    When the battle scene spawns there is another enemy there (even though ts set up to just have 1) this enemy doesn't move or do anything. There is also a second player battle box, but again this does nothing.

    I am assuming I have duplicate the spawning but not sure where...

    Thanks!!
  • Might be your start event (or wherever you add the player) is executed twice - make sure you only either use the Start Event setting in the main menu or have one in the scene (using an Event Interaction component).
    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.