Jump to content

Recommended Posts

bomb = "Bo_GBU12_LGB" createVehicle (getpos "bombmrk");

 

 

I enter the above code into a vehicle init but it explodes straight away on mision start. I just want it to explode if it gets destroyed.

 

I did it before but can't remember how?

Share this post


Link to post
Share on other sites

Maybe something like:


 

_car = this;

waituntil { sleep 0.1; damage _car == 1 };

"Bo_GBU12_LGB" createVehicle (getpos _car);

 

 

Share this post


Link to post
Share on other sites

Alternatively:

//object initfield:
this addEventhandler ["Killed",{
	params ["_car"];
	_bomb = "Bo_GBU12_LGB" createVehicle (getpos _car);
	//to make sure it goes off correctly:
	_bomb setPosATL getPosATL _car;
	_bomb setDamage 1;
}];

Cheers

  • Like 4

Share this post


Link to post
Share on other sites
1 hour ago, CHICKENLICKEN said:

bomb = "Bo_GBU12_LGB" createVehicle (getpos "bombmrk");

 

 

I enter the above code into a vehicle init but it explodes straight away on mision start. I just want it to explode if it gets destroyed.

 

I did it before but can't remember how?


Not sure if serious. getpos "bombmrk" is not a valid expression, so whatever is created and exploded is not this bomb

  • Like 1

Share this post


Link to post
Share on other sites

Thanks GC8 and Grumpy old man. will try that.

 

 

Ps. I used :  getpos this

 

not bombmrk - made a mistake.

  • Like 1

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

×