Home   Help Search Login Register  

Author Topic: Making a trigger valid by another trigger...  (Read 2360 times)

0 Members and 1 Guest are viewing this topic.

PE4

  • Guest
Making a trigger valid by another trigger...
« on: 18 Jun 2006, 14:09:17 »
Ok couldn't find this anywhere because I didn't know how to wprd the search, as such apologise if it's been answered already somewhere else!

I want a trigger to work, in this case air support, but not until a certain area has been cleared of AA. How would I do it?

I am a complete biff at this so would like some nice clear instructions if poss please! :P

Know this is probably a relatively simple thing but not up on the jargon!

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Making a trigger valid by another trigger...
« Reply #1 on: 18 Jun 2006, 14:28:23 »
first, in the init.sqs file create a global variable by typing

Code: [Select]
go_airsupport = false
create the first trigger covering the area which needs to be cleared. make the conditions for whichever side not present. in the 'on activation' box type

Code: [Select]
go_airsupport = true
create the second trigger, doesn't need any size, make its type 'switch', and in the 'condition' box type

Code: [Select]
go_airsupport
to summarize, the variable go_airsupport is initially false. as soon as the area is cleared, the trigger will set go_airsupport to true, which will cause the second trigger to activate.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Making a trigger valid by another trigger...
« Reply #2 on: 18 Jun 2006, 14:33:57 »
Please clarify your question. What would be interesting to know:

What kind of AA you have (AA Soldiers, Shilka/Vulcan, both or others)?

How many AA units are in the area?


The most simple way is, in case of a singel AA unit (nvm Soldier or tank)

Name the AA unit, as example "MyAAunit"

trigger size 0/0

in condition field:
?! (alive MyAAunit)

in on activation: whatever should happen eg starting a script ([] exec "airstrike.sqs")

with 2 or more AA units you can use this:

gieve every AA unit a name ("MyAAunit1", "MyAAunit2" and so on)

in condition field:

? (! alive MyAAunit1) AND (! alive MyAAunit2)

i guess you get the point.

PE4

  • Guest
Re: Making a trigger valid by another trigger...
« Reply #3 on: 18 Jun 2006, 15:59:32 »
Ok, what I meant was.

The player goes into an area, where he has to take out an AA unit, once the AA unit is obliterfried the option to call in an apache appears on the 0-0 menu.

The air support is not a script thing, just waits somewhere else on the map until the player calls (basically a movein order for pilot and gunner).

I just need to know how to make it so once the first trigger is activated it allows the second one to be used. No fancy stuff real basic boring crap! I know there'lll be a billy basic way of doing it (and that's the one I need!).


Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Making a trigger valid by another trigger...
« Reply #4 on: 18 Jun 2006, 16:17:10 »
hmmm....i don't think you can set up a radio trigger which appears only once the AA is dead....it will be visible from the beginning.

If it's okay if the radio is visible from the beginning you could try this:

name your AA unit, as example: myAAunit

trigger:
size: 0/0
repeatedly
radio Alpha (or whatever you like)
type: switch
codition: this AND (! alive myAAunit)

for the chopper set a few waypoints, at least one at the far side of the island, which will be his waiting point. A "move" waypoint should work, else try "hold".

Now just synchronize the trigger with this waiting waypoint.

What we've done? the trigger will only fire once the AA is destroyed and the player activated the radio 0-0-1 or whatever.
It will not fire when radio is activated but AA still alive or vice versa.

An other solution could be to action which will only be there once the aa is destroyed. But this would need scripting and is a little more complicated, but would ensure the player has the option only as soon the AA is destroyed.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Making a trigger valid by another trigger...
« Reply #5 on: 18 Jun 2006, 16:23:01 »
Quote
i don't think you can set up a radio trigger which appears only once the AA is dead....

not quite true. set up the radio trigger as normal, and in the init.sqs file put

Code: [Select]
1 setradiomsg "null"
once the AA is dead, in the 'on activation' box of whichever trigger senses the AA is dead put

Code: [Select]
1 setradiomsg "Call in Air Support"
« Last Edit: 18 Jun 2006, 16:33:20 by bedges »

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Making a trigger valid by another trigger...
« Reply #6 on: 18 Jun 2006, 16:26:48 »
...and again learned something new, thx bedges.

one question about this:

Code: [Select]
1 setradiomsg "null"

does the number refer to the radio trigger, so "1" is radio alpha, "2" is radio bravo and so on?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Making a trigger valid by another trigger...
« Reply #7 on: 18 Jun 2006, 16:32:37 »
indeed. see attached missionette.

[attachment deleted by admin]

PE4

  • Guest
Re: Making a trigger valid by another trigger...
« Reply #8 on: 19 Jun 2006, 00:30:32 »
Thanks guys! Will try this when I get into OFP again!

Thanks for helping Mr no knowledge!  ;)

Optik

  • Guest
Re: Making a trigger valid by another trigger...
« Reply #9 on: 14 Jul 2006, 03:25:03 »
i've tried this thing...unknown operator "setdamage"

 ???

TheOakster

  • Guest
Re: Making a trigger valid by another trigger...
« Reply #10 on: 14 Jul 2006, 09:29:51 »
it should be

Code: [Select]
setdammage
Note 2 m's

Ben

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Making a trigger valid by another trigger...
« Reply #11 on: 14 Jul 2006, 09:32:52 »
it can be either. bis accounted for the spelling error, although not with the getdammage command.

Quote
i've tried this thing...unknown operator "setdamage"

what script is it coming from? post here please and we'll take a look.

Optik

  • Guest
Re: Making a trigger valid by another trigger...
« Reply #12 on: 14 Jul 2006, 15:20:16 »
bedges, i've opened your example mision that you've attached to one of your posts here. i tried to edit a trigger (in editor), without changing anything, and when i click on OK, it says: unknown operator "setdamage".
if i try to enter the game, and use radio to destroy shilka, an error occurs in upper left part of the screen.

edit: setdaMMage works, tnx Ben.

another objection: when i put

1 setradiomsg "null"

i still have "Alpha" on the radio menu. i've tried this even with copying the mission in sigle missions folder, but its the same.
« Last Edit: 14 Jul 2006, 15:45:40 by Vladimir »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Making a trigger valid by another trigger...
« Reply #13 on: 14 Jul 2006, 18:16:22 »
what version of flashpoint are you running?

Optik

  • Guest
Re: Making a trigger valid by another trigger...
« Reply #14 on: 14 Jul 2006, 18:57:04 »
1.30  :-\ is that bad?