Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsCog Forum → Modifying a bounce cog.
Modifying a bounce cog.
2004-08-04, 7:12 PM #1
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!

Code:
# 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).]
-=__/¯¯l¤¥Ø¤l¯¯\__\/\/ª≤uÞ_=-
http://www.TeamYo.org
2004-08-04, 11:24 PM #2
Yeah... Might be possible... Just add touched: before entered:. That could work. If you want touched only, then replace entered: with touched:.

/Edward
Edward's Cognative Hazards

↑ Up to the top!