Home   Help Search Login Register  

Author Topic: Condition  (Read 729 times)

0 Members and 1 Guest are viewing this topic.

Offline GomerPyle

  • Members
  • *
  • OFPEC rocks.....
Condition
« on: 27 Feb 2003, 00:59:23 »
I have 3 objectives. When they are completed i want this other trigger activate (condition i dont know) and make a scud launch after 20 minutes. (So you have 20 minutes after all the objectives are gone to track him down)

And if i use placement radius of this scud to cover the whole map (with sea) is it possible that it will spawn over the sea?? any way to avoid that if it does???

Thx in advance......

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Condition
« Reply #1 on: 27 Feb 2003, 01:10:15 »
4 variables

obj1
obj2
obj3
obj4

each gets set to true when the relevant objective is completed.    I'm assuming obj4 is the one that will prevent the scud from firing.     You'll need to set all these variables to false in init.sqs.   Now a trigger

Countdown:     1200     1200     1200
condition:   obj1 and obj2 and obj3 and (not obj4)
on activation:    [] exec "launchscud.sqs"



The scud could indeed spawn over the sea, which would be a bad thing.      It could also spawn inside a building.   Bad.

Better to place markers in several good locations.     In groups or synchro mode, can't remember which, drag and drop a line from each marker to the scud.    Try a few Previews ..... does that help?


Alternatively, identify some large safe areas and have a unit with a large placement radius spawn in each area at the start of the mission.      Use some kind of random thing to choose one of the units.      getpos setpos the scud to the position of the unit.    deletevehicle all the units and bingo, there you have it.


« Last Edit: 27 Feb 2003, 01:36:08 by macguba »
Plenty of reviewed ArmA missions for you to play

Offline GomerPyle

  • Members
  • *
  • OFPEC rocks.....
Re:Condition
« Reply #2 on: 27 Feb 2003, 01:35:48 »
The placement thing worked. But not the objective.

What kind of trigger do you need?

Switch?

the trigger that says that the objective got this:

condition: this
on activation: "1" objstatus "DONE"; obj1 = true;

the trigger that says that the scud will fire in 20 minutes says

Countdown:    1200    1200    1200
condition: obj1 and (not obj4)
[] exec "launchscud.sqs"

i tested it with putting countdown 5 5 5

Did not work...... Nothing happend.

I know that the obj1 was done aswell... (have text effect on it)

Thx in advance it you can help me here :)

Where do you tell the variables? The objective is a house (object id)
« Last Edit: 27 Feb 2003, 01:37:19 by GomerPyle »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Condition
« Reply #3 on: 27 Feb 2003, 01:44:20 »
Did you write

obj1=false
obj4=false

in init.sqs?      You don't always have to but in this case its essential, for the obj4 anyway.     If the game encounters an undefined variable then it fails to process the entire logic string.     In other words, if obj4 is undefined when the game tries to read the expression obj1 and (not obj4), it will ignore the whole expression and your trigger won't fire.

trigger type doesn't matter
obj1=true is correct


For testing purposes, I'd use

hint "this works"

rather than launching a script ... makes it easier to find out where the problem is.
Plenty of reviewed ArmA missions for you to play

Offline GomerPyle

  • Members
  • *
  • OFPEC rocks.....
Re:Condition
« Reply #4 on: 27 Feb 2003, 01:53:35 »
Thank you very much macguba. To put obj1=false,obj2=false,ob3=false helped....  



::) :o ::)