Can't Get VB Code for Disabling Hotspots To Work! [SOLVED!]

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

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

Can't Get VB Code for Disabling Hotspots To Work! [SOLVED!]

Postby 3dgamer » Sat Apr 25, 2009 10:22 am

Could anyone kindly supply accurate code for disabling hotspots (that is, making them invisible after they are made visible)?

I have used the following code, but can't get the little bugger to work:

Code: Select all
Hotspot(2).Visible = False


What could I possibly be doing wrong? Actually, I don't think I have ever gotten this code to work, even in other projects.

Any help with this would be most appreciated! :)

TIA
Last edited by 3dgamer on Sun Apr 26, 2009 7:27 am, edited 1 time in total.
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby ShadowHunter » Sat Apr 25, 2009 10:24 am

Is the hotspot enabled when you make it invisible?

HotSpot(2).Enabled = True or False
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Postby Lyberodoggy » Sat Apr 25, 2009 11:19 am

No, that does never work.

What you should be trying is

Action.LoadAPicture Hotspot(2),""
User avatar
Lyberodoggy
Administrator
 
Posts: 2526
Joined: Sat Feb 17, 2007 3:31 pm
Location: Athens

Postby 3dgamer » Sun Apr 26, 2009 5:21 am

@ ShadowHunter

Hi ShadowHunter,

ShadowHunter wrote:Is the hotspot enabled when you make it invisible?

HotSpot(2).Enabled = True or False


Yep, it is visible. It becomes visible when a variable is set using,"The Hotspot (or picture) must be enabled (or visible) only if..." option in the Variables tab.

@ Lyberodoggy

Hey Lyberodoggy,

Lyberodoggy wrote:No, that does never work.

What you should be trying is

Action.LoadAPicture Hotspot(2),""


Wow, so you are saying that that code has never worked in AM... (hmmm, wonder if the documents on the web site should be updated to reflect this...) Okay, let me try the other one you suggested...brb...

Okay, that works Lyberodoggy...thanks! :)

And thanks, ShadowHunter, for your help as well.
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby Mystery » Sun Apr 26, 2009 6:49 am

Well, this code works in terms of making a hotspot "unclickable", but it doesn't hide it. Indeed, if you want to hide a hotspot (or make it invisible), you need to use the code that Doggy has suggested :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby 3dgamer » Sun Apr 26, 2009 7:27 am

Mystery wrote:Well, this code works in terms of making a hotspot "unclickable", but it doesn't hide it. Indeed, if you want to hide a hotspot (or make it invisible), you need to use the code that Doggy has suggested :)


Ahhhh...so that's the difference. Thanks, Mystery, for clearing that up for me. :D

Take care.
3DGamer
User avatar
3dgamer
Expert Member
 
Posts: 301
Joined: Mon Dec 15, 2008 7:12 am

Postby mercedes » Mon Apr 27, 2009 1:58 am

Wow, so you are saying that that code has never worked in AM... (hmmm, wonder if the documents on the web site should be updated to reflect this...


Yes that code works..:)

Only if u don't want the picture to show in the same hotspot..u use Lyberodoggy's code..
If you want the hotspot to become disabled you use the other code..--the picture will still be there..the hotspot won't be enabled..
Lyberodoggy's suggestion, makes the hotspot invisible, but if there is coding it...it still can become enabled..only there is no picture in it..:)

Peace
User avatar
mercedes
VIP
 
Posts: 2460
Joined: Sun Mar 09, 2008 10:43 pm
Location: Canada..~


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests