Need Help - Can't get Hotspot(x).visible to work

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

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

Need Help - Can't get Hotspot(x).visible to work

Postby Skye » Sat Dec 31, 2005 1:54 am

I can't figure out what I am doing wrong!

I have a test project set up as follows:
Frame 1 - the start point with an option to turn Right
Frame 2 - the frame you arrive at from frame 1

- in frame 2 Frame Properties I have inserted the code
Hotspot(2).visible = FALSE

(Hotspot #2 is a picture of a box sitting on a table)

When I travel from frame 1 to frame 2 I see the box sitting on the table. Shouldn't the code in the Frame properties for frame 2 make that hotspot invisible and therefore I should see no box??

I have also tried putting an 'activation' hotspot in frame 2 that I can click on which calls a subroutine that is supposed to make the hotspot invisible, that won't work either (see code below)

Click on the hotspot calls : ChangeHotspotState(HSvalue, HotSpotNumber)
where I have used FALSE for HSvalue and 2 for HotSpotNumber

Subroutine is:

Sub ChangeHotSpotState(HSvalue, HotSpotNumber)
Hotspot(HotSpotNumber).visible = HSvalue
End Sub

I'm using ver 3.5.4 if that is likely to make any difference.

I could sure use some help with this!!!

Skye
Skye
Expert Member
 
Posts: 325
Joined: Sat Sep 13, 2003 4:19 pm
Location: British Columbia, Canada

Postby GM-Support » Sat Dec 31, 2005 11:08 pm

Hi,

The problem is due to the fact that AM automatically updates the visibility of the hotspots so that the conditions set under the "variables" tab of the Hotspot Properties are always met.

To solve the problem, a workaround consists in moving the hotspot outside of the game area, by using the following command:

Code: Select all
Hotspot(1).move LEFT*15, TOP*15, WIDTH*15, HEIGHT*15


Best regards,
GM-Support
GM-Support
Forum Admin and Games Page admin
 
Posts: 2221
Joined: Thu Jun 05, 2003 7:52 pm

Postby Skye » Sun Jan 01, 2006 12:38 am

Thanks GM!

For Candle:

To move the hotspot back I found that I had to adjust the original co-ordinate of the x (left to right) value by -5.

I used ShadowHunter's code snippet:

Sub ChangeHotspotState (HSnumber, x, y)
Hotspot(HSnumber).move (x-5)*15, y
End sub

and called with

ChangeHotspotState HSnumber, x, y

Skye
Skye
Expert Member
 
Posts: 325
Joined: Sat Sep 13, 2003 4:19 pm
Location: British Columbia, Canada


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron