Quote:
Originally Posted by ffcmike
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==0 && playerdir= 0) {
putnpc remotebomb1.png,remotebomb.txt,playerx+0.5,playery-1;
client.bomb=1;
}
if (weaponfired && client.bomb==0 && playerdir= 1) {
putnpc remotebomb1.png,remotebomb.txt,playerx-1.5,playery+1;
client.bomb=1;
}
if (weaponfired && client.bomb==0 && playerdir= 2) {
putnpc remotebomb1.png,remotebomb.txt,playerx+0.5,playery+2.5;
client.bomb=1;
}
if (weaponfired && client.bomb==0 && playerdir= 3) {
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;
}