Home   Help Search Login Register  

Author Topic: starting positons and dead bodys  (Read 978 times)

0 Members and 1 Guest are viewing this topic.

BRAVO-TWO

  • Guest
starting positons and dead bodys
« on: 01 Jan 2006, 22:39:22 »
trying to  have a vehicle and the units guarding it start in one of three possible  locations .. failing miserabaly..
any help as always will be greatly appreciated..
also can  you get enemy patrols to react upon sighting a dead body..

                     thanx and happy new year to all
                                   shark attack
                                      :cheers:

Offline dmakatra

  • Members
  • *
  • Better known as Armsty
Re:starting positons and dead bodys
« Reply #1 on: 02 Jan 2006, 01:50:56 »
1. You could group 'em buggers with a marker. However, that'll probably make them end up scattered in all three locations. I'd script it. Do a random check then setpos/createUnit the lads/vehicles where you want them.
2. Yeah. LCD made a detect body script a while back. I'd do a search in the scripting: beta testing board.

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re:starting positons and dead bodys
« Reply #2 on: 02 Jan 2006, 03:02:18 »
If your guards are in the same group, you can link them with two empty markers. Then simply SetPos the object at somewhere around the group leader.

Grunts and objects will all have their positions adjusted to that of the leader :).


As to your 2nd Q, this link could be useful. It's about hidden bodies, but it gives you the general idea.

BRAVO-TWO

  • Guest
Re:starting positons and dead bodys
« Reply #3 on: 02 Jan 2006, 16:36:14 »
thanx guys  for youre input

however the vehicle must have an exact location  and the units guarding it are not grouped .. trying to have each guard react diferently to a situation..

also   scripts  for detecting dead bodies  all seem to focus on wether or not they are buried  ..  i would like any member on the enemys side to react to the discovery of any dead body.. have tried condition not (alive unit) but it dosnt look right ..

and one more thing

trying to guarentee that if certain named russian unit is hit he will cry out (arggg)  and a trigger can be fired by this..

have  looked at the hit kill sqs in editors depot ..(usefull but not what i need)

i guess an event handler is the answer

unitname AddEventHandler ["hit",{_this exec "hit.sqs"}]

but what would i enter in my hit.sqs to force the unit to cry out..

                                thanx again  guys

                                    shark attack

Offline Igor Drukov

  • Contributing Member
  • **
  • Conscientious Subjector
Re:starting positons and dead bodys
« Reply #4 on: 02 Jan 2006, 21:35:38 »
1) Link the car wreck to the empty markers, then setpos the loons around that car wreck.
2) if you don't care about whether the bodies are buried or not, the easiest would be to use the KnowsAbout command.

In the condition line of a trigger :

Code: [Select]
(!(alive loon1) and ((loon2 KnowsAbout loon1)>1.5 or (loon3 KnowsAbout loon1)>1.5)) or (!(alive loon2) and ((loon1 KnowsAbout loon2)>1.5 or (loon3 KnowsAbout loon2)>1.5)) or (!(alive loon3) and ((loon1 KnowsAbout loon3)>1.5 or (loon2 KnowsAbout loon3)>1.5))
That should do the trick.

3) Another trigger, condition :

Code: [Select]
loon1IsHit
In the init line of loon1 :

Code: [Select]
this addEventHandler [{Hit},{loon1IsHit=true}]

You might want to take a look at KeyCat's GroupLinkII. It'll do exactly what you want, and even more :).




P.S. : previewing the post... the variable is LOON1-IS-HIT not LOON1I-SH*T  :-X

BRAVO-TWO

  • Guest
Re:starting positons and dead bodys
« Reply #5 on: 03 Jan 2006, 12:49:36 »
thanx igor..looking into it



                                           regards
                                        shark attack