User Tools

Site Tools


besiege:modding:example-guides:creatingtrigger

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
besiege:modding:example-guides:creatingtrigger [2018/06/18 16:49]
von
besiege:modding:example-guides:creatingtrigger [2018/07/10 16:28] (current)
spaar
Line 13: Line 13:
   * Add the Trigger element to the mod manifest.   * Add the Trigger element to the mod manifest.
  
-''​xml <Mod> ... <​Triggers>​ <​Trigger>​ ... </​Trigger>​ </​Triggers>​ </​Mod>​''​+<​code ​xml
 +<Mod> 
 +    ​... 
 +    ​<​Triggers>​ 
 +        ​<​Trigger>​ 
 +            ​... 
 +        ​</​Trigger>​ 
 +    ​</​Triggers>​ 
 +</​Mod>​ 
 +</​code>​
  
   * Define the name and ID.   * Define the name and ID.
Line 19: Line 28:
 There are only 3 elements used to define the trigger. The first two are its name and its ID. The ID must uniquely identify the trigger among all triggers in the same mod; the easiest way to handle this is to just use sequential IDs (1, 2, 3, ...). There are only 3 elements used to define the trigger. The first two are its name and its ID. The ID must uniquely identify the trigger among all triggers in the same mod; the easiest way to handle this is to just use sequential IDs (1, 2, 3, ...).
  
-''​xml <​Trigger>​ <​Name>​Some Trigger</​Name>​ <​ID>​1</​ID>​ </​Trigger>​''​+<​code ​xml
 +<​Trigger>​ 
 +    ​<​Name>​Some Trigger</​Name>​ 
 +    ​<​ID>​1</​ID>​ 
 +</​Trigger>​ 
 +</​code>​
  
 ===== Usable Entities ===== ===== Usable Entities =====
Line 31: Line 45:
 The ''​AvailableOn''​ element is used to specify what entities the trigger is available on. There are 4 forms of specifying entities, all are included and discussed below. The ''​AvailableOn''​ element is used to specify what entities the trigger is available on. There are 4 forms of specifying entities, all are included and discussed below.
  
-''​xml <​Trigger>​ ... <​AvailableOn>​ <​Entity>​1000</​Entity>​ <​ModdedEntity>​ <​ModID>​1283901230</​ModID>​ <​LocalID>​1</​LocalID>​ </​ModdedEntity>​ <​AllOfficialEntities /> <​AllModdedEntities /> </​AvailableOn>​ </​Trigger>​''​+<​code ​xml
 +<​Trigger>​ 
 +    ​... 
 +    ​<​AvailableOn>​ 
 +        ​<​Entity>​1000</​Entity>​ 
 +        ​<​ModdedEntity>​ 
 +            ​<​ModID>​1283901230</​ModID>​ 
 +            ​<​LocalID>​1</​LocalID>​ 
 +        ​</​ModdedEntity>​ 
 +        ​<​AllOfficialEntities /> 
 +        ​<​AllModdedEntities /> 
 +    ​</​AvailableOn>​ 
 +</​Trigger>​ 
 +</​code>​
  
 The ''​Entity''​ element can be used to add the trigger to specific official entities. The ''​Entity''​ element can be used to add the trigger to specific official entities.
besiege/modding/example-guides/creatingtrigger.txt · Last modified: 2018/07/10 16:28 by spaar