Before half an hour, I accidentaly discovered the function of AM that lets you assign another function to the right click instead of bringing up the menu.
At that time I had the idea of creating a code to change the cursor every time the player wants to examine something (for example see Runaway).
So, here is the way to do so.
1. Go to variables, create a variant variable called mode
2. Create a blank frame named mode. Create a text and a hotspot in it. In the text write Action. Make the Hotspot appear as a hand and import the magnifier from the icons to the directory of the hotspot apearance's pictures.
3. Go to Project properties -> Advanced and select the checkbox at the bottom. Paste this code in it:
- Code: Select all
If mode="Action" Then
mode="Search"
Action.ChangeDefaultCursor "magnifier.ico"
icontouse="magnifier.ico"
Else
mode="Action"
Action.ChangeDefaultCursor ""
Action.GoToFrame Action.GetCurrentFrameName
IcontoUse="Action2.ico"
End If
Text(Action.GetMergedTextIndex).Caption=mode
Action.LoadAPicture Hotspot(Action.GetMergedHotspotIndex), IconToUse
4. At the other two checkboxes, write this code:
- Code: Select all
mode="Action"
5. Go to your project's frames. Merge them with the frame named mode.
Then create hotspots and make them perform their actions with scripting like this:
- Code: Select all
If mode="Action" Then
Action.GoToFrame "Solid01"
Else
Action.message "What a nice door!"
End If
Or create another variable and make it 0 if mode="Action" or 1 if mode= "Search", then create different hotspots for the two modes and make them visible or not depending on the variable.
Hope you will use this.