so far i made a stomp attack just having trouble respawning the player with the attack because i need a way to check if the player is in the zone and activates the respawn when they are in the zone not when they enter or leave the zone
If they enter a zone, they are in. Turn everything on when they enter. When the leave, they are out. Turn everything off when the leave
You can use some sort of player-scoped boolean property, so that when the player enters the zone, it turns on, and when they leave the zone, it turns off. Then, when doing the attack, check if the property is true, and if so, you can respawn them or whatever you want to do with them.
Alternatively (thx rithek) you can have a trigger that is player-scoped, activated when the player enters the zone, deactivated when they leave the zone, and that can respawn the player.
(This one is way faster)
i need the player not have to reach the edges of the zone in order to be killed by the attack basically
thats sounds smart and might be the solution tho whats a boolean property?
A true/false variable
oh ok im gonna try and make this real quick see if it works ( but first i gotta switch classes)
You could probably use a counter to tell whether or not someone is in the zone.
your solution kinda worked but now the zone or trigger is not activating for some reason
Making this a bit more efficient, activate a trigger that can respawn the player. The trigger is player scoped, and it deactivates when the player exits. Make it inactive on game start.
This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.