Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Jade on Sat 25/06/2005 22:46:12

Title: Character Falling
Post by: Jade on Sat 25/06/2005 22:46:12
I've made an animation of the main character to use in case you fall in a hole or from an edge.....but my problem is that i dont know how to make it work in the game.

I thought to make an region where the character might fall with these script:

setcharacterview(charid, int view of the falling animation);
animatecharacter(charid, int loop, int delay, repeat one time)

now...how can i make the character falling at the botton of the screen?
I dont know if i've been very clear with my problem...but i'm not very good with english...thanks for the patience... :-[
Title: Re: Character Falling
Post by: Candle on Sat 25/06/2005 23:01:28
Just change the X & Y to off the screen .

MoveCharacterDirect (CHARID, int x, int y)

Moves the character CHARID from its current location to (X,Y) directly, ignoring walkable areas on the screen. This is identical to the "Move to, ignore walls" animation command.

Example:

MoveCharacterDirect(EGO,222,145);

will make the character EGO walk to 222,145 ignoring walkable areas

See Also: MoveCharacter, MoveCharacterPath, MoveCharacterStraight
Title: Re: Character Falling
Post by: Jade on Sun 26/06/2005 09:27:15
Quote from: Candle on Sat 25/06/2005 23:01:28
Just change the X & Y to off the screen .

MoveCharacterDirect (CHARID, int x, int y)

Moves the character CHARID from its current location to (X,Y) directly, ignoring walkable areas on the screen. This is identical to the "Move to, ignore walls" animation command.

Example:

MoveCharacterDirect(EGO,222,145);

will make the character EGO walk to 222,145 ignoring walkable areas

See Also: MoveCharacter, MoveCharacterPath, MoveCharacterStraight
I tried with the command "move character direct" putting offscreen values...but in this case the character remain stucked in the region... :(
Title: Re: Character Falling
Post by: Candle on Sun 26/06/2005 09:49:15
This may help you .
MoveCharacterBlocking(EGO,x,y,1);
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=15731.msg193032;topicseen#msg193032
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=15747.msg193280;topicseen#msg193280
and look at this search
http://www.adventuregamestudio.co.uk/yabb/index.php?action=search2
Title: Re: Character Falling
Post by: Jade on Sun 26/06/2005 16:01:14
Thanks! Now its more clear...i'll try it...thanks again!  ;) :-*
Title: Re: Character Falling
Post by: Candle on Sun 26/06/2005 21:05:56
Your welcome .