How do you make character use one item at a time

Started by seraphimdreamer777, Fri 31/07/2009 18:12:55

Previous topic - Next topic

seraphimdreamer777

I'm sorry if I'm being a pain by posting too much but I need help again.

I'm trying to make it where my character can use two different items but not at the same time.
But she keeps using both when I select a certain item. how do I get her to use only one item.
Here is my code

Code: ags
function cmary_UseInv()
{
//Mary puts on black silk dress
cmary.ActiveInventory = idress;
player.ChangeView(1);

//Mary puts on maid outfit
cmary.ActiveInventory = imaid;
player.ChangeView(5);
}


Victory is my destiny

Matti

#1
You set the player's active inventory? Then of course she uses both items one after another (visually at the same time).

I guess you were going to check the active inventory instead of setting it..

Like this:

Code: ags
function cmary_UseInv()
{
//Mary puts on black silk dress
if (cmary.ActiveInventory == idress){
  player.ChangeView(1);
}

//Mary puts on maid outfit
if (cmary.ActiveInventory == imaid){
  player.ChangeView(5);
}
}


seraphimdreamer777

Victory is my destiny

SMF spam blocked by CleanTalk