Author Topic: VCEPrints, how do you make it refresh when you fire any weapon?  (Read 771 times)

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: [Select]
function Image::onFire(%this,%obj,%slot)
{
Parent::onFire(%this,%obj,%slot);
%this.client.VCEPrints();
}
If possible, can you make it so that it will refresh with any weapon?

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'.
« Last Edit: December 24, 2010, 09:46:39 AM by Bauklotz »

i thought that VCE prints already updated when you click/toggleweapons

i thought that VCE prints already updated when you click/toggleweapons
what the forget are VCE prints.

i thought that VCE prints already updated when you click/toggleweapons

No, they don't.

VCEPrints only updates on certain triggers, as opposed to my version, HUDPrints, which updates every 100ms.

In the VCEPrints script is some code that refreshes the HUD when your score changes
Code: [Select]
function GameConnection::setScore(%this,%score) //for <var:cl:score> changes
{
%ret = Parent::setScore(%this,%score);
%this.VCEPrints();
return %ret;
}
Or your health
Code: [Select]
function Armor::onDamage(%data,%this,%damage) //for <var:pl:health> and <var:pl:damage> changes
{
%ret = Parent::onDamage(%data,%this,%damage);
if(isObject(%this.client))
%this.client.VCEPrints();
return %ret;
}
And VCEPrints are user controllable bottom or center screen prints.

When the weapon does onFire() the vce print should refresh.
Thank you Bauklotz for your reply I will try this.

HUDPrints, which updates every 100ms.
i think i'll be liking those more then, if they're released :D

i think i'll be liking those more then, if they're released :D

Hell, why not. I'll see if I can get it through RTB security.

Edit: Submitted, and awaiting approval.
« Last Edit: December 25, 2010, 04:19:19 PM by Deathwishez »

Hell, why not. I'll see if I can get it through RTB security.

Edit: Submitted, and awaiting approval.
The admins at RTB are currently sleeping or celebrating christmas, whatever.
Three of the mods at RTB stay there for nearly 2 months now.
Could you upload it to MediaFire and give us the link?