POWERUP_ON
Program Statements
Prg_POWERUP_ON.html

Name

POWERUP_ON - activate a powerup object

Synopsis

### POWERUP_ON i e 0 0 0

Availability

all GTA Demos, GTA Full Version

Description

This statement (re)activates a powerup object that has been placed on the map with a POWERUP object code.

Parameters

###

line number

i

POWERUP object index

e

End flag:

0 = continue execution with the next line
-1 = end of this routine

0 0 0

usually =0


Usage:

For every POWERUP in part 1 of MISSION.INI there should be at least one POWERUP_ON in part 2 that refers to it. Powerups that have been taken by the player can be restituted with this statement.

Examples

Object Codes


271 (70,85,4) POWERUP 2 500
Machine Gun, Kill Frenzy 20 secs ?
272 (141,208,4) POWERUP 2 700
Machine Gun, Kill frenzy 30 secs ?
273 1 (70,85,4) TRIGGER 9000 0
Triggers messages etc.
274 1 (141,208,4) TRIGGER 9080 0
Triggers messages etc.
276 (140,25,4) POWERUP 1 99
Pistol with 99 shots ammunition
520 (196,223,4) POWERUP 14 9
Info Sign with text [help9]


Script Statements


9000 ff.
Code for frenzy message and other stuff
9080 ff.
Code for frenzy message and other stuff
30470 POWERUP_ON 271 0 0 0 0
activate machine gun powerup
30480 POWERUP_ON 272 0 0 0 0
activate machine gun powerup
30481 POWERUP_ON 276 0 0 0 0
activate pistol powerup
30505 POWERUP_ON 520 0 0 0 0
activate info sign powerup

(example source: full game, section [1])

See also

Program Statements Overview, Powerup Howto, IS_POWERUP_DONE, POWERUP

Notes

Information contributed by ZyNTaX, schu, and Michael Mendelsohn.

Bugs

The meaning of the last four parameters is still unclear. schu claimed that e=-1 for the last powerup statement, but in section [1] of MISSION.INI in the full version there is no POWERUP_ON with e=-1.


MISSION.INI

Last change: 17 Dez 1997

unofficial GTA Reference