Inventory Info Tutorial

Save your weapons, so you can continue next morning <3

Trigger usage used: -> Save inventory info of Character 'B' to variable 'A' -> Spawn all weapons stored in variable 'A' at position of Character 'B'

Credit to Ditzy for the tutorial.

What is weapon ID/string?

Weapon IDs were used back in the days of the old level editor(OLE), but have since become obsolete with the introduction of the new advanced level editor(ALE). However, with variables having been introduced into the ALE, weapon IDs have become more useful in certain scenarios.

These trigger actions (quote section) allow you to save and load a player's weapon inventory, intended for use with session variables. When an inventory is saved onto a variable, all the weapons are converted to a format that the game can read, which are weapon IDs. If a mapmaker wanted to, they can give a variable a weapon ID manually, allowing them to "clone" weapons within the same map.

The format of the variable string

Basically for the weapon ID which is usable in trigger usage above, the format would work like this:

[Weapon ID]^[Weapon level]^[Weapon Team] 
e.g. gun_real_rifle^0^-1

Weapon ID is the unique ID assigned to the weapon. It's followed by the [Weapon level], ranging from 0 to 3. The [Weapon level] is encased by ^, followed by a Weapon Team. Weapon Team defines which team can equip the weapon in Coop/TDM. A weapon can only be assigned to one team ( 0-16 ), or all teams ( -1 ).

The list of the gun string can be found at the page below.

pageWeaponry Data

Steps

Save your inventory, then spawn back to player in same map.

Step 1: make as many guns as you wish.

Step 2: add a trigger to save inventory, and another one to load inventory.

If you don't know the variables, go check the tutorial:

Step 3: add 2 activation region to bind each trigger.

Step 4: save the map and test it.

Scenarios

Scenario 1: player D-10881 grabbed a rifle and a pistol and press save. Then throw everything away, and press load.

player D-10881 saved again and this time press load without throwing anything.

Proved that it does no relation whether the player holding same weapon or not.

Scenario 2: Player D-10882 press save, then grab a shark, press load.

Proved that this system works.

Saves your inventory, then loads on other map.

Step 1: keep the tutorial above, then add engine mark to enable var sync.

Step 2: add session var save on first trigger (save inventory).

Step 3: on the second map, load the session var and spawn at the same time:

Step 4: save the map and test it. (remember to add the trigger to switch to next map ID).

Don't forget to add a timer to auto enables the load inventory, otherwise there's no activation to work with.

Reasons to know gun string in this tutorial

This is because sometimes we need to change the weapon, or the weapon level during save the inventory, so it may the reason why we want to change the weapons.

Last updated