DisableHotspot (int hsnum)Disables hotspot number HSNUM in the current room. All areas of the screen that were previously HSNUM now act as type 0 (no hotspot). You can turn it back on later with the EnableHotspot command.
This command permanently disables the hotspot - that is, it will not be reset when the player re-enters the room. The only way of turning the hotspot back on is to use the EnableHotspot command.
Example:
DisableHotspot(3);will disable the hotspot number 3.
See Also: EnableHotspot, RemoveWalkableArea
EnableHotspot (int hsnum)Turns hotspot HSNUM back on. Use this to re-enable a hotspot which you turned off earlier with the DisableHotspot command.
Example:
EnableHotspot(3);will enable hotspot number 3 that was disabled by the DisableHotspot command.
See Also: DisableHotspot, RestoreWalkableArea
GetHotspotAt (int x, int y)Returns the number of the hotspot at SCREEN co-ordinates (X,Y). If there is no hotspot there, or if invalid co-ordinates are specified, returns 0.
NOTE: The co-ordinates are SCREEN co-ordinates, NOT ROOM co-ordinates. This means that with a scrolling room, the co-ordinates you pass are relative to the screen's current position, and NOT absolute room co-ordinates. This means that this function is suitable for use with the mouse cursor position variables.
Example:
if (GetHotspotAt(mouse.x,mouse.y)==2)
Display ("Door");
will display a message "Door" when the cursor is over the hotspot number 2.See Also: GetLocationName, GetLocationType
GetHotspotPointX (int hotspot)Returns the X room co-ordinate of HOTSPOT's walk-to point. If the specified hotspot does not have a walk-to point, returns -1.
Example:
MoveCharacterBlocking (EGO, GetHotspotPointX (4), GetHotspotPointY (4), 0);will move the character to hotspot 4's walk-to point.
See Also: GetHotspotPointY, MoveCharacterToHotspot
GetHotspotPointY (int hotspot)Returns the Y room co-ordinate of HOTSPOT's walk-to point. If the specified hotspot does not have a walk-to point, returns -1.
Example:
MoveCharacterBlocking (EGO, GetHotspotPointX (4), GetHotspotPointY (4), 0);will move the character to hotspot 4's walk-to point.
See Also: GetHotspotPointX, MoveCharacterToHotspot
GetHotspotProperty (int hotspot, string property)Returns the custom property setting of the PROPERTY for HOTSPOT.
This command works with Number properties (it returns the number), and with Boolean properties (returns 1 if the box was checked, 0 if not).
Use the equivalent GetPropertyText function to get a text property.
Example:
if (GetHotspotProperty(1, "Value") > 200)
Display("Hotspot 1's value is over 200!");
will print the message if hotspot 1 has its "Value" property set to more than 200.See Also: GetHotspotPropertyText
GetHotspotPropertyText (int hotspot, string property, string buffer)Returns the custom property setting of the PROPERTY for HOTSPOT.
This command works with Text properties only. The property's text will be copied into the BUFFER that you pass to this command.
Use the equivalent GetProperty function to get a non-text property.
Example:
string buffer;
GetHotspotPropertyText(2, "Description", buffer);
Display("Hotspot 2's description: %s", buffer);
will retrieve hotspot 2's "description" property into the buffer, then display it.See Also: GetHotspotProperty
RunHotspotInteraction (int hotspot, int mode)Processes the interaction list as if the player had clicked the mouse on hotspot number HOTSPOT in the current room, using cursor mode MODE. MODE is one of the MODE_* constants listed in the ProcessClick description. May be useful with the text parser for simulating a mouse click if they type specific words in.
Example:
RunHotspotInteraction(4,MODE_LOOK);will run the code defined in the "LOOK AT HOTSPOT" interaction for hotspot number 4.
See Also: ProcessClick, RunCharacterInteraction, RunObjectInteraction