code problem

This forum is meant for requesting technical support or reporting bugs.

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

code problem

Postby insaneproject » Tue Dec 04, 2012 2:43 am

how I can make such a level that there are 5 trophies and finish the level to indicate how many were at that level and few have collected or found at the end of that level?
Image
HERE MY WEBSITE AND MY GAMES! CLICK HERE:http://magva-productions.es.tl/
User avatar
insaneproject
Advanced Member
 
Posts: 193
Joined: Mon Apr 16, 2012 9:54 am
Location: SPAIN

Re: code problem

Postby reneuend » Tue Dec 04, 2012 3:40 am

Hi InsaneProject!

If I understand correctly, you want to count how many items were found at the end of a level. Right?

what you need is a counter. Here is how it's done. You'll need the full or the commercial version.

- Create an integer variable. You can call it "counter"

- Under each hotspot where an item (trophy) is found, increment your counter with the following code in the Advanced Tab:
Code: Select all
counter = counter + 1


On the frame you want to display the results, you might use the textbox feature that you create by right-clicking on the frame background. Enter some text like: Number of Trophies Found: 00

After you create a textbox, hover over the textbox and it will display the textbox index number. Remember this number for the next step.

From the Frames Properties - Advanced Tab, enter the following code to display the results to the textbox
Code: Select all
Text(1) = "Number of Trophies Found: " & counter


Be sure to reset the counter when the player goes to another frame or when they click on a hotspot with the following code:
Code: Select all
counter = 0
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: code problem

Postby insaneproject » Tue Dec 04, 2012 12:02 pm

thx reneuend

Now I want that when someone touches an inventory item will display a text box in which you report that object is, as I do?

thx and best regards
Image
HERE MY WEBSITE AND MY GAMES! CLICK HERE:http://magva-productions.es.tl/
User avatar
insaneproject
Advanced Member
 
Posts: 193
Joined: Mon Apr 16, 2012 9:54 am
Location: SPAIN

Re: code problem

Postby reneuend » Wed Dec 05, 2012 2:27 am

You can't do it by touch because AdventureMaker uses drag and drop for the inventory. But, another way is to have an object that stays in your inventory that users can drag and drop other inventory objects to and have a message display.
Here is a tutorial on how to do it:

http://hickchickgames.info/downloads/inventory%20items%20and%20displaying%20a%20message.pdf

Best of luck!
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: code problem

Postby insaneproject » Thu Dec 06, 2012 12:25 am

thx reneuend but, I have a stock I own that I have made ??to the superior by default, for trophies and stuff and what I want is that when you click on an object of this other inventory, can be viewed in a text box or something clue with explanatory text.is this possible?
Image
HERE MY WEBSITE AND MY GAMES! CLICK HERE:http://magva-productions.es.tl/
User avatar
insaneproject
Advanced Member
 
Posts: 193
Joined: Mon Apr 16, 2012 9:54 am
Location: SPAIN

Re: code problem

Postby reneuend » Thu Dec 06, 2012 2:43 am

I'm having trouble translating some of your english.
Edit your last post and add spanish below the english. Be sure to use both english and spanish.
Maybe one of our spanish members can help translate so you can get better assistance.

If you look at KeyGuard 5 Manual, there is a routine called, "InventoryItemLeftMouseDown( )"
This routine looks like it will give you what you need.
When I have time, I'll experiment with it, but until then, please add your question in spanish and we'll see if we can get it properly translated.
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

Re: code problem

Postby insaneproject » Thu Dec 06, 2012 12:40 pm

if I want to display the total trophies found also see a picture or another depending on trophies won?
Image
HERE MY WEBSITE AND MY GAMES! CLICK HERE:http://magva-productions.es.tl/
User avatar
insaneproject
Advanced Member
 
Posts: 193
Joined: Mon Apr 16, 2012 9:54 am
Location: SPAIN


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests