Change HopSpot Number?

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

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

Change HopSpot Number?

Postby Ikonz101 » Fri Sep 18, 2009 12:57 am

Is there a way to change the hotspot numbers? The reason is that I have a frame that is used for the score, items that have to be found, and countdown time. This frame is merged with another frame but it doesn't recognize that there is already hotspots with the same number. I have a hotspot 1 on one frame and on the merged frame there is also a hotspot 1.

Thank You
Ikonz101
User avatar
Ikonz101
Frequent Poster
 
Posts: 128
Joined: Wed Nov 28, 2007 11:23 pm

Postby juhuwoorps » Fri Sep 18, 2009 2:03 am

GetMergedHotspotIndex is your answer
Look at this here:http://adventuremaker.com/help/vbscript_reference.htm
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Ikonz101 » Fri Sep 18, 2009 2:20 am

How am I suppose to use this? Do I put it in the hotspot where the item I click? When I click on the item it is suppose to remove the hotspot with the name in it from the merged list. Same thing as the Hidden Objects Tutorial (this is the tutorial I am using).

Ikonz101
User avatar
Ikonz101
Frequent Poster
 
Posts: 128
Joined: Wed Nov 28, 2007 11:23 pm

Postby juhuwoorps » Fri Sep 18, 2009 2:37 am

it's a bit difficult to work with merged hotspots. I don't have it in my mind yet how to call the right spots.
I'll have a look at my personal FAQ tomorrow and will post a small tutorial.
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Ikonz101 » Fri Sep 18, 2009 2:46 am

I did a little trick I counted all my hotspots then continued with the next numbers which were 10 and 11 and it worked. So I am keeping track of all my hotspots that way. Hopefully it all works out that way. :)

Ikonz101
User avatar
Ikonz101
Frequent Poster
 
Posts: 128
Joined: Wed Nov 28, 2007 11:23 pm

Postby reneuend » Fri Sep 18, 2009 4:28 am

Hey Ikonz101!

It's nice to see you pushing yourself to find a way to resolve something. I have a feeling we'll be seeing some really cool stuff from you! :)
---


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

Postby Ikonz101 » Sat Sep 19, 2009 6:31 am

I am having issues with the hotspots again. I have a merged frame with a hidden hotspot when the frame loads. I try to create another hotspot to use on the frame but it uses the hidden hotspots number and messes everything up. I wish there was a way to change the hotspot number cause this is confusing at times. Is there anyway around this?

Also what does GetMergedHotSpot command actually due? And how would I use it.

Thank You
Ikonz101
User avatar
Ikonz101
Frequent Poster
 
Posts: 128
Joined: Wed Nov 28, 2007 11:23 pm

Postby juhuwoorps » Sat Sep 19, 2009 7:18 am

getmergedhotspotindex returns the number of the first merged hotspot.
For example if you have 3 hotspots in your frame, get mergedhotspotindex returns a 4 for the first meged hotspot.
so if you want to handle with the merged hotspots you must call the first hotspot with hotspot(4) or better hotspot(getmergedhotspotindex). If you are using the second version you're able to put more HS in your original frame without tmessing up the hotspotnumbers.
If you want to work with the second merged hotspot just use this: hotspot(getmergedhotspotindex+1) and so on

Hope it's a bit clearer now
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Ikonz101 » Sat Sep 19, 2009 7:40 am

It did clear it up a little. Just have a few questions where do I put this code? What is the exact code I would use to add the extra hotspot or hotspots? I tried the code below but it gives me errors. I know I am missing something or not completely understanding it.

Thank You
Ikonz101
User avatar
Ikonz101
Frequent Poster
 
Posts: 128
Joined: Wed Nov 28, 2007 11:23 pm

Postby mercedes » Sat Sep 19, 2009 9:58 am

Ok, If u have 3 hotspots on the frame..and u don't want the numbered indexes to jump up a number..

hotspot(getmergedhotspotindex+1) Will call Hotpot(2)
hotspot(getmergedhotspotindex+2) Will call Hotspot(3)
and so on..

I could be wrong..I'ts been a while since i've done this..and I found it a bit confusing then...lol..

You would put this in the Global procedures..i gather..If u only have 2 frames that are merged..If u have more frames..I think u might have to add a Select Case for frames..

I"m sure someone will correct me if i'm wrong..:D
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby Ikonz101 » Sat Sep 19, 2009 4:39 pm

Does this add a new hotspot so it doesn't mess up other hotspots on the merged frame?

Ikonz101

EDIT: I get type mismatch error. Code doesn't seem to work anywhere.
User avatar
Ikonz101
Frequent Poster
 
Posts: 128
Joined: Wed Nov 28, 2007 11:23 pm

Postby juhuwoorps » Sat Sep 19, 2009 5:28 pm

it doesn't add a new hotspot.
if you have an normal frame with 2 HS and and a frame you wold merge with the normal frame with also 2 HS.
In the editioning modus you will see in both frames 2 HS named HS1 and HS2. But if you run the normal frame, you have the hospots 1 to 4. So if you want to handle with a HS from the merged frame in the normal frame, for example the 2 HS in merged frame, you have to use HS(4) in the advanced tab of the frame or hotspot or use hotpsot(GetMergedHotspotIndex+1)

A small example:
If you want to load a picture in the 2 HS in the merged frame by clicking the first HS in your normal frame you have to write this in the Advanced tab of the 1 HS in the normal frame:

Action.LoadAPicture Hotspot(GetMergedHotspotIndex+1), "image.jpg"
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Ikonz101 » Mon Sep 21, 2009 8:03 am

Ok I got it to load the picture but how to I make the hotspot do something when I click on it? I don't just want a picture I want the hotspot to take me to another frame when clicked on. Also how do I change where the hotspot picture loads on screen (how would I put the coordinates into the code)?

Thank You
Ikonz101
User avatar
Ikonz101
Frequent Poster
 
Posts: 128
Joined: Wed Nov 28, 2007 11:23 pm

Postby juhuwoorps » Mon Sep 21, 2009 1:43 pm

I'm not sure what you're speaking, but if you want a merged HS to go to another frame by clicking on it, you have to put the code in hotspot in the merged frame.

A hotspotpicture loads always in a hotspot.
If you want to move a hotspot use the move command
http://adventuremaker.com/help/vbscript_techniques.htm#move_hotspot

or use Lyberos Moveplugin (don't know the correct name at the moment, but it should be in the LDG Plugin Pack)

http://www.adventuremaker.com/phpBB2/viewtopic.php?t=4868

What are you want to do? Perhaps we can help a bit better if we know what you want to do?
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Ikonz101 » Mon Sep 21, 2009 4:45 pm

I am trying to create another hotspot on my merged frame but it doesn't change the number of the created hotspot. So it uses the same properties of the other hotpsot messing up the game.

Ikonz101
User avatar
Ikonz101
Frequent Poster
 
Posts: 128
Joined: Wed Nov 28, 2007 11:23 pm

Postby juhuwoorps » Mon Sep 21, 2009 5:58 pm

when you trie to make a new merged hotspot, you mess just mess up all merged hotspots if you do send a HS to bottom or to top.
don't change the z index.

but htis does only work with getmergedhotspotindex
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Ikonz101 » Mon Sep 21, 2009 8:13 pm

What I just did was duplicated a hotspot I created and changed around some code for the hotspots and it seems to work well right now.

Ikonz101
User avatar
Ikonz101
Frequent Poster
 
Posts: 128
Joined: Wed Nov 28, 2007 11:23 pm

Postby juhuwoorps » Mon Sep 21, 2009 8:26 pm

this changing around with the code you don't have if you are using getmergedhotspotindex
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby Ikonz101 » Mon Sep 21, 2009 11:11 pm

Yeah I am so confused with the getmergedhotspot code. I thank you for your help though. I will mess around with it some more to try and figure it out.

Ikonz101
User avatar
Ikonz101
Frequent Poster
 
Posts: 128
Joined: Wed Nov 28, 2007 11:23 pm

Postby reneuend » Tue Sep 22, 2009 12:19 am

I've stayed away from the merge stuff. I don't want to get stuck in a situation that I can easily back out of! :P
---


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

Postby Ikonz101 » Tue Sep 22, 2009 12:38 am

I completely agree. It would make it 10x easier if you could change your hotspot number and then all the other hotspots would update there numbers.

Feature Request Maybe :D

Ikonz101
User avatar
Ikonz101
Frequent Poster
 
Posts: 128
Joined: Wed Nov 28, 2007 11:23 pm

Postby reneuend » Tue Sep 22, 2009 12:53 am

Instead of automatic, there should be an option to renumber your hotspots. You could break a game by automatically renumbering hotspots if you are already referring to a specific index.
---


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

Postby Ikonz101 » Tue Sep 22, 2009 1:11 am

True...that makes more sense. Were is GM???? :D

Ikonz101
User avatar
Ikonz101
Frequent Poster
 
Posts: 128
Joined: Wed Nov 28, 2007 11:23 pm

Postby ShadowHunter » Tue Sep 22, 2009 8:25 am

During design time HotSpot Magic will renumber the hotspots :wink:
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Postby reneuend » Tue Sep 22, 2009 3:46 pm

ahhh, that's right. and it's easy to use! See my tutorial on using Hotspot magic!
---


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

Postby Ikonz101 » Tue Sep 22, 2009 11:54 pm

Can't find the tutorial in the tutorial section. What do you mean by "During design time HotSpot Magic will renumber the hotspots"? When you create a hotspot using HotSpot Magic it does this? ShadowHunter I sent you a email for the registration code for HotSpot Magic.

Ikonz101
User avatar
Ikonz101
Frequent Poster
 
Posts: 128
Joined: Wed Nov 28, 2007 11:23 pm

Postby mercedes » Wed Sep 23, 2009 2:46 am

You can use HSM instead of the Merging frames option...You can create as many text or hotspots on which ever frames u want..duplicates..It's so much easier then Merging frames..With merging frames u are limited to certain actions..[not being able to work with the merged frame]
With HSM u can add code..ect..you'll see..Once u get the registration code..it's very simple to work..

http://www.adventuremaker.com/phpBB2/viewtopic.php?t=5047&highlight=hotspot+magic

I think this might be the tutorial you are looking for...:)
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~

Postby reneuend » Wed Sep 23, 2009 2:48 am

Hmmm....I guess I must be thinking of the AM Journal Plugin that 3DGamer and I wrote. It has a tutorial that shows you how to use Hotspot Magic.

Looks like Mercedes found something as I wrote this! :P

(update) My tutorial explains how to build a grid. You don't have to have a grid with hotspot magic.

Be sure to look at ShadowHunter's documentation on it!
---


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

Postby juhuwoorps » Wed Sep 23, 2009 4:21 pm

mercedes wrote:..With merging frames u are limited to certain actions..[not being able to work with the merged frame]



What limitations are you speaking off?

I'm working a lot with merging and didn't find any limitations :)
juhuwoorps
Code Master
 
Posts: 622
Joined: Tue Jul 08, 2008 3:13 pm

Postby reneuend » Wed Sep 23, 2009 6:27 pm

I tried using merging when I first started and got burned. But, maybe it's a lack of knowledge/trust in it! :?

Hey Juhu? A nice tutorial on this subject would be wonderful!!! :D
---


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

Next

Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron