This shows you the differences between two versions of the page.
— |
final-fantasy-tactics:event-constants [2022/10/16 21:43] (current) xifanie created |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | There are 3 levels for constants, in order of priority: | ||
+ | - Individual event' | ||
+ | - [[modConstants.json]] | ||
+ | - [[gameConstants.json]] | ||
+ | Which means that event constants override anything else | ||
+ | ===== AutoAlloc ===== | ||
+ | In your event, using the constant '' | ||
+ | |||
+ | For example: | ||
+ | < | ||
+ | #Const Start | ||
+ | AutoAlloc: 1, | ||
+ | SomeOtherVariable: | ||
+ | #Const End | ||
+ | |||
+ | SETVar(x0000, | ||
+ | If() | ||
+ | GoTo(GoTo.Success) | ||
+ | Else() | ||
+ | GoTo(GoTo.Fail) | ||
+ | EndIf() | ||
+ | |||
+ | GoToTarget(GoTo.Success) | ||
+ | //Stuff | ||
+ | GoToTarget(GoTo.Fail) | ||
+ | //Stuff | ||
+ | </ | ||
+ | This code would automatically assign a value of 0x00 to GoTo.Success and 0x01 to GoTo.Fail. | ||
+ | This is particularly useful to automatically assign values with Subs and GoTos. |