Thread: Custom NPC
View Single Post
  #9  
Old 01-21-2002, 12:56 AM
Sennema Sennema is offline
Registered User
Join Date: Nov 2001
Location: Ontario, Canada
Posts: 132
Sennema is on a distinguished road
Send a message via ICQ to Sennema Send a message via AIM to Sennema
Hmm... it might work that way, but I haven't seen anything like that. Say each sprite was a square that was 50*50 pixels each.

To get the first image you'd use something like
NPC Code:

showimg 101,bogo_dog0.gif,x,y;
changeimgpart 101,0,0,50,50;
changeimgvis 101,3;



That would show the first sprite, the still dog from behind. Now, say you wanted the image of the dog sitting down while facing toward the player. You'd just do something like:

NPC Code:

if(dir=2&&stuff){
changeimgpart 101,100,250,50,50;
}



That would take the image and edit the part that's showing, giving you the dog sitting down. The actual dimensions are a little different that a 200*300 pixel image, but that's the general idea. Hope that helped.
__________________
~Draemus Windblade


Just over 90% of all messages have no point or meaning.

"In order to preserve ourselves we seek out and eliminate anything that may do use harm. In doing so, we destroy things that, though possibly hazzardous, may be important to survival. So you see, in trying to save ourselves, we ultimately bring about our own destruction"


Luminar
Reply With Quote