Blockland Forums > Modification Help
VCEPrints, how do you make it refresh when you fire any weapon?
(1/2) > >>
Kiwi:
I'm working on my modification of a weaponpack with ammo.
Whenever I shoot I want to make VCEPrint refresh, so it always shows the actual ammo amount.
I tried this but without any success.

--- Code: ---function Image::onFire(%this,%obj,%slot)
{
Parent::onFire(%this,%obj,%slot);
%this.client.VCEPrints();
}
--- End code ---
If possible, can you make it so that it will refresh with any weapon?
Bauklotz:
1> Well, %this is the Image, the datablock. Use %obj.client - %obj is the image OBJECT.
2> The classname of weapon datablocks are not 'Image', but 'shapeBaseImageData'.
3> Does GameConnection::VCEPrints exist?
4> Some weapons have special firing methods, and some don't. For some weapons you need a package, for some you don't. For some you need a completely diffirent method of 'detecting fire'.
phflack:
i thought that VCE prints already updated when you click/toggleweapons
Bauklotz:

--- Quote from: phflack on December 24, 2010, 10:24:33 AM ---i thought that VCE prints already updated when you click/toggleweapons

--- End quote ---
what the forget are VCE prints.
Deathwishez:

--- Quote from: phflack on December 24, 2010, 10:24:33 AM ---i thought that VCE prints already updated when you click/toggleweapons

--- End quote ---

No, they don't.

VCEPrints only updates on certain triggers, as opposed to my version, HUDPrints, which updates every 100ms.
Navigation
Message Index
Next page

Go to full version