Game

Site

Development

Links

Events

Event Guide by Octavian

General

Events are Infantry’s answer to coding support. Events essentially cause actions to happen to a player (ex. add four Hand Grenades to player’s inventory) and Events are called or executed when certain conditions happen in the game (such as a new game starting or a player dying) or when called by another Event. Events can be empty or they may contain a list of actions to perform on a player or a reference to another Events, or even both. Before we get too far into events, lets look at what events are actually able of doing by using actions.

Actions

Known Actions:

warp=# - Sends the player to this warp group (warp groups are defined in the warp tab of the LIO editor). If you do not specify a number it warps the player randomly.
setexp=# - Sets the player’s experience to the amount defined.
setcash=# - Sets the player’s cash to the amount defined.
setenergy=# - Sets the player’s energy to the amount defined.
wipeskill - Wipes all of the player’s owned skills.
wipeinv - Wipes the player’s inventory. When you use =”Item”, will remove the item specified.
wipescore - Wipes the player’s score.
reset - Reset’s the players default vehicle. (Useful if you say “wipe skills”, for example they will no longer have the Infantry skill, it will make them a conscript again if that is the default vehicle defined in the Soul portion of the config file. It can also have a numerical value, but I don’t know what this does. I’ve only seen it set to 7 and 1.)
addskill=”SkillName” - Gives the player the skill (by its name, no quotes).
addinv=”ItemName” - Gives the player the item (by its name, no quotes).
pick["eventstring1;eventstring2"] - Randomly chooses an event string from a set of event strings, seperated by semi-colons.

To use actions, simply put them after an Event’s = sign and seperate multiple actions with commas.
Ex.
Event=setexperience=0,addinv=Grenade,warp=1

Potential and untested actions:

addexperience=# - UNTESTED. This is a logical guess from the other “set” event strings.
addcash=# - UNTESTED. This is a logical guess from the other “set” event strings.
addpoints=# - UNTESTED. This is a logical guess from the other “set” event strings.
sethealth=# - UNTESTED. This is a logical guess from the other “set” event strings.
setbounty=# - UNTESTED. This is a logical guess from the other “set” event strings.
setrepair# - UNTESTED. This is a logical guess from the other “set” event strings.

Event Types

There are two kinds of events:Main Events and Reference Events. Only the CFG file contains both of these events so lets look at that first.

Events in the CFG file

[Event]

Hold1=Even referenced only by other event strings.
Hold2=Event referenced only by other event strings.
Hold3=Event referenced only by other event strings.
Hold4=Event referenced only by other event strings.
StartGame=Event to execute on every player when game starts.
SysopWipe=Event to execute on player when sysop issues a *wipe command.
SelfWipe=Event to execute when a player wipes themselves with ?wipecharacter.
KilledTeam=Event executed on you when you kill a teammate.
KilledEnemy=Event executed on you when you kill an enemy.
KilledByTeam=Event executed on you (just before re-entry into game) when you are killed by a teammate.
KilledByEnemy=Event executed on you (just before re-entry into game) when you are killed by an enemy.
EnterSpawnNoScore=Event executed on you when you enter a private spawn that is not keeping track of scores.
JoinTeam=Event executed on you when you join a different team for any reason, except for when you join spectator frequency.
ChangeDefaultVehicle=Event executed on you when you change default vehicles.
ExitSpectatorMode=Event executed when you exit spectator mode. Executed just after the player joins the team and is put into his default vehicle.
FirstTimeInvSetup=Event executed if the player enters an arena and they have no existing inventory items. Perhaps first time in, or inventory is not saved persistently.
FirstTimeSkillSetup=Event executed if the player enters an arena and they have no existing skills. Perhaps first time in, or skills are not saved persistently.
EndGame=Event to execute on every player when game ends.
SoonGame=Event to execute on every player when game is about to start. (based on Arena:StartingSoonTime)

[Terrain#]

EventString=?

[TeamInfo#]

EventString=?
TeamEventStartGame=Event to execute on every player on this team when a game starts.

Events in the VEH file

Events in the vehicle file are Reference Events only. They can only be called by other events. There are three Reference Events per vehicle listed under the Event Strings tab while viewing a VEH file with the Vehicle Editor.

These are the name of the events, VehicleEvent1 being the top most box and VehicleEvent3 being the bottom most box.

VehicleEvent1
VehicleEvent2
VehicleEvent3

To use these events, you must call them by name in another Event.

Ex. KilledByEnemy=VehicleEvent2
This will execute the actions in the VehicleEvent2 box on a player when they are killed by an enemy.

Events in the ITM file

Every projectile weapon in the ITM file contains a Damage Event String. This Event is executed on a player when a specified projectile (weapon) damages them. It is a bit unique in that I do not believe there is anyway to Events as Reference Events.

These are located under the Projectile - 1 tab on the Item Editor when viewing a Projectile weapon.

©2009 InfantryZones.com