Making NPCs animate in background?

Started by Xadhoom, Fri 25/04/2003 02:13:46

Previous topic - Next topic

Xadhoom

Hey there!
I was wondering, could anybody tell me how I make an NPC perform a continuous series of animation loops, while still making it possible for the player character to move about? I've gotten as far as making the NPC do what he's supposed to, but the whole game goes in wait mode while he moves.
Thanks. :)

EDIT: Nevermind I found it out myself after some more tweaking. Sorry, mr. Moderator guy... ;)
.::XADHOOM::.

Nacho

I am going to say something that might help you, unless this is not the answer you´re looking for (i am not a programmer...).

Here comes my tip: The animated backgrounds are very helpfull, and they can work for an animated character to make a loop (but you won´t be able to interactuate with him). For example, i am doing a background of a bar with a fdrunk guy... I animate the five screens to pretend he is breathing and bubbles are rising from his head and explode... It is nice and you can use this tecnique to many thinks (moving shadows on the walls, candles...)
Are you guys ready? Let' s roll!

Xadhoom

True, but isn't it kinda overkill for just one character? But the technique would be excellent for a bar with lots of people and candles and stuff.
.::XADHOOM::.

Dave Gilbert

How are you making your NPCs move?  The best way is to set an idle animation for them.  I forget the code offhand, but looking up "idle" in the help file should tell you all about it.

miguel

I´ve got a robot in one room that walks around cleaning the place, what I did was this:

int timer=0;
   

function movebot() {
  timer++;
 if (timer>=1500)  timer=0;
 if (timer==10)    MoveCharacter(BOT,65,85);
 if (timer==400)    MoveCharacter(BOT,125,110);
 if (timer==600)     MoveCharacter(BOT,82,187);
 if (timer==800)      MoveCharacter(BOT,285,185);
 if (timer==1000)      MoveCharacter(BOT,240,85);
}

function room_a() {
 // script for room: Repeatedly execute
movebot();
 
}

hope it helps
Working on a RON game!!!!!

Andail

There is the MoveCharacterPath function for that, Miguel.

No need to change your scrip if it works fine, though.

miguel

it does work fine because the TIMER  does all the object moving when I want it  to move; but it´s my room with it's own particular movements; thanks anyway
Working on a RON game!!!!!

Enlaithion

miguel,

Does your robot animate when he is moved to to each coordinate?


Enlaith

miguel

#8
Quote from: Enlaithion on Sun 04/05/2003 18:58:05
miguel,

Does your robot animate when he is moved to to each coordinate?


Enlaith

yep, the robot trows water on the floor when moving
because it´s a character, it uses the view frames when moving left,right,up....
Working on a RON game!!!!!

Enlaithion


SMF spam blocked by CleanTalk