SOLVED: Determining npc in room function

Started by barefoot, Sat 01/01/2011 17:33:33

Previous topic - Next topic

barefoot

Hi

I have a number of characters in one scene that you can click on... any character you click on will change room..  any npc you click on will go to the same room.

So far so good....

Now my problem is: I need a function to determine which npc is in the room.

Like when you talk to him you need the right npc to respond...

Sort of like

Code: ags

 if character_cChris

Do this

 if character_cFrankm

Do this



This type of thing..

I was thinking along the lines of after picking any npc have him transparent 100% and have an object of the npc in its place in the next room.. for all npc...  if possible..

cheers for any help/suggestions

barefoot



I May Not Be Perfect but I Have A Big Heart ..

Dualnames

Quote
I need a function to determine which npc is in the room.

cEgo.Room;

Gets the room number the character is in. Returns an integer.

Code: ags

if (character.Room==) {
//Do this
}
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

barefoot

#2
Cheers Dualnames...  

easy when you remember  :=

Unfortunately i had to reformat my computer and did not save my file of codes... devastated i can tell you!

barefoot
I May Not Be Perfect but I Have A Big Heart ..

SMF spam blocked by CleanTalk