If player used Item#1 then go to Room#2 otherwise Room#3

This forum is meant for posting anything related to Adventure Maker that doesn't fit in the other forums.Please post technical questions in the Technical Support Forum!

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

If player used Item#1 then go to Room#2 otherwise Room#3

Postby Aiden » Tue Dec 04, 2007 1:27 pm

Please give some one the code for this operation.
Aiden
Member
 
Posts: 20
Joined: Fri Jun 08, 2007 9:30 am

Postby Mystery » Tue Dec 04, 2007 1:41 pm

Hi Aiden,

I'm not quite sure if I understand in detail what you mean.
Do you mean if the player has already used an item earlier, and then clicks on a hotspot?
Or do you mean if the player drags a specific item on a hotspot, then go to Room1, if he drags any other item on the hotspot, go to Room2?

In general, you can create a variable that is assigned to the usage of the item, for example "Hammer_Used".
Then use the Manage Inventory Items feature on the Frame Editor: Drag the hammer on the correct hotspot, and change the value of the variable Hammer_Used to 1 on the Variables Tab.
Then go to the hotspot properties of the hotspot that should "decide" where the player goes, and add:

Code: Select all
If Hammer_Used=1 then
  Action.GoToFrame "Frame1"
Else
  Action.GoToFrame "Frame2"
End If


Let me know if you mean something else, and provide a more detailed description of what you're trying to do :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby Aiden » Tue Dec 04, 2007 2:31 pm

Code is work! :D
Aiden
Member
 
Posts: 20
Joined: Fri Jun 08, 2007 9:30 am

Postby Mystery » Tue Dec 04, 2007 2:32 pm

Glad to hear that, Aiden :D
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland


Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests