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 → a simple touch surface cog, but...
a simple touch surface cog, but...
2001-03-03, 8:38 AM #1
What is wrong with the following cog?

# Jedi Knight Cog Script
#
# sg1elev.COG
#
# move those rings!
#
#
# This Cog is Not supported by LucasArts Entertainment Co

symbols
message touched



thing ringglow
surface floor
thing ring0
thing ring1
thing ring2
thing ring3
thing ring4
flex speed_local
end

# ========================================================================================

code
touched:

sleep(2);

SetThingLight(ringglow, 1, 1);

sleep(0.5);

movetoframe(ring0, 1, speed_local);
sleep(0.5);
movetoframe(ring1, 1, speed_local);
sleep(0.5);
movetoframe(ring2, 1, speed_local);
sleep(0.5);
movetoframe(ring3, 1, speed_local);
sleep(0.5);
movetoframe(ring4, 1, speed_local);

Sleep(1);

SetThingLight(ringglow, .1, .1);

Sleep(1);

movetoframe(ring4, 0, speed_local);
sleep(0.5);
movetoframe(ring3, 0, speed_local);
sleep(0.5);
movetoframe(ring2, 0, speed_local);
sleep(0.5);
movetoframe(ring1, 0, speed_local);
sleep(0.5);
movetoframe(ring0, 0, speed_local);



return;

# ........................................................................................

end

You step on a floor, the ghost creates a light, the 5 objects move, then it all goes back.
Code:
if(getThingFlags(source) & 0x8){
  do her}
elseif(getThingFlags(source) & 0x4){
  do other babe}
else{
  do a dude}
2001-03-04, 7:41 AM #2
If the Message Touched doesn't work then switch it the Message to Entered for the floor surface.

(from JK Specs)
Entered: Sent by a sector when the player enters it, or by a surface when a player steps onto it.




------------------
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton
Sylvicolus JK homepage
If I have ever made any valuable discoveries, it has been owing more to
patient observation than to any other reason. -Isaac Newton

↑ Up to the top!