I am using a real-time battle arena (a battle object generated by the ORK Scene Wizard). I am spawning the player by Game Event node Join Active Group and I spawn the enemy combatant on the real-time battle arena object itself by defining the enemy combatant. It all works well.
Now, when the player dies, I am showing a popup allowing him to revive. It does revive the player (and fills up the consumable status values such as HP and MP), but he doesn't join the battle.
I tried some autojoin settings as well as battle join node from the revive event, but I haven't succeeded. Any ideas?
Where are you doing the popup - I assume in the combatant's death battle event? If that's the case you also need to use an Cancel Battle End node to stop the battle from ending, but that'll also only work if you're not using End Immediately in the real time battle settings (Battle System > Real Time Battles).
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!
@gamingislove I thought your answer would solve my problem and only got to try it now only to realize 2 things:
1. I am doing the popup at the Battle System > Real-Time Battles > Default Start/End Events > Defeat Event and I can't seem to find what you are assuming: 'combatant's death battle event' 2. I wasn't able to find End Immediately node in the Battle End Event.
As for the point #2 there is an End Battle which I have set to None and I assume that's what you meant, so I guess this is out of the way.
Now I managed to revive the player and have 3 problems: 1. Player is turned away from the enemy. Look At Enemies node is not available in the regular Game Event. How can I turn him towards the enemy? 2. Popup is still there, what is the best way to destroy it? 3. Battle remained, both combatants are alive and both have In Battle set to true, yet nothing is happening. Monster is not autoattacking player combatant.
1) It's already too late to do that in the battle end events - at this point the battle is already over. The combatant's death battle event is defined in Battle System > Battle Settings > Combatant Settings > Battle Animations, where you can select battle events for the Death Animation. Each combatant can also override these default battle events with custom ones.
2) End Immediately is a setting in the used battle system type's setup - i.e. for real time in Battle System > Real Time Battles. If this is enabled, the battle will end immediatley upon death and you have no chance on canceling the battle's end in the death event of a combatant. So you should make sure it's disabled.
As for your new issues:
1) If you revive in the combatant's death battle event, it's available.
2) As said, handle it in the combatant's death event - in the battle end event it's already too late for that (the popup is probably the battle end dialogue).
3) Because the battle is already over :)
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!
@gamingislove thank you for your answer, it helped me to move forward and solve big portion of my issues.
However, some still remain.
Now, showing up the "Player defeated" prefab (screen/popup) is now happening as part of the Death Animation Battle Event as you suggested. It's GUIBox with custom Skin.
The revival of the player is happening on the button (withing the Player defeated popup) press using the Event Interaction component added to the Player Defeated Popup > Start Type > UI
This only allows me to run the regular Game Event which doesn't let me add "Look at opponent" node, nor can I easily remove the popup as I carry no reference to it.
Is there a neater way to handle button clicks, trigger battle events on button clicks and carry a reference to an opened GUIBox?
Adding event interaction on the popup prefab itself and checking Deactivate After Event checkbox did the trick. I still wonder, however, how else could I carry a reference to the popup object as well as a reference to the battle over to the event.
This piece of information is quite crucial for me. Could you help?
EDIT: Even though Deactivate After Event checkbox helped, it disabled player character from being able to perform anything. The player combatant is blocked by the popup on the background. So in reality, it hid the popup, yet it's still there on the background, it's just hidden.
Using ORK's choice dialogue is not an option? That'd also prevent the player's death event from continuing and ending the battle ...
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!
You can use ORK's choice dialogue for something like that - enabling Use Custom Skin in the settings of the individual choices allows you to set different skins.
Since you're using a custom dialogue, the player's death event will most likely have already finished, i.e. the battle is over - using ORK's choice dialogue will pause the event until the dialogue was closed, i.e. battle can continue afterwards (based on the selected choice).
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!
@gamingislove am I using custom dialogue? I am using ORK dialogue (GUIBox with a custom Skin triggered by the death animation event).
How can I use choice dialogue? I am in the GUIBox settings, where I can see choice settings, but couldn't find a way to define individual choices, nor skin for them. I am probably missing something. Tried searching in tutorials, but didn't find anything relevant.
Thanks in advance for pointing me in the right direction.
Now I have most of the things working smoothly, except that Regenerate node, with the Revive checked, doesn't revive player combatant, it only regenerates his HP.
Is dead is still true.
I tried all kind of variations of nodes using Revive, Regenerate etc.
If that's the case you also need to use an Cancel Battle End node to stop the battle from ending, but that'll also only work if you're not using End Immediately in the real time battle settings (Battle System > Real Time Battles).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
1. I am doing the popup at the Battle System > Real-Time Battles > Default Start/End Events > Defeat Event and I can't seem to find what you are assuming: 'combatant's death battle event'
2. I wasn't able to find End Immediately node in the Battle End Event.
Therefore I am back to square one. Any ideas?
Now I managed to revive the player and have 3 problems:
1. Player is turned away from the enemy. Look At Enemies node is not available in the regular Game Event. How can I turn him towards the enemy?
2. Popup is still there, what is the best way to destroy it?
3. Battle remained, both combatants are alive and both have In Battle set to true, yet nothing is happening. Monster is not autoattacking player combatant.
Any suggestions?
Each combatant can also override these default battle events with custom ones.
2) End Immediately is a setting in the used battle system type's setup - i.e. for real time in Battle System > Real Time Battles. If this is enabled, the battle will end immediatley upon death and you have no chance on canceling the battle's end in the death event of a combatant. So you should make sure it's disabled.
As for your new issues:
1) If you revive in the combatant's death battle event, it's available.
2) As said, handle it in the combatant's death event - in the battle end event it's already too late for that (the popup is probably the battle end dialogue).
3) Because the battle is already over :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
However, some still remain.
Now, showing up the "Player defeated" prefab (screen/popup) is now happening as part of the Death Animation Battle Event as you suggested. It's GUIBox with custom Skin.
The revival of the player is happening on the button (withing the Player defeated popup) press using the Event Interaction component added to the Player Defeated Popup > Start Type > UI
This only allows me to run the regular Game Event which doesn't let me add "Look at opponent" node, nor can I easily remove the popup as I carry no reference to it.
Is there a neater way to handle button clicks, trigger battle events on button clicks and carry a reference to an opened GUIBox?
This piece of information is quite crucial for me. Could you help?
EDIT:
Even though Deactivate After Event checkbox helped, it disabled player character from being able to perform anything. The player combatant is blocked by the popup on the background. So in reality, it hid the popup, yet it's still there on the background, it's just hidden.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I still can't find a reason as to why the player combatant, while alive and with full HP, can't be cast spells nor attack. I can move him though.
Since you're using a custom dialogue, the player's death event will most likely have already finished, i.e. the battle is over - using ORK's choice dialogue will pause the event until the dialogue was closed, i.e. battle can continue afterwards (based on the selected choice).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I'll try to experiment with the dialogues.
@gamingislove am I using custom dialogue? I am using ORK dialogue (GUIBox with a custom Skin triggered by the death animation event).
How can I use choice dialogue? I am in the GUIBox settings, where I can see choice settings, but couldn't find a way to define individual choices, nor skin for them. I am probably missing something. Tried searching in tutorials, but didn't find anything relevant.
Thanks in advance for pointing me in the right direction.
Found it in the event node settings.
Is dead is still true.
I tried all kind of variations of nodes using Revive, Regenerate etc.