YourOwners
08-04-2004, 10:12 PM
This cog apply's force to a person when steped on a certain surface. Is it possible to change the cog from steped on, to touched, so this cog can make someone barely bounce away from a wall too? If this is possible, help will be appreciated. Thanks!
# JEDI KNIGHT COG SCRIPT
# [GuNbOy]
# Bounce pads
#
# Extra note: the force variable needs to be set at
# about 500 for any effect.
#
flags=0x240
symbols
message entered
thing player local
sound boing
int xvec=1
int yvec=1
int zvec=1
int force=1
surface bouncepad linkid=1
end
code
entered:
if(GetSenderID()==1) {
player = GetSourceRef();
DetachThing(player);
PlaySoundThing(boing, player, 1, -1, -1, 0x40);
ApplyForce(player, VectorScale(VectorNorm(VectorSet(xvec, yvec, zvec)), force)); }
return;
end
------------------
Your Owners Clan Leaader,
_yo_wasup_
[This message has been edited by YourOwners (edited August 04, 2004).]
# JEDI KNIGHT COG SCRIPT
# [GuNbOy]
# Bounce pads
#
# Extra note: the force variable needs to be set at
# about 500 for any effect.
#
flags=0x240
symbols
message entered
thing player local
sound boing
int xvec=1
int yvec=1
int zvec=1
int force=1
surface bouncepad linkid=1
end
code
entered:
if(GetSenderID()==1) {
player = GetSourceRef();
DetachThing(player);
PlaySoundThing(boing, player, 1, -1, -1, 0x40);
ApplyForce(player, VectorScale(VectorNorm(VectorSet(xvec, yvec, zvec)), force)); }
return;
end
------------------
Your Owners Clan Leaader,
_yo_wasup_
[This message has been edited by YourOwners (edited August 04, 2004).]