Difference between revisions of "Osiris/Shared/DB CheckPoint"
m |
m |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{warning|This functionality was accidentally added to the DivinityOrigins mod instead of to the Shared mod. If you wish to use it in a mod that does not depend on the main game, copy the contents of the DivinityOrigins '''GLO_Checkpoints''' story goal to your own mod and ensure it gets [[Osiris_Overview#Goal_Initialisation_and_Completion|initialised]] before any goal that may define a '''DB_Checkpoint()'''.}} | ||
+ | |||
===== Full Definition(s) ===== | ===== Full Definition(s) ===== | ||
* '''DB_CheckPoint'''(''(CHARACTERGUID)'''''_Guard1''',''(CHARACTERGUID)'''''_Guard2''',''(TRIGGERGUID)'''''_PermissionWarningTrigger,''(TRIGGERGUID)'''''_EnterWarningTrigger''',''(TRIGGERGUID)'''''_EnterAttackTrigger''',''(STRING)'''''_PermissionFlag''') | * '''DB_CheckPoint'''(''(CHARACTERGUID)'''''_Guard1''',''(CHARACTERGUID)'''''_Guard2''',''(TRIGGERGUID)'''''_PermissionWarningTrigger,''(TRIGGERGUID)'''''_EnterWarningTrigger''',''(TRIGGERGUID)'''''_EnterAttackTrigger''',''(STRING)'''''_PermissionFlag''') | ||
* '''DB_CheckPoint'''(''(CHARACTERGUID)'''''_Guard1''',''(CHARACTERGUID)'''''_Guard2''',''(TRIGGERGUID)'''''_PermissionWarningTrigger,''(TRIGGERGUID)'''''_EnterWarningTrigger''',''(TRIGGERGUID)'''''_EnterAttackTrigger''',''(STRING)'''''_PermissionFlag''',''(STRING)'''''_CustomCrime''') | * '''DB_CheckPoint'''(''(CHARACTERGUID)'''''_Guard1''',''(CHARACTERGUID)'''''_Guard2''',''(TRIGGERGUID)'''''_PermissionWarningTrigger,''(TRIGGERGUID)'''''_EnterWarningTrigger''',''(TRIGGERGUID)'''''_EnterAttackTrigger''',''(STRING)'''''_PermissionFlag''',''(STRING)'''''_CustomCrime''') | ||
+ | * '''PROC_CheckPointDialogue'''(''(CHARACTERGUID)'''''_Player''', ''(CHARACTERGUID)'''''_Guard''') | ||
===== Description ===== | ===== Description ===== | ||
− | Defines a checkpoint situation with two guards. Both guards must have the '' | + | Defines a checkpoint situation with two guards. Both guards must have the ''GLO_SneakSpotter'' script assigned. When a player enters '''_PermissionWarningTrigger''' without permission (see later), '''PROC_CheckPointDialogue'''('''_Player''', '''_Guard1''') will be called, with the character flag '''''GLO_CP_WarningSomeone''''' set on '''_Guard1'''. You have to overload and implement this routine for any guard this routine may be called for. Usually, you will just want to call [[Osiris/Shared/Proc_StartDialog|Proc_StartDialog]]('''''0''''', '''''GuardDialog''''', '''''CHARACTERGUID_SomeGuard_UUID''''', '''_Player''') from that proc. You can use the '''''GLO_CP_WarningSomeone''''' flag that's set on the guard in your dialog to check whether the dialog has been started because of a checkpoint infraction (in case it is also used as a default dialog). This flag gets removed from the guard after their dialog ends. |
+ | |||
+ | Similarly, when a player enters '''_EnterWarningTrigger''' without permission, the same happens with '''_Guard2'''. | ||
+ | |||
+ | When a player enters '''_EnterAttackTrigger''' without permission, by default the '''trespass''' crime will be generated. If '''_CustomCrime''' is specified, this crime will be generated instead. Note that you will also have to [[Generic_behaviour#Defining_Generic_Behaviours|define this custom crime]] if you want it to do anything. | ||
+ | |||
+ | '''_PermissionFlag''' is a character flag that can be set on a player to indicate they have permission to enter all of the aforementioned triggers. Typically, this flag can be obtained during the dialog that gets started with '''_Guard1''' when entering '''_PermissionWarningTrigger'''. Once you have this flag, none of the dialogs will be started anymore. If there is no way to obtain permission, specify something like '''''INVALIDFLAG''''' rather than an empty string as '''_PermissionFlag''', as it is not intuitive what the result should be of checking whether an en empty character flag is set. | ||
===== Notes ===== | ===== Notes ===== | ||
* / | * / | ||
===== See also ===== | ===== See also ===== | ||
− | * [[Osiris/Shared/ | + | * Helper [[Osiris/Shared/DB_TrespassTrigger|DB_TrespassTrigger]] |
− | [[Category:Osiris Shared Mod Helpers]] | + | [[Category:Osiris Shared Mod Helpers|CheckPoint]] |
Latest revision as of 10:31, 26 February 2018
This functionality was accidentally added to the DivinityOrigins mod instead of to the Shared mod. If you wish to use it in a mod that does not depend on the main game, copy the contents of the DivinityOrigins GLO_Checkpoints story goal to your own mod and ensure it gets initialised before any goal that may define a DB_Checkpoint(). |
Full Definition(s)
- DB_CheckPoint((CHARACTERGUID)_Guard1,(CHARACTERGUID)_Guard2,(TRIGGERGUID)_PermissionWarningTrigger,(TRIGGERGUID)_EnterWarningTrigger,(TRIGGERGUID)_EnterAttackTrigger,(STRING)_PermissionFlag)
- DB_CheckPoint((CHARACTERGUID)_Guard1,(CHARACTERGUID)_Guard2,(TRIGGERGUID)_PermissionWarningTrigger,(TRIGGERGUID)_EnterWarningTrigger,(TRIGGERGUID)_EnterAttackTrigger,(STRING)_PermissionFlag,(STRING)_CustomCrime)
- PROC_CheckPointDialogue((CHARACTERGUID)_Player, (CHARACTERGUID)_Guard)
Description
Defines a checkpoint situation with two guards. Both guards must have the GLO_SneakSpotter script assigned. When a player enters _PermissionWarningTrigger without permission (see later), PROC_CheckPointDialogue(_Player, _Guard1) will be called, with the character flag GLO_CP_WarningSomeone set on _Guard1. You have to overload and implement this routine for any guard this routine may be called for. Usually, you will just want to call Proc_StartDialog(0, GuardDialog, CHARACTERGUID_SomeGuard_UUID, _Player) from that proc. You can use the GLO_CP_WarningSomeone flag that's set on the guard in your dialog to check whether the dialog has been started because of a checkpoint infraction (in case it is also used as a default dialog). This flag gets removed from the guard after their dialog ends.
Similarly, when a player enters _EnterWarningTrigger without permission, the same happens with _Guard2.
When a player enters _EnterAttackTrigger without permission, by default the trespass crime will be generated. If _CustomCrime is specified, this crime will be generated instead. Note that you will also have to define this custom crime if you want it to do anything.
_PermissionFlag is a character flag that can be set on a player to indicate they have permission to enter all of the aforementioned triggers. Typically, this flag can be obtained during the dialog that gets started with _Guard1 when entering _PermissionWarningTrigger. Once you have this flag, none of the dialogs will be started anymore. If there is no way to obtain permission, specify something like INVALIDFLAG rather than an empty string as _PermissionFlag, as it is not intuitive what the result should be of checking whether an en empty character flag is set.
Notes
- /
See also
- Helper DB_TrespassTrigger