Author Topic: Variable commands  (Read 1591 times)


What
What
Can you not do that? It's beginning to get loving annoying. Actually ask a question rather than "What". It's completely counter-productive.

Its the same code as before, but the %heat changed to %obj.client.player.heat

   %obj.client.player.heat += 1
   
   if(%obj.client.player.heat >= 4)
   {
   %obj.spawnExplosion(AntimatterExplosion,"2 2 2");
   %obj.client.player.addhealth("-35");
   messageclient(%client, 'centerprint', "Overheating!"   2)
   }
   
   %obj.schedule(1000, %obj.client.player.heat -= 1)
In an onFire function, %obj is the player holding the gun. You're being very redundant.

Code: [Select]
%obj.heat += 1;
if(%obj.heat >= 4) {
    %obj.spawnExplosion(AntimatterExplosion,"2 2 2");
    %obj.addhealth("-35");
    centerPrint(%client, "Overheating!", 3);
}
%obj.schedule(1000, 0, eval, %obj @ ".heat -= 1;");
Don't know if %obj.schedule works or not.