overpy
overpy copied to clipboard
Add typed variables
Remove declaring variables with the #!declareGlobal/Player directive, instead do it using the new globalvar/playervar keywords.
Types can be specified, eg globalvar int A
will declare A as an int, and will throw an error on A = 3.4
.
The absence of a type is the same as the type Any
, which means the variable can hold any value. This is useful when a type is required, such as Vector<Any, int, float>
.
Types are:
- Object
- Player
- float
- unsigned float
- int
- unsigned int
- bool
- DamageModificationID
- HealingModificationID
- EntityID
- TextID
- String
- Vector
- Direction
- Position
- Hero
- Map
- Team
- Gamemode
- Array
- void
- enums (HudReeval, etc)
The Array and Vector types can have sub-types.