Home   Help Search Login Register  

Author Topic: Resizing a Trigger  (Read 4341 times)

0 Members and 1 Guest are viewing this topic.

Offline Mad Pup

  • One Who Asks A Lot.
  • Members
  • *
  • OFPEC Is Awesome
Resizing a Trigger
« 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
« Last Edit: 18 Aug 2015, 04:40:02 by Mad Pup »
"The object of war is not to die for your country, but to make the other poor bastard die for his" - General Patton
[SH]MadPup
[SH]Squad

Offline SoldierEPilot

  • Members
  • *
Re: Resizing a Trigger
« Reply #1 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.



Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Resizing a Trigger
« Reply #2 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 (assuming this is indeed for Arma3 and not OFP)..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline SoldierEPilot

  • Members
  • *
Re: Resizing a Trigger
« Reply #3 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


Offline Mad Pup

  • One Who Asks A Lot.
  • Members
  • *
  • OFPEC Is Awesome
Re: Resizing a Trigger
« Reply #4 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
"The object of war is not to die for your country, but to make the other poor bastard die for his" - General Patton
[SH]MadPup
[SH]Squad

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Resizing a Trigger
« Reply #5 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;
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Mad Pup

  • One Who Asks A Lot.
  • Members
  • *
  • OFPEC Is Awesome
Re: Resizing a Trigger
« Reply #6 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:
"The object of war is not to die for your country, but to make the other poor bastard die for his" - General Patton
[SH]MadPup
[SH]Squad

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Resizing a Trigger
« Reply #7 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...
« Last Edit: 23 Aug 2015, 07:20:31 by h- »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.