Posted by matt chapman on October 20, 1998 at 10:46:40:
I'm a very inexperienced cogger and I'm having trouble getting this cog to work. I want it to start a level with a conveyor belt running which can then be shut off by a switch. I have already read all the cog tutorials but I'm still having problems understnading the in's and out's of the language. I 'd really appreciate it if anyone could tell me if I'm even near the right ball park here:
# Jedi Knight Cog Script
#
# convswitch.cog
#
# controls a conveyor belt that stops when a switch is pressed
# the level starts with the belt already running
# ========================================================================================
symbols
message startup
message activated
surface convey0
surface switch0
vector vec0=(0.0/0.0/0.0)
speed speed=2.0
end
# ========================================================================================
code
startup:
SlideWall(convey0,vec0,speed);
Return;
activated:
GetWallCel(switch0);
SlideWall(convey0,vec0=(0.0/0.0/0.0),speed=0.0);
Return;
# ........................................................................................
end
Thanks in advance for any help at all. -Matt