Home   Help Search Login Register  

Author Topic: Can't get rid of spawned IR Strobes  (Read 1882 times)

0 Members and 1 Guest are viewing this topic.

Offline Zipper5

  • BIS Team
  • ****
Can't get rid of spawned IR Strobes
« on: 16 Sep 2010, 16:21:19 »
In a mission I'm working on I've set it up so that 4 IR strobes in the shape of a square mark the LZ for units high above the ground if they look through their NVGs. Now, since this is in enemy territory and the enemy could easily have NVGs themselves, the guy who set them up will want to get rid of them at the earliest convenience. Here's what I did to create them:
Code: [Select]
strobe1 = "IRStrobe" createVehicle getMarkerPos "IR1";
strobe2 = "IRStrobe" createVehicle getMarkerPos "IR2";
strobe3 = "IRStrobe" createVehicle getMarkerPos "IR3";
strobe4 = "IRStrobe" createVehicle getMarkerPos "IR4";
And when I want him to walk around and look like he's actually removing them himself, I use this script called when he reaches each waypoint:
Code: [Select]
_taker = _this select 0;
_strobe = _this select 1;

_taker disableAI "ANIM";
_taker disableAI "MOVE";
_taker playMove "AmovPercMstpSlowWrflDnon_gear";

waitUntil {animationState _taker == "AmovPercMstpSlowWrflDnon_gear"};

sleep 1;

//deleteVehicle _strobe;
_strobe setDamage 1;

_taker enableAI "ANIM";
_taker enableAI "MOVE";
And is called by:
Code: [Select]
null = [<unit name>, <strobe name>] execVM "takeIRStrobe.sqf";I've double and triple checked to see that the way I'm calling the script is correct, and no errors appear as a result of running the script. The issue is that the IR strobe won't go away no matter if I use deleteVehicle or setDamage. The blinking light always remains.

So basically, I'm wondering if anyone has any idea how you're supposed to get rid of them? Or do you figure BIS hasn't really taken into account the idea of getting rid of them? If that's the case I'll probably create a ticket about it on the CIT.

Thanks in advance! :D

Offline F2kSel

  • Members
  • *
Re: Can't get rid of spawned IR Strobes
« Reply #1 on: 16 Sep 2010, 23:56:26 »
Nothing wrong with your script, the strobe does get deleted but it's light remains.   

Even if you move the strobe or place it underground it's light remains.

I'd have to say it's a bug.

Offline Zipper5

  • BIS Team
  • ****
Re: Can't get rid of spawned IR Strobes
« Reply #2 on: 17 Sep 2010, 08:16:39 »
Bah, just what I was afraid of. Guess it's time to create a ticket on the CIT.

Edit: Created.
« Last Edit: 17 Sep 2010, 09:50:41 by Zipper5 »

Offline kju

  • Members
  • *
    • PvPScene - The ArmA II multiplayer community
Re: Can't get rid of spawned IR Strobes
« Reply #3 on: 18 Sep 2010, 09:50:26 »
Just a note: 'null =' is not recommended to use.

_nul / _dump

and in init lines:

MyTag_Nul / MyTag_Dump

Offline Zipper5

  • BIS Team
  • ****
Re: Can't get rid of spawned IR Strobes
« Reply #4 on: 18 Sep 2010, 11:53:52 »
How come? I've yet to come across an issue with using null.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Can't get rid of spawned IR Strobes
« Reply #5 on: 18 Sep 2010, 15:53:32 »
Well, it's unnecessary for the same reason as using nil is. Null is the object counterpart to variable nil, after all.

I usually use nul, with a single l. :)

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Zipper5

  • BIS Team
  • ****
Re: Can't get rid of spawned IR Strobes
« Reply #6 on: 18 Sep 2010, 16:01:21 »
Guess you learn something new every day! :D

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Can't get rid of spawned IR Strobes
« Reply #7 on: 18 Sep 2010, 16:55:04 »
Nowadays it's possible to use local variables in for example trigger activation fields, so you could use something like _nil = []execVM "blaah.sqf".
This was news to me, dunno how well known feature this is :dunno:

The use of local variables seems to be limited to assigning values only; if you put in one trigger _hint = "blah" and then in a second trigger try to use hint format ["%1",_hint] you get the old "error: local variable in global space"..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Zipper5

  • BIS Team
  • ****
Re: Can't get rid of spawned IR Strobes
« Reply #8 on: 18 Sep 2010, 17:52:58 »
Yup, that error is why I have always used null. Guess I'll use local variables from now on.