#how to make a trigger volume that when entering unless you move you take damage
1 messages · Page 1 of 1 (latest)
hm?
It makes no not much sense
basically
a trigger volume that when standing still inside it you take damage
but if you are moving while in it you dont take any damage
Get velocity
Trigger volume (List<player>) > (local player) list contains > AND chip
Get Local Player > Get velocity > Vector3 get magnitude > (1) less than > Same and chip AND chip as above
Wire the AND chip into a IF chip
Execute the IF chip and use the THEN output to do damage
Vector get magnitude greater than X (however sensitive)
??
There the circuited needed
Test if the list of players contains local player and their velocity is greater than 1
The arrows are the direction in which you wire them
I dont understand what you mean by list
The trigger volume has a List player output it’s Yellow and looks like this []
On the right side of the trigger volume object board there is a list of objects and players inside of it
well what do I put in it
It’s an output
So… nothing. It automatically fills out depending on if there is a player inside or not
I just typed out the steps
Wore it into a List Contains
and the list contains goes into?
LOOK AT THE STEPS
⬆️
Alright my bad
List contains, local player
Just follow the arrows >
Player
what goes into it
Local player and vector get magnitude
Local player for velocity not player entered
and click on the thing that says invalid it’ll change it to local
Place down Local Player and use that
Or it might be called get local player idr
Now do vector get magnitude
And put the velocity into it
And then wire the float into Greater Than comparing to 1
And wire that bool to the And
and the and to?
An if
Then you can run your damage system, but before running it, run it through the IF
Make one
how do I do that again
There’s many youtube tutorials you can find
I already have a game chip
It’s a length process especially if your newer to Cv2
That’s a little less of a process, but still a decent amount of Cv2
Let’s be honest nones gonna go step by step on how to make a health system when you can recommend a 15 minute video
Yeah but it’s funny that you recommend a YouTube video
I always have for soemthing like a health system
Damage system honestly very simple and easy if you don’t want to involve guns or weapons and purely just damage
Did you set it up? Like all the settings you want on it?
can you say then
Do you plan on using guns or weapons?
Well yeah… tbh i just kinda assumed it was gonna involve guns too
It might it might not
Do you know how to use int variables
So yes or no?
no
no
Ok, place one down
Configure it and rename it to Health or something you’ll remember
k
Then how often do you want the player to take damage
every 2 seconds while in it as long as they aren't moving
no
Ok, do Event Receiver: 30Hz > If(Greater or Equal)(Time Get Precise Seconds)(Float Variable) Then: Float Variable Add (Precise Seconds + 2)
@waxen dew for now just use a delay chip. when the player enters the trigger volume, run the delay. when the player leaves the trigger volume, cancel the delay. make sure this trigger volume is NOT synced.
after the 2 second delay, if the local player's velocity is greater than 0, then subtract an amount from the your health (int variable). after that, loop it back into the delay chip "run" port.
hm
okay let me make this and I will show you what I got
its kinda the same logic in cv1 and cv2, but cv2 is more reliable and robust
kk, i might not respond for a while but ill get back to u
@silver hearth
close
instead of using the list of players into get velocity (no idea how you did that btw) use a get local player chip. also, loop back the exec. make sure to decrease the int var by itself subtracted by the amount of damage you want done
the power of friendship
no clue how u did that
?
whoops, use the else output instead of then. also add a subtraction to the variable
set delay to 2 seconds
it doesnt work
ur subtract is set to 0
I set it to 2
okay, show me
hover over the output of the int variable. whats the value?
-2
it works! you just dont "die" because you havent created code for that yet. if u want help with that dm me
I do want help with that
any specific reason it has to be in DMs?
