Game Development Community

Picking up objects and stoppping firing

by DIAG · in Torque Game Engine · 01/12/2004 (3:11 am) · 1 replies

Hello,
I have created an pickup in the game which stops people from being able to fire. however, when 1 player picks it up, all players cannot fire. how would you go about settin so that only the player which picked up the object cannot fire, but others can?
thanks for your help

edit: would this have to be done in the source or in script?

#1
01/12/2004 (7:00 am)
Hm.

I guess you are setting a flag on your PlayerData datblock, to prevent fireing, do you?
DataBlocks affect all instances of a class, e.g. all players.

You have to set a flag on your Player instance. This only affects the instance in question.

E.g. in your item script:

function ItemData::onPickup(%this,%obj,%user,%amount)

Set your flag on %user.


-- Markus