Quote:
|
Originally Posted by Kronan
Here is a small example:
NPC Code:
//#CLIENTSIDE
function onCreated() {
this.fired = true;
}
function onWeaponFired() {
if (this.fired) {
// your stuff can go here
this.fired = false;
setTimer(5);
}
else
{
player.chat = "You must wait 5 seconds before firing again!";
}
}
function onTimeout() {
if (this.fired == false) {
this.fired = true;
}
}
|
Why did you make this.fired counterintuitive?