OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma3 - Editing/Scripting Multiplayer => Topic started by: Mad Pup on 17 Aug 2015, 20:34:57

Title: Resizing a Trigger
Post by: Mad Pup on 17 Aug 2015, 20:34:57
Exactly what the title says.

I know I used to do it in OFP, but I can't remember the code. I've tried searching around for an answer, but can't seem to find one.

The trigger (named "trigkz") is a zone restriction, and at a certain point after aprox. 10 minutes, I want the trigger to move to a different location (a trigger, 0x0, named "kz0").

Thanks in advance,
~Mad Pup

Side note: also, is it possible to resize at trigger via .sqf?

EDIT: OKAY I figured out how to move it  :good: SO, for those who have the same question:

Code: [Select]
vehicle trigkz setPos getPos kz0
Although, I still am curious about the "Side Note" above, re-sizing a trigger via the .sqf. So I've renamed the Subject from "Moving a Trigger" to "Resizing a Trigger".  :D
Title: Re: Resizing a Trigger
Post by: SoldierEPilot on 18 Aug 2015, 07:16:35
'bout moving: it's must also work without "vehicle" command
Code: [Select]
trigkz setPos getPos kz0
'bout resizing, changing trigger side, etc:
 in PBOed missions, editable missions placed to "Missions/MPMissions" folder
and campaigns you can clone existing triggers

Code: [Select]
trigkz saveStatus "Sample"
trigkz2="EmptyDetector" createVehicle somePos
trigkz2 loadStatus "Sample"

So ALL params of trigkz (AFAIK without position) will be copied to trigkz2.

You can also just use several similar triggers of different sizes
store 'em at [0, 0, 0] and switch dynamically via sqs/sqf...

I see no other workarounds in OFP.


Title: Re: Resizing a Trigger
Post by: h- on 18 Aug 2015, 09:11:09
Soldier is right, no need for the 'vehicle' when setpossing a trigger.

Resizing a trigger is easy, use setTriggerArea (http://www.ofpec.com/COMREF/index.php?action=details&id=744&game=All) (assuming this is indeed for Arma3 and not OFP)..
Title: Re: Resizing a Trigger
Post by: SoldierEPilot on 18 Aug 2015, 19:57:10
Quote
assuming this is indeed for Arma3 and not OFP
My apologies, it's because of magic word "OFP" in the second line of request :)

+50c:  there are 6 setTrigger* commands in ARMA-3

Title: Re: Resizing a Trigger
Post by: Mad Pup on 20 Aug 2015, 21:54:35
Quote
it's must also work without "vehicle" command

Huh... when testing, I couldn't get it to move without the "vehicle" part. Weird... Anywho it moves  :D

Thank you h- for the SetTriggerArea command... didn't know that was a thing.

On Another Note: This a mp mission on Stratis. And about every 5 minutes the "play zone" shrinks. No problems, anyone not in the zone when the timer is up, dies. But I have multiple warnings. One for 5 minutes, 2 minutes, and 60 seconds. I've used this code to display the warnings:

Code: [Select]
["In 5 (FIVE) Minutes, Play Will Be Reduced To The Red Circle Marked On Your Map! If You Are Not Within This Circle When Play Is Reduced, You Will Be Killed!"] spawn BIS_fnc_dynamicText;
sleep 180;
["In 2 (TWO) Minutes, Play Will Be Reduced To The Red Circle Marked On Your Map!"] spawn BIS_fnc_dynamicText;
sleep 60;
["In 60 SECONDS, Play Will Be Reduced To The Red Circle Marked On Your Map!"] spawn BIS_fnc_dynamicText;
sleep 60;
["PLAY HAS BEEN REDUCED! If You Are Outside The Red Circle Right Now, You Are Going To Be Killed!"] spawn BIS_fnc_dynamicText;

Now during testing, with another player and I in a LAN server, my computer was the only one receiving the warnings (my computer being the server). So any way I can fix this? I used the dynamicText because it was relatively large text in the middle of the screen.

Once again, Thanks in advance.

~Mad Pup
Title: Re: Resizing a Trigger
Post by: h- on 21 Aug 2015, 07:12:45
Ah, so if this is MP then this is a bit in a wrong place, moving :P :cop:

Anyhoo, BIS are currently doing some changes to the MP side of stuff, and I'm not at all familiar with the MP side anyway, but probably the easiest way is to use BIS_fnc_MP, this should work I guess:
Code: [Select]
[["In 5 (FIVE) Minutes, Play Will Be Reduced To The Red Circle Marked On Your Map! If You Are Not Within This Circle When Play Is Reduced, You Will Be Killed!"],"BIS_fnc_dynamicText",true] call BIS_fnc_MP;
Title: Re: Resizing a Trigger
Post by: Mad Pup on 21 Aug 2015, 22:14:53
There we are! Works perfectly!

Thanks once again h-!

Now to finish the editing... Have probably 24+ hours into it  :blink: :goodnight:
Title: Re: Resizing a Trigger
Post by: h- on 21 Aug 2015, 22:44:46
24 hours is nothing  :D

Anyway, glad to help, that's why this desolate site is here for...