View Single Post
  #10  
Old 12-17-2004, 06:20 AM
Slash-P2P Slash-P2P is offline
Banned
Join Date: May 2004
Location: Burning Blade
Posts: 941
Slash-P2P is on a distinguished road
NPC Code:
if(weaponfired && !this.on == 1){
initialise();
timeout = 0.1;
}


That is the on/off function, but its only scripted to go on.
You can use an algorithim for making a 1 and 0 toggle for the this.on variable with something such as:
this.on = abs(this.on-1);
Plug that in there. Make sure initialise() only happens if this.on is '1'. If this.on is '0', make an end function such as end() that unsets everything that happening (one thing in that function could be hideimg 200)
Reply With Quote