Thread: NPC baddy
View Single Post
  #1  
Old 01-05-2007, 09:39 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Quote:
Originally Posted by Chompy View Post
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() {
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" && == "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" && == "2") {
function 
dmgplayer(amount);
}
setTimer(0.05):

the random thing is like if the player hit's or misses the baddy.
__________________
Deep into the Darkness peering...
Reply With Quote