Jump to content
Wiki

Activate trigger with demo charge or satchel charge

Recommended Posts

Hi guys.

 

How can I activate a trigger by putting a demo charge or satchel charge please?

 

I need to make the objective "place the charge" on a specific spot.

The, when the player places it, the objective gets complete.

 

Thanks a lot.

Share this post


Link to post
Share on other sites

Trigger : shape and size useless

Type : None

Activation None

Condition :

!isNull nearestObject [thisTrigger, "SatchelCharge_Remote_Ammo"]

for both

!isNull nearestObject [thisTrigger, "SatchelCharge_Remote_Ammo"] || !isNull nearestObject [thisTrigger, "DemoCharge_Remote_Ammo"]

Hard coded radius is 50 meters.

Share this post


Link to post
Share on other sites

Ok, I'll try it ASAP, thanks.

Do you know how to change the radius value?

Thanks

Share this post


Link to post
Share on other sites

i would assume

(0< ((typeOf _x == "SatchelCharge_Remote_Ammo") or (typeOf _x =="DemoCharge_Remote_Ammo")) count _thislist)

should work for all objects in trigger radius

Share this post


Link to post
Share on other sites

Trigger : shape and size useless

Type : None

Activation None

Condition :

!isNull nearestObject [thisTrigger, "SatchelCharge_Remote_Ammo"]

for both

!isNull nearestObject [thisTrigger, "SatchelCharge_Remote_Ammo"] || !isNull nearestObject [thisTrigger, "DemoCharge_Remote_Ammo"]

Hard coded radius is 50 meters.

 

Thanks, it works! :)

But sill, no idea about how to decrease the radius value... :(

 

i would assume

(0< ((typeOf _x == "SatchelCharge_Remote_Ammo") or (typeOf _x =="DemoCharge_Remote_Ammo")) count _thislist)

should work for all objects in trigger radius

 

Sry, doesn't work:

it says there is a local variable in global space :(

Share this post


Link to post
Share on other sites

it could be thislist idk just try!

the logic should be ok. issue should be syntax i wont check that i m on phone...

Share this post


Link to post
Share on other sites

Create a trigger
Group it with player

Set to activate on PRESENT

Add code:

(inArea command might not be in stable yet)

//CONDITION:

this && {
	{
		if (
			typeOf _x in ["SatchelCharge_Remote_Ammo", "DemoCharge_Remote_Ammo"] && 
			{_x inArea thisTrigger}
		) 
		exitWith {1}
	} 
	count detectedMines side player > 0
}


//ON ACT.

hint "BOOM"

Share this post


Link to post
Share on other sites

@killzone_kid could u explain why urs is a better solution than mine please? i d like to learn something...

Share this post


Link to post
Share on other sites

It's a bit more optimized and doesn't rely on the list of the trigger.

Share this post


Link to post
Share on other sites

@killzone_kid could u explain why urs is a better solution than mine please? i d like to learn something...

 

Mine works yours doesn't ;). Placed charges are not detected by the trigger detector so thisList will be [].

  • Like 1

Share this post


Link to post
Share on other sites

 

Create a trigger

Group it with player

Set to activate on PRESENT

Add code:

(inArea command might not be in stable yet)

//CONDITION:

this && {
	{
		if (
			typeOf _x in ["SatchelCharge_Remote_Ammo", "DemoCharge_Remote_Ammo"] && 
			{_x inArea thisTrigger}
		) 
		exitWith {1}
	} 
	count detectedMines side player > 0
}

 

Do I add all this in "condition" of the trigger?

 

Cause right now, doesn't work, I got error message... :(

Share this post


Link to post
Share on other sites

it could be thislist idk just try!

the logic should be ok. issue should be syntax i wont check that i m on phone...

 

 

It's thisList, no "_"

 

So, I tried this one with "thislist" instead of "_thislist", and doesn't work either.

Share this post


Link to post
Share on other sites

So, I tried this one with "thislist" instead of "_thislist", and doesn't work either.

KK covered the reason why it won't work:

 

Placed charges are not detected by the trigger detector

Share this post


Link to post
Share on other sites

If the KK code is not working for you, you could try use trigger size and Bis_fnc_Intrigger.

 

[thisTrigger, object] call BIS_fnc_inTrigger // returns true if the object is inside trigger.

Share this post


Link to post
Share on other sites

KK covered the reason why it won't work:

 

Oh ok, sry I didn't catch / understand this :)

 

If the KK code is not working for you, you could try use trigger size and Bis_fnc_Intrigger.

 

[thisTrigger, object] call BIS_fnc_inTrigger // returns true if the object is inside trigger.

 

Ok, I'll try.

So, I just need to write this in the condition window of the trigger?

 

"[thisTrigger, DemoCharge_Remote_Ammo] call BIS_fnc_inTrigger"

Share this post


Link to post
Share on other sites

[thisTrigger,_x] call BIS_fnc_inTrigger
Replace in KK's at:

_x inArea thisTrigger

Share this post


Link to post
Share on other sites

[thisTrigger, DemoCharge_Remote_Ammo] call BIS_fnc_inTrigger

 

Not like that.

 

Place trigger 10x10

Type none

Activation none

 

in Condition place this code:

bomb = nearestObject [thisTrigger, "SatchelCharge_Remote_Ammo"];
bomb2 = nearestObject [thisTrigger, "DemoCharge_Remote_Ammo"];
bombset = false;

if (!isNull bomb) then {

	
	if ([thisTrigger, bomb] call BIS_fnc_inTrigger) then {
	bombset = true;
	};
bombset
};

if (!isNull bomb2) then {

	if ([thisTrigger, bomb2] call BIS_fnc_inTrigger) then {
	bombset = true;
	};
	
bombset
};

Clunky but works.

 

PS:

 

[thisTrigger,_x] call BIS_fnc_inTrigger
Replace in KK's at:

_x inArea thisTrigger

 

That would be best solution i think.

Share this post


Link to post
Share on other sites

 

Not like this.

 

Place trigger 10x10

Type none

Activation none

 

in Condition place this code:

bomb = nearestObject [thisTrigger, "SatchelCharge_Remote_Ammo"];
bomb2 = nearestObject [thisTrigger, "DemoCharge_Remote_Ammo"];
bombset = false;

if (!isNull bomb) then {

	
	if ([thisTrigger, bomb] call BIS_fnc_inTrigger) then {
	bombset = true;
	};
bombset
};

if (!isNull bomb2) then {

	if ([thisTrigger, bomb2] call BIS_fnc_inTrigger) then {
	bombset = true;
	};
	
bombset
};

Clunky but works.

 

PS:

 

 

 

 

That would be best solution i think.

 

It does work perfectly!!!

 

Thanks a lot guys!!!

I'll be able to do what I want, thanks to you!!

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

×