I’m trying to make a script that damages a player when they press crouch but only if their health is above 150 and I can’t figure it out. I must be missing something. How would this be done?
I would do 2 conditions to check the status of each thing if true, then do the action if it is true.
conditions
{
Health(Event Player) > 150;
Is Button Held(Event Player, Crouch) == True;
}
actions
{
Damage(Event Player, Null, 10);
}
Oh, I would probably make it on Ongoing - Each Player rule.
Thank you! I’m understanding conditions a bit more now. I thought we were just limited to booleans and didn’t know we could use numbers.
You’re welcome. Yeah might not be too intuitive at first either if one is unfamiliar with some coding. I always forget that in distance between for example, we can use the number after the symbol which is in meters. Like distance between (event player) (all players) > 5, or something like that. Good luck
Just as clarification: Puting arrays (the all players array in this case) into the “distance between” action will only use the first element of the array and ignore all the others.