Home   Help Search Login Register  

Author Topic: i need help with script!  (Read 967 times)

0 Members and 2 Guests are viewing this topic.

Offline dancuc

  • Members
  • *
i need help with script!
« on: 10 May 2007, 16:25:56 »

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: i need help with script!
« Reply #1 on: 13 May 2007, 22:38:25 »
if you make the units you don't want to be shot at you can do the following in the units init line.
Quote
this setcaptive true

The enemy will not shoot them.

You may also want to check out the Distance Command.
« Last Edit: 13 May 2007, 22:49:35 by JasonO »

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: i need help with script!
« Reply #2 on: 15 May 2007, 21:54:26 »
1) Add the following to your init.sqs
Code: [Select]
unitsArray = [chaseunit1, chaseunit2, chaseunit3,....]where chaseunitX are the names you have given to whatever units are chasing your player. If you have placed a crewed vehicle in the editor also add it to this array.

2) Add a trigger with the following Condition
Code: [Select]
({(huntedunit distance _x) <= 1} Count unitsArray) > 0)Where huntedunit is the name of your player unit. If this is a single player mission you could substitute player for the player unit's name.

If you have many units chasing the player and they start in a separate area you could instead put a trigger that covers all the chasing units(but not the player unit), set it to fire side present once with the On Activation
Code: [Select]
unitsArray = +thislist
Then you neither need to name all the chasing units nor use the line I have given for the init.sqs
urp!