PowerQuest 0.18.12
|
Each room you create will have its own room class and script file. These are created automatically with the name appended, eg: RoomForest.cs.
There are some additional helpful properties you can use in room scripts:
Public Member Functions | |
void | OnEnterRoom () |
Called whenever you enter a room, before fading in. Non-blocking functions only Use this function to set up stuff you need to in your room, like where characters should be standing. You can also do this at the top of RoomScript.OnEnterRoomAfterFade. | |
IEnumerator | OnEnterRoomAfterFade () |
Blocking script called whenever you enter a room, after fade in is complete. | |
IEnumerator | OnExitRoom (IRoom oldRoom, IRoom newRoom) |
Blocking script called whenever you exit a room, as it fades out. | |
IEnumerator | UpdateBlocking () |
Blocking script called every frame when no other scripts are blocking. | |
void | Update () |
Called every frame. Non-blocking functions only. | |
IEnumerator | OnAnyClick () |
Blocking script called whenever the player clicks anywhere. This function is called before any other click interaction. If this function blocks, it will stop any other interaction from happening. | |
IEnumerator | OnWalkTo () |
Blocking script called whenever the player tries to walk somewhere. Even if C.Player.Moveable is set to false. | |
void | OnPostRestore (int version) |
Called after restoring a game. Use this if you need to update any references based on saved data. Non-blocking functions only. | |
IEnumerator | OnInteractHotspot (Hotspot hotspot) |
Blocking script called when "Interact" is used on a hotspot. The name is appended to the function, eg: OnInteractHotspotTree(...). | |
IEnumerator | OnLookAtHotspot (Hotspot hotspot) |
Blocking script called when "Look At" is used on a hotspot. The name is appended to the function, eg: OnLookAtHotspotTree(...). | |
IEnumerator | OnUseInvHotspot (Hotspot hotspot, Inventory item) |
Blocking script called when an item is used on a hotspot. The name is appended to the function, eg: OnUseInvHotspotTree(...). Query the passed in 'item' to see if you should perform the action. Eg: ‘if ( item == I.Key ) {...}’ or 'if ( I.Key.Active ) {...}'. | |
IEnumerator | OnInteractProp (Prop prop) |
Blocking script called when "Interact" is used on a prop. The name is appended to the function, eg: OnInteractPropDoor(...). | |
IEnumerator | OnLookAtProp (Prop prop) |
Blocking script called when "Look At" is used on a prop. The name is appended to the function, eg: OnLookAtPropDoor(...). | |
IEnumerator | OnUseInvProp (Prop prop, Inventory item) |
Blocking script called when an item is used on a prop. The name is appended to the function, eg: OnUseInvPropDoor(...). Query the passed in 'item' to see if you should perform the action. Eg: ‘if ( item == I.Key ) {...}’ or 'if ( I.Key.Active ) {...}'. | |
IEnumerator | OnInteractCharacter (Hotspot hotspot) |
Blocking script called when "Interact" is used on a character. The name is appended to the function, eg: OnInteractCharacterBarney(...). | |
IEnumerator | OnLookAtCharacter (Hotspot hotspot) |
Blocking script called when "Look At" is used on a hotspot. The name is appended to the function, eg: OnLookAtCharacterBarney(...). | |
IEnumerator | OnUseInvCharacter (Hotspot hotspot, Inventory item) |
Blocking script called when an item is used on a hotspot. The name is appended to the function, eg: OnUseInvCharacterBarney(...). Query the passed in 'item' to see if you should perform the action. Eg: ‘if ( item == I.Key ) {...}’ or 'if ( I.Key.Active ) {...}'. | |
IEnumerator | OnEnterRegion (IRegion region, ICharacter character) |
Blocking script called when "Interact" is used on a prop. The name is appended to the function, eg: OnInteractPropDoor(...). Blocking script called when an item is used on a prop. The name is appended to the function, eg: OnEnterRegionMud(...). Query the passed in 'character' to see if you should perform the action. Eg: ‘if ( character == C.Plr ) {...}’. | |
IEnumerator | OnExitRegion (IRegion region, ICharacter character) |
Blocking script called when an item is used on a prop. The name is appended to the function, eg: OnExitRegion(...). Query the passed in 'character' to see if you should perform the action. Eg: ‘if ( character == C.Plr ) {...}’. | |
void OnEnterRoom | ( | ) |
Called whenever you enter a room, before fading in. Non-blocking functions only Use this function to set up stuff you need to in your room, like where characters should be standing. You can also do this at the top of RoomScript.OnEnterRoomAfterFade.
IEnumerator OnEnterRoomAfterFade | ( | ) |
Blocking script called whenever you enter a room, after fade in is complete.
Blocking script called whenever you exit a room, as it fades out.
IEnumerator UpdateBlocking | ( | ) |
Blocking script called every frame when no other scripts are blocking.
void Update | ( | ) |
Called every frame. Non-blocking functions only.
IEnumerator OnAnyClick | ( | ) |
Blocking script called whenever the player clicks anywhere. This function is called before any other click interaction. If this function blocks, it will stop any other interaction from happening.
IEnumerator OnWalkTo | ( | ) |
Blocking script called whenever the player tries to walk somewhere. Even if C.Player.Moveable
is set to false.
void OnPostRestore | ( | int | version | ) |
Called after restoring a game. Use this if you need to update any references based on saved data. Non-blocking functions only.
IEnumerator OnInteractHotspot | ( | Hotspot | hotspot | ) |
Blocking script called when "Interact" is used on a hotspot. The name is appended to the function, eg: OnInteractHotspotTree(...).
IEnumerator OnLookAtHotspot | ( | Hotspot | hotspot | ) |
Blocking script called when "Look At" is used on a hotspot. The name is appended to the function, eg: OnLookAtHotspotTree(...).
IEnumerator OnUseInvHotspot | ( | Hotspot | hotspot, |
Inventory | item ) |
Blocking script called when an item is used on a hotspot. The name is appended to the function, eg: OnUseInvHotspotTree(...). Query the passed in 'item' to see if you should perform the action. Eg: ‘if ( item == I.Key ) {...}’ or 'if ( I.Key.Active ) {...}'.
IEnumerator OnInteractProp | ( | Prop | prop | ) |
Blocking script called when "Interact" is used on a prop. The name is appended to the function, eg: OnInteractPropDoor(...).
IEnumerator OnLookAtProp | ( | Prop | prop | ) |
Blocking script called when "Look At" is used on a prop. The name is appended to the function, eg: OnLookAtPropDoor(...).
IEnumerator OnUseInvProp | ( | Prop | prop, |
Inventory | item ) |
Blocking script called when an item is used on a prop. The name is appended to the function, eg: OnUseInvPropDoor(...). Query the passed in 'item' to see if you should perform the action. Eg: ‘if ( item == I.Key ) {...}’ or 'if ( I.Key.Active ) {...}'.
IEnumerator OnInteractCharacter | ( | Hotspot | hotspot | ) |
Blocking script called when "Interact" is used on a character. The name is appended to the function, eg: OnInteractCharacterBarney(...).
IEnumerator OnLookAtCharacter | ( | Hotspot | hotspot | ) |
Blocking script called when "Look At" is used on a hotspot. The name is appended to the function, eg: OnLookAtCharacterBarney(...).
IEnumerator OnUseInvCharacter | ( | Hotspot | hotspot, |
Inventory | item ) |
Blocking script called when an item is used on a hotspot. The name is appended to the function, eg: OnUseInvCharacterBarney(...). Query the passed in 'item' to see if you should perform the action. Eg: ‘if ( item == I.Key ) {...}’ or 'if ( I.Key.Active ) {...}'.
IEnumerator OnEnterRegion | ( | IRegion | region, |
ICharacter | character ) |
Blocking script called when "Interact" is used on a prop. The name is appended to the function, eg: OnInteractPropDoor(...). Blocking script called when an item is used on a prop. The name is appended to the function, eg: OnEnterRegionMud(...). Query the passed in 'character' to see if you should perform the action. Eg: ‘if ( character == C.Plr ) {...}’.
IEnumerator OnExitRegion | ( | IRegion | region, |
ICharacter | character ) |
Blocking script called when an item is used on a prop. The name is appended to the function, eg: OnExitRegion(...). Query the passed in 'character' to see if you should perform the action. Eg: ‘if ( character == C.Plr ) {...}’.