Quote:
Originally Posted by Chompy
One thing, I've never seen a function inside a function >_>
|
That is actually quite common and most of my complex script. I originally thought that until my scripting teacher corrected me XP Anyways, for the hitting thing I have one idea not sure it will work though here it is
PHP Code:
//#CLIENTSIDE
etc...
function onTimeOut() {
r = random(1,2);
if (player.x in |this.x-1;,this+3| && player.y in |this.y-1,this.y+3| && player.ani == "Attack Gani" && r == "1") {
function hurtNPC(amount,type,force);
}
else if (player.x in |this.x-1;,this+3| && player.y in |this.y-1,this.y+3| && player.ani == "Attack Gani" && r == "2") {
function dmgplayer(amount);
}
setTimer(0.05):
}
the random thing is like if the player hit's or misses the baddy.