Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-21-2007, 12:12 PM
Raeiphon Raeiphon is offline
I never asked for this.
Join Date: Jun 2005
Posts: 855
Raeiphon is on a distinguished road
Damn move()

NPC Code:

this.movex = playerx - x; // x needed to travel to player
this.movey = playery - y; // y needed to travel to player
if (player.dir=1){ this.desx = 1.7; this.desy = 1; }
if (player.dir=0) { this.desx = -1.7; this.desy = 1; }
if (player.dir=2) { this.desx = 1.7; this.desy = -1.7; }
if (player.dir=3) { this.desx = -1.7; this.desy = -1.7; }
setCharAni("walk","");
move(this.movex+this.desx,this.movey+this.desy,1,1 );
setCharAni("idle","");



Inefficient, I know, but it gets the job done.

Basically, it's supposed to move the npc so it looks like it's standing next to me. Problem is, i'm an aesthetics freak, and the fact that it just glides along concerns me. How would I go about making the npc use the walk gani through the move sequence?
__________________

I hope for nothing. I fear nothing. I am free.
Reply With Quote
 


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 06:57 PM.


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