No worries man, so many people have helped me out along the way. Still have so much to learn, so if I can help out a little I will.
Also, for future reference if you want to handle groups in inspector it is in the same window as signals, at the top there are two choices signals and groups, just click the groups.
Ah yeah I see it now!
I got the group “player” working now in the killzone script.
The body._on_killzone_player_died() throws an error, I’m not sure what this is for yet so I commented it out and so far so good. just gotta figure out calling this death animation, not sure how to access it properly from the killzone script if we’re not using a signal over to the player script. I think need a alive check some how so it cancels out the movements because they are obviously triggering too when I hitting the enemy killzone. Feel like I’m getting closer.
So, the alive check you can do in players code, at the top of the phyisics func.
func _physics_process(delta):
if not alive:
return
#after comes the rest of your code
So, also don’t worry about initiating death animation from killzone, the animation is in your proto node right? That node is a child of player. So, in your player script _on_killzone_player_died(): call your animation from proto.
Ah ok, starting to see the light a little more haha.
Do I need to declare a variable for alive first then add the if not alive: ?
Gonna try all this out now.
Man I’m so sorry this turned out to be pretty complicated and you are so kind to spend this much time. I’m gonna keep digging away and try to fix this error.
You are trying to imbed the func into your physics_process, which makes it think it is a lambdas, however, there is no way to access this lambdas so it is throwing the error.
Just delete the indent before your func() and it will be fixed.
Yeah! I just googled it and found out! It works. I can’t thank you enough, seriously. That was a masterclass in gdscript. I’m humbled by your generosity!