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.
# 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}