Difference between revisions of "Trig time block"

From The Final Challenge Wiki
Jump to navigation Jump to search
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
trig_time_block is a [[Extended Trigger Before Move]] trigger.  It blocks a PC from going a given direction for the specified start and end times.  May be combined with other trig_time_block triggers.  If time falls outside of specified times, access is granted.  Time wrapping is ''not supported'', so specifying times that extend past midnight will not work as expected.  The specified times are ''include'' the listed start and end hours.  Though it is possible to stack trig_time_block special functions to block multiple time ranges, keep in mind that if you do so, you should not include a success message.  The reason is that the success message would display if the first trigger was successful, but a subsequent trigger could block the exit, resulting in both success and failure messages being displayed.
trig_time_block is a [[Extended Trigger Before Move]] trigger.  It blocks a PC from going a given direction for the specified start and end times.  May be combined with other trig_time_block triggers.  If time falls outside of specified times, the exit may be used.  Time wrapping is ''not supported'', so specifying times that extend past midnight will not work as expected.  The specified times are ''include'' the listed start and end hours.  When using multiple trig_time_block triggers, any desired success message should '''only''' be specified for the last trig_time_block trigger, so that the correct message is displayed.


Usage:
Usage:
Line 15: Line 15:
|Door direction
|Door direction
|The direction of the door to apply the trigger to
|The direction of the door to apply the trigger to
  {| class="wikitable"
  |-
  !Number
  !Direction
  |-
  |0
  |North
  |-
  |1
  |East
  |-
  |2
  |South
  |-
  |3
  |West
  |-
  |4
  |Up
  |-
  |5
  |Down
  |}
|-
|-
|Start time
|Start time
Line 29: Line 52:
|-
|-
|'''-1'''
|'''-1'''
|Unused field
|Unused field (but the '''-1''' must still be specified)
|}
|}


Line 36: Line 59:
  Q 1200 1 trig_time_block 05 07 <success msg or -1> <fail msg or -1> -1
  Q 1200 1 trig_time_block 05 07 <success msg or -1> <fail msg or -1> -1
  S
  S
[[Category:Area Development]]

Latest revision as of 15:13, 1 November 2012

trig_time_block is a Extended Trigger Before Move trigger. It blocks a PC from going a given direction for the specified start and end times. May be combined with other trig_time_block triggers. If time falls outside of specified times, the exit may be used. Time wrapping is not supported, so specifying times that extend past midnight will not work as expected. The specified times are include the listed start and end hours. When using multiple trig_time_block triggers, any desired success message should only be specified for the last trig_time_block trigger, so that the correct message is displayed.

Usage:

Q <room vnum> <door direction> trig_time_block <start time (00-23)> <end time (00-23)> <success msg or -1> <fail msg or -1> -1

Field Description
Room vnum Room to apply the trigger to
Door direction The direction of the door to apply the trigger to
Number Direction
0 North
1 East
2 South
3 West
4 Up
5 Down
Start time The time to start denying access to specified exit, using a 24 hour clock. This number must be less than the end time
End time The time to start allowing access to specified exit, using a 24 hour clock. This number must be greater than the start time
Success string vnum -1 - No success message
#STRINGS vnum with success message
Fail string vnum -1 - No failure message
#STRINGS vnum with failure message
-1 Unused field (but the -1 must still be specified)

Example:

Q 1200 1 trig_time_block 05 07 <success msg or -1> <fail msg or -1> -1
S