Home   Help Search Login Register  

Author Topic: quick question  (Read 410 times)

0 Members and 1 Guest are viewing this topic.

blutacis

  • Guest
quick question
« on: 30 Nov 2003, 17:03:42 »
hi, i wonder if someone could point out my error
im trying to activate a waypoint only when 4 conditions have been met...let me explain
i have 4 inf groups and 4 seperate helos (not grouped)
the inf groups each have a waypoint to getin respective helos, and i want the next waypoint of each helo only to be activated when all inf groups have got in helos

im trying to do this by putting
heloloaded = heloloaded + 1
in each of the getin waypoints of the inf groups (in the "on activation" fields)

and
heloloaded == 4
in the condition field of the next waypoint for each helo

but it doesnt work =/ could someone explain why?
many thanks

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:quick question
« Reply #1 on: 30 Nov 2003, 17:38:25 »
As a general principle, what you are doing should work.   However, I would recommend a slightly different approach.    Instead of adding to a variable,  use four seperate variables.   Apart from anything else, when it comes to debugging it makes it easier to see what's going on.   For example, if one of the choppers is causing a problem it's easier to see which one.

so instead of heloloaded = heloloaded +1 you would have

helo1 = true

and so on.   The choppers should have a load waypoint synchroed with the getin waypoints.   In the condition field of this waypoint you would have

helo1 and helo2 and helo3 and helo4

Remember that if the game meets an undefined variable it treats the whole expression as false.  (To define a variable you could put var1=true or var1=0 in your init.sqs.)

That may not work, the combination of the variables and the synching may create a circular argument... can't remember.

If it doesn't work tell us more about what's going wrong.  "It doesn't work" doesn't give us much to go on.
« Last Edit: 30 Nov 2003, 17:47:30 by macguba »
Plenty of reviewed ArmA missions for you to play