Object to appear with conditions

Started by NemesisRogue99, Sat 14/02/2004 04:10:39

Previous topic - Next topic

NemesisRogue99

I can't figure out how to make an object appear if it requires multiple objects to be in your inventory to do so...

Would you be able to help me out?

Squinky

#1
If you have say two items...
in the rooms rep exec:

if ((character[EGO].inv[a])&&(character[EGO].inv[y])){
ObjectOn (x);
}

Thats the basic idea. Replace the letters with your numbers. You might need to add a local int to make sure it dosen't get hung up though...


NemesisRogue99

#2
Where would I put this command?

You require inv obj's 1, 3, 4, 5, and 6 to get in...and I need the object to animate as well....I don't know if I did the command right though...well, I'm most certain I didn't..

I'm catching on most of this stuff quite a well and learning new things, but I still have a lot of learning to do, unfortunately..

squinks


This should work, I'm at work so you may need to tweak this to make it work...

if ((character[EGO].inv[1])&&(character[EGO].inv[3]))
if ((character[EGO].inv[4])&&(character[EGO].inv[5]))
if (character[EGO].inv[6])
{
ObjectOn (x);
AnimateObject();
Wait (10);

}

squinks

Also, you should probably replace my Wait (1); with a:

While (ObjectAnimating(x)==1){
Wait (1);
}

Like I tryed to say before, I don't have ags here so you may have to tweak

NemesisRogue99


Wolfgang Abenteuer

Depends on when you want the object to appear.  If you want it to show up as soon as the player enters the screen, put it in the "before fadein" section.  If you want it to happen after the player interacts with a room object, put it under that object's interaction.  If you want it to appear when a player looks at a hotspot, put it in the "look at hotspot" section, and so on.

~Wolfgang

SMF spam blocked by CleanTalk