View Single Post
  #5  
Old 06-21-2012, 10:01 PM
E_Man E_Man is offline
E-Man
E_Man's Avatar
Join Date: Jun 2012
Posts: 81
E_Man will become famous soon enough
Quote:
Originally Posted by ffcmike View Post
When I say comparing variables, this also counts for checking to see if one variable is equal to a numerical value.



It would work yes, but this is a functionality designed to save variables permanently for online usage, which doesn't apply here.

It should be fine to do:

PHP Code:
//Weapon
bomb 1;

//NPC
if(bomb == 1){


I tried that and it still blows up on it's own and the image does not change back, here is the script, I also can send the images if you need to test it.

Weapon:
PHP Code:
// NPC made by E-Man
if (created) {
  
client.bomb=0;
  
client.explosion=0;
  
setimg remotebomb1.png;
}
if (
playertouchsme) {
  
toweapons Remote Bomb;
  
hide;
}
if (
weaponfired && client.bomb==&& playerdir0) {
  
putnpc remotebomb1.png,remotebomb.txt,playerx+0.5,playery-1;
  
client.bomb=1;
}
if (
weaponfired && client.bomb==&& playerdir1) {
  
putnpc remotebomb1.png,remotebomb.txt,playerx-1.5,playery+1;
  
client.bomb=1;
}
if (
weaponfired && client.bomb==&& playerdir2)  {
  
putnpc remotebomb1.png,remotebomb.txt,playerx+0.5,playery+2.5;
  
client.bomb=1;
}

if (
weaponfired && client.bomb==&& playerdir3) {
  
putnpc remotebomb1.png,remotebomb.txt,playerx+2.5,playery+1;
  
client.bomb=1;
}
if (
weaponfired && client.bomb==1) {
  
setani shoot,remote.png;
   
setimg remotebomb1.png;
 
client.explosion=1;
    }
if (
client.bomb==1) {
  
setimg remoteimage.png;

remotebomb.txt
PHP Code:
if (created) {
setimg remotebomb1.png;
}
if (
client.explosion==1) {
canbecarried;
setimg remotebomb2.png;
sleep 0.5;
putexplosion 2,x,y;
client.explosion=0;
destroy;

__________________
Reply With Quote