I'm trying to make a cog to move a mouse bot like a romote control. I'm not quite sure how you can tell if a key is pressed though. If someone could tell me the command it would be a great help.
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.
# Mousie-vision. # # 11/2002 GBK Symbols Message Startup Message Activated Message Pulse Message Timer Message Damaged Thing Player Local Thing Bot Surface Switch Flex Time Flex Ac=1 #How fast? Sound Beep Template G #Ghost, prefferably. Thing Gh=-1 Local End Code Startup: Player = JKgetlocalplayer(); Setwallcel(Switch, 0); Stop; Activated: If(Getwallcel(Switch) != 0) Stop; Setwallcel(Switch, 1); Playsoundpos(Beep, Surfacecenter(Switch), 1, 0, 10, 0); Setcamerafocus(0, Bot); Setcamerafocus(1, Bot); Setpulse(0.01); Settimerex(Time, 0, 0, 0); Stop; Pulse: If(Getdebugmodeflags() == 0x400) Setpulse(0.0005); Else Setpulse(0.01); //Slowmo detection. Gh = Fireprojectile(Player, G, -1, -1, '0 0 0', '0 0 0', 0, 0, 0, 0); If(Gh == -1) { Print("Lookvector ghost creation failure."); Stop; } Setthinglook(Bot, Vectorset(Vectorx(Getthinglvec(Gh)), Vectory(Getthinglvec(Gh)), 0)); Destroything(Gh); Gh = -1; If(Isthingcrouching(Player) == 1) Setthingvel(Bot, Vectorscale(Getthinglvec(Bot), Ac)); //Bot navigation. Stop; Timer: Setpulse(0); Setcamerafocus(0, Player); Setcamerafocus(1, Player); Setwallcel(Switch, 0); Stop; Damaged: Setpulse(0); Killtimerex(0); Setcamerafocus(0, Player); Setcamerafocus(1, Player); Setwallcel(Switch, 0); Stop; End