I very confuse...

Hello everyone! :slight_smile: I now very confuse on variables, and pick up system… :confused:

How to set ammo & damage?(I just know they are use global variables>value of variable…Anyone can show me example?)

How to display ammo and health interface?(I don’t know how to let them follow on player screen.)

Pick up system is no use pathfinding?(I can’t no pick up pistol…)

How to hide fire & reloading animation before no pick up pistol?(I have no pistol but I can fire…)

Just show me examples like conditions: xxxx, action: xxxx; all object> xxx> xxx(conditions), global variables> xxx> xxx(actions). :wink:

To set a global variable to a value, you just use Do = 5 to GlobalVariable(health) for example. Although, you might want different ammo per player, in which case you want this code instead:


This tutorial shows how to display text on the screen (it shows how to display score, but you can use the same method to display health or anything). Place that text on a separate layer if you’re moving the camera around and then it will stay in place.

There is no pickup system. You need to code this yourself. Something like:

If key g is pressed Delete object pistol Player is in collision with pistol : Do = 1 to Variable pistol of player

If player.Variable(pistol) = 1 : (code to play animations for shooting, and fire bullets)

No, you rather do :

Do = 5 to the global variable health

(you don’t use the expression GlobalVariable !).