Non Player Character not moving/walking - animation

Started by Filipe, Mon 14/01/2019 12:23:25

Previous topic - Next topic

Filipe

Hello guys,

I'm trying to make a Non Player Character moving, in a sort of random endless loop, in the same room...

I write some script on the room function room_RepExec () but this is not working. The player don't even walk once. I mean, he do the animation, but he stays on the same position, until you put eBlock:

Function room_RepExec ()
{
cSusan.Walk(255, 40, eNoBlock, eAnywhere);
}

The character only walks when the eBlock is chosen. I mean, it doesn't work when I put eNoBlock. I want her to keep on moving always. I know I still have t make a loop... :)

Also is there a function besides walk, to animate a character that stays on same position which he is in? Like an a flower?

I did also a script, so that when I interact with that character he starts walking, but the same thing happens, he only walks when it is eBlock... :(

Thansk, I'm only starting with AGS :)


Khris

That function gets called 40 times per second. Your character gets told to start walking over and over and over again.

Animating NPC routes is a somewhat semi-complex problem; the basic idea is to check whether the character is already moving before telling them to walk.

Filipe

Thanks for replying. But How  can I have a non-player character animated then? Like a person moving around, randomly, doing stuff, in the same room on an endless in a loop?


Also, shouldn't the idle view of a character deal with this? I mean, when I put the non player character on a certain room it stays still, despite the idle view has 4 or more frames... I don'tt understand it... I have a policeman, that I want him to be like he is taking notes on a notepad, but he stays still in the same position, and stucked on the same frame... I don't understand... :(

Crimson Wizard

Hey, similar problem is being discussed regularily on the forum, usually people ask how to make a patrolling character (walking between 2 or more points). Even if this is not exactly what you need, you may still use this as an example:
https://www.adventuregamestudio.co.uk/forums/index.php?topic=40122.msg528994#msg528994


SMF spam blocked by CleanTalk