Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > NPC Server
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-29-2002, 04:32 AM
R0b1n-NPC R0b1n-NPC is offline
Registered User
Join Date: Sep 2002
Posts: 397
R0b1n-NPC is on a distinguished road
canwarp2

ok here is my script:

NPC Code:

// NPC Made by R0bin
if (created) {
showcharacter;
setstring this.bird,2;
setcharani nickpet_walk#s(this.bird),;
this.speed = 0.2;
canwarp2;
move();
}
function move() {
this.dircounter++;
if (this.dircounter>100) {
this.dircounter=0;
this.rando1=int(random(0,2));
dir = (dir+1+this.rando1*2)%4;
}
x=x+vecx(dir)*this.speed;
y=y+vecy(dir)*this.speed;
sleep 0.1;
move();
}



and here is my problem:

When the bird gets to the edge of the level, it just stays there and does nothing. why?

(yes the map is set properly)
__________________
- R0bin
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:38 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.