Jump to content
Sign in to follow this  
Daikyoka

Trigger repeatdly do not deact if function used on act

Recommended Posts

Hello,

I am making a very simple repeatdly trigger that should deact when no one is in the ellipse. It works when I just hint on act/deact , but not when I spawn/call a function on. My RPT is absolutly clean and my function works and ends perfectly.

		class Item228
	{
		position[]={12793.05,5.9533463,10126.67};
		a=25;
		b=25;
		activationBy="ANY";
		repeating=1;
		interruptable=1;
		age="UNKNOWN";
		name="townTrigger";
		expCond="this && isServer";
		expActiv="hint ""act"";null = [thisTrigger, 30] spawn ScanTown;";
		expDesactiv="hint ""deact"";";
		class Effects
		{
		};
	};
};

Why is the trigger blocked ? :confused:

Thanks for help.

Share this post


Link to post
Share on other sites

I would say the problem is with the function.

Functions won't generate error messages....only normal scripts will... but I guess if you are seeing the results you want from the function... then it must work!

Out of curiosity what does ScanTown do?

Share this post


Link to post
Share on other sites

ScanTown is compiled with preProcessFileLineNumbers that indicates errors like execVM "script.sqf". I got errors and corrected them (before trying to repeat the trigger) and I put a diag_log at the end of the function, it writes.

ScanTown scan buildings in a radius and add some weapons and ammo in the building's positions.

EDIT 1 :

Out of curiosity I replaced all call statements by execVM, the trigger is repeating. Strange, so I decided to replace one by one. The script that scan a building for positions, returning an array of positions blocks the trigger using call but not using execVM because of an error with its returned value (script, need array). But I need to use its returned value. :-/

Interesting, if I put the hint after the function (or the execVM) the hint is displayed but the trigger is blocked, so the trigger isn't blocked by the function I suppose ? No error with execVM with the scanbuilding code pasted in the scantown script.

I continue to investigate. Have you an idea ?

EDIT 2 :

I have found the problem. My function put weapons and ammo in the trigger area. And so there are "people" (objects) in its area when I leave if there are ammo ad weapons. How can I setting it to do not react to that ?

Edited by Daikyoka

Share this post


Link to post
Share on other sites

I finally found the solution.

I use "player setCaptive true" that set the side of a unit to civilian. When you create weapons and ammo on the ground, they get civilian side. Like my players because of setCaptive. So there were forever civilian to activate the trigger. :-)

Thanks for your message, you put me on the good road (investigate the add weapon/ammo feature).

PS : I double post to clearly separate the solution from the problem.

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
Sign in to follow this  

×