Home   Help Search Login Register  

Author Topic: surprise encounter procedures programming  (Read 511 times)

0 Members and 1 Guest are viewing this topic.

BronzeEagle

  • Guest
surprise encounter procedures programming
« on: 31 Jan 2005, 17:58:52 »
Alright so you figure that in a close combat situation, you don't want your soldier to lay down and then fire, you just want him to fire so you want his setunitpos "up" going on for a certain instance, but when the enemy is far away and you're advancing on his position there needs to be some ducking and then moving so no changes should be made, so if that previous script was called there has to be something to put in the on deactivation field.  

Surprise encounters are entirely different procedures than normal flashpoint ai behaves, so hows about we create a trigger that  activates this setunitpos "up" for every unit in the squad when they spots the enemy within close range.

The only question is, what would deactivate the script?  Okay so we make an east not detected script, but do we put the name of the new script in the on deactivation field of the old script for them to go back to how we want them to behave?  
« Last Edit: 31 Jan 2005, 17:59:31 by BronzeEagle »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:surprise encounter procedures programming
« Reply #1 on: 31 Jan 2005, 18:05:06 »
Yes.   Remember to set the trigger to repeatedly.
Plenty of reviewed ArmA missions for you to play

BronzeEagle

  • Guest
Re:surprise encounter procedures programming
« Reply #2 on: 31 Jan 2005, 18:06:57 »
so the name of a trigger can be put in the on deactivation field and the trigger will understand that when this new trigger is activated to deactivate itself?  

Another question about the distance to the player.  I want to put west detected by east up top, then for the condition this and , and then put something similiar to east forces distance west forces < 20, but what do i write in that would make it east forces or even west forces and not just specific players?  
« Last Edit: 31 Jan 2005, 18:09:47 by BronzeEagle »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:surprise encounter procedures programming
« Reply #3 on: 31 Jan 2005, 18:23:31 »
What?   No, I meant call the new script (setUnitPos auto) from the deactivation field of the original trigger.     You need only one trigger, which should be attached to the group:  the easiest way is just to setpos it to the position of the group leader.    Actually you don't need scripts, just put the relevant code in the Activation and Deactivation fields.

Communication between triggers is carried out by global variables.    You can use them to turn other triggers on or off when a trigger is fired/deactivated.     The name of a trigger is just that, the name.    You need to use the name as a paramenter of a command before anything will happen.

I suspect the distance you are trying to measure is the shortest distance between any east and any west in the area.    This is messy, as you have to create an array of each and then find the distance between every pair ... then pluck out the shortest one.   By which time they've probably shot each other and you have to do it again.    You'll also risk rapid switching between one script and the other as the front enemy is detected (on), killed (off), the next guy moves up (on), he is killed (off) and so on.    

Have you thoroughly tested OFP procedures in the kind of circumstances you are considering?    They may be better than you think .... they often are.

Plenty of reviewed ArmA missions for you to play