Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: YotamElal on Mon 28/02/2005 07:52:56

Title: can I have duplicates of a character?
Post by: YotamElal on Mon 28/02/2005 07:52:56

* can I have duplicates of a character?

* and how do I turn a character off in one room and on in another?


I'm already about 85% done making my game.
THE QUEST TO ZOOLOO

:o)
Title: Re: can I have duplicates of a character?
Post by: Radiant on Mon 28/02/2005 08:11:48
1) no, but you can have two characters that use the same views, so they'll look the same.

2) the two easiest ways are SetCharacterTransparency(CHAR_NAME, 100), or setting the character's position to somewhere off-screen. Remember to put them back when entering a new room.
Title: CharacterWait????????
Post by: YotamElal on Mon 28/02/2005 08:34:16
THanCU

I want a character to walk and then wait and then walk and again wait...
in a loop

I know how to make a character walk around from place to place but I don't know how to tell him to wait before he continues walking...


BTW am I supposed to open a new topic for this (I'm new at foruming)?
Title: Re: can I have duplicates of a character?
Post by: Scummbuddy on Mon 28/02/2005 19:53:14
will this be a NPC (non playable character)... are they just walking around in the background?

that, or if its your main character, there is a much simpler way to do the scripting of a cutscene or just walking around commands than having two characters.

let us know more of what youre doing and we'll help you out
Title: Re: can I have duplicates of a character?
Post by: Goot on Tue 01/03/2005 05:08:14
If you wanted to move a character to a different room you can use the script:
character[CHARACTERSCRIPTNAME].room=ROOMNUMBER;
(replace the works in capitols with the character's name and room).
To have a non player character walking around in the background, check out these functions in the manual:
SetTimer
IsTimerExpired
MoveCharacter
character[CHARID].walking

You'll need to put a script in repeatedly_execute that says:
if(character[CHARID].walking==0){
SetTimer(1,xxxx);
}
if(IsTimerExpired(1)){
MoveCharacter(CHARID,x,y);
}

if you want the character to go to random coordinates, use the Random(int); function (look that up in the manual too for details)
Title: SOLVED
Post by: YotamElal on Tue 01/03/2005 09:41:38
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=19441.0