Jump to content
Play3r

( SOLVED) how do i delete a B_IRStrobe that have been created by CreateVehicle

Recommended Posts

strobe = "B_IRStrobe" createVehicle position ammobox;
strobe attachTo [ammobox, [0, 0., 0.40]];

Ammobox is a standard B_supplyCrate_F that have been given the variabelName AmmoBox 

 

This have made with at trigger that activeds 10 sec in game so the player can see the ammobox from the sky.

i want to delete the Strobe when the player is inside the trigger that is around the ammobox,

but if i use the DeleteVehicle command and write in Act of the trigger: DeleteVehicle Strobe; 

It does not delete the Strobe.

Can someone tell me what i do wrong ??

 

Share this post


Link to post
Share on other sites

The insidious thing about IR strobes is that you can (as you have in your trigger) delete the actual grenade, but the pulsing effect is its own separate entity. You can see this easily by creating an IR strobe on the ground. Then when you delete the strobe you can clearly see that the actual object is gone but the effect continues.

The easiest solution to your problem would be to create only the separate effect entity and attach that the box:

strobe = "NVG_TargetC" createVehicle position ammobox;
strobe attachTo [ammobox, [0, 0, 0.4]];

//trigger
deleteVehicle strobe;

Here is an alternative that will still allow you to have the actual physical grenade present:

strobe = "B_IRStrobe" createVehicle position ammobox;
strobe attachTo [ammobox, [0, 0, 0.4]];

//trigger
_list = position ammobox nearObjects ["NVG_TargetC",3]; 
{deleteVehicle _x} forEach _list;

 

  • Like 1

Share this post


Link to post
Share on other sites

I'd do something like this:

strobe = "B_IRStrobe" createVehicle position ammobox;
strobe attachTo [ammobox, [0, 0., 0.40]];

//delete strobe and light fx:
_delete = [] spawn {
	sleep 5;
	_fx = attachedObjects strobe;
	{
		deleteVehicle _x
	} forEach (_fx + [strobe]);
};

Cheers

  • Like 2

Share this post


Link to post
Share on other sites
3 hours ago, Reeveli said:

The insidious thing about IR strobes is that you can (as you have in your trigger) delete the actual grenade, but the pulsing effect is its own separate entity. You can see this easily by creating an IR strobe on the ground. Then when you delete the strobe you can clearly see that the actual object is gone but the effect continues.

The easiest solution to your problem would be to create only the separate effect entity and attach that the box:


strobe = "NVG_TargetC" createVehicle position ammobox;
strobe attachTo [ammobox, [0, 0, 0.4]];

//trigger
deleteVehicle strobe;

Here is an alternative that will still allow you to have the actual physical grenade present:


strobe = "B_IRStrobe" createVehicle position ammobox;
strobe attachTo [ammobox, [0, 0, 0.4]];

//trigger
_list = position ammobox nearObjects ["NVG_TargetC",3]; 
{deleteVehicle _x} forEach _list;

 

 

3 hours ago, Grumpy Old Man said:

I'd do something like this:


strobe = "B_IRStrobe" createVehicle position ammobox;
strobe attachTo [ammobox, [0, 0., 0.40]];

//delete strobe and light fx:
_delete = [] spawn {
	sleep 5;
	_fx = attachedObjects strobe;
	{
		deleteVehicle _x
	} forEach (_fx + [strobe]);
};

Cheers

 

Thanks to the both of you for your replies, they both work fine..

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×