This forum is meant for requesting technical support or reporting bugs.
Moderators: Mystery, ShadowHunter, reneuend, Harvester, GM-Support, Lyberodoggy, Candle
by Ikonz101 » Sat Oct 03, 2009 1:02 am
How to to hide and disable a hotspot permanently using script?
Thanks
Ikonz101
-

Ikonz101
- Frequent Poster
-
- Posts: 128
- Joined: Wed Nov 28, 2007 11:23 pm
by reneuend » Sat Oct 03, 2009 1:15 am
Hotspot(index).enabled = False
Hotspot(index).picture = Nothing
-

reneuend
- Forum Moderator
-
- Posts: 2144
- Joined: Sat Nov 22, 2008 8:37 pm
- Location: Midwest Cornfield, USA
-
by Ikonz101 » Sat Oct 03, 2009 1:43 am
I have it that when you click on the item it brings up a menu using the Simple Menu Plugin. The choices are Look and Take. I have it that when Take is clicked on it simulateshotspotclick code in the simple menu plugin code area. Then I have the hide and disable code that is executed in the blank hotspot (simulated hotspot). (I have it like this because I can't fit all the code onto one line of text area that comes with Simple Plugin. Is there a way to add all your code on one line?)
It makes the hotspot disappear but when I go back to the frame from another frame (using go to last visited frame) the item reappears back.
If this is confusing I will try to explain it a little better.
Thank You
Ikonz101
Edit: Well I figured it out using your code for the "Found" Text Script. This is the code I used in the frames property to fix this problem:
If HideItem = 1 then
Hotspot(10).Picture = Nothing
Hotspot(10).Enabled = False
End If
Then under the simulatehotspotclick (10) I put this code:
HideItem = 1
It works!!
-

Ikonz101
- Frequent Poster
-
- Posts: 128
- Joined: Wed Nov 28, 2007 11:23 pm
by reneuend » Sat Oct 03, 2009 2:01 am
The hotspot disappears but it reappears when you come back to the frame.
Do this.
Create an integer variable (ex. hide_me)
Where ever you put the code to disable the hotspot, add this:
hide_me = 1
Now go to this frame's properties - advanced and add this:
If hide_me = 1 then
hotspot(index).picture = nothing
hotspot(index).Enabled = False
end if
As for adding several lines of code to one line, use a ":" between each command
-

reneuend
- Forum Moderator
-
- Posts: 2144
- Joined: Sat Nov 22, 2008 8:37 pm
- Location: Midwest Cornfield, USA
-
Return to Adventure Maker Technical Support and Bug Reports
Who is online
Users browsing this forum: No registered users and 0 guests