Home   Help Search Login Register  

Author Topic: entire side called  (Read 1128 times)

0 Members and 1 Guest are viewing this topic.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
entire side called
« on: 02 Jan 2005, 03:56:49 »
i want a script that kills off all east in example
how would i do that like so

1 init thing that goes in the folder w/ the mission

Code: [Select]
eastys = side east
"[_x] exec kiled.sqs" foreach{eastys}
then the script that also goes w/ the mission
Code: [Select]
killed.sqs
_deadman = this select 0
deadman setdammage 1
exit

can sombody explain how i would do this

im not sure what to put here
Quote
eastys = side east

does side east work for getting an array of all east units

thanks

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:entire side called
« Reply #1 on: 02 Jan 2005, 04:07:38 »
no, what you need is a trigger, and only a trigger
heres what you do:
Trigger:east present
size:whole map
condition: this and whatever you want to trigger it
on activation:"_x setdammage 1" foreach units thislist

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:entire side called
« Reply #2 on: 02 Jan 2005, 04:20:08 »
 :)but i need to do it like that

its actualy a different script but i need to do it in that way, i would do a trigger if i could but u cant do it with this type of script ??? ;D

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:entire side called
« Reply #3 on: 02 Jan 2005, 04:25:22 »
i don't see why you can't, what is stopping you?

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:entire side called
« Reply #4 on: 02 Jan 2005, 08:25:11 »
Wth??
This is one of the basic things...

You make trigger, size thewhole map.
Activated by East Present
Condition: this
On Activation: eastys=thisList

now the global variable 'eastys' includes all East 'siders'... (vehicles are concidered as one altough there's more peeps inside it)

Then you can apply the 'killed.sqs' on all of them as you described... (altough vehicle crew and cargo won't get it...)

And I don't see why you couldn't use a trigger because if this is mission trigger usage is possible and highly probable ;) ::)
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Silencer

  • Guest
Re:entire side called
« Reply #5 on: 02 Jan 2005, 12:51:50 »
Hey guys,

Can you please explain to me how thislist works?
How can you say who is in thislist?  ???

Thanks  ;D

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:entire side called
« Reply #6 on: 02 Jan 2005, 13:15:32 »
@Penguinman:
does side east work for getting an array of all east units?
Code: [Select]
eastys = side east
No,the side command only checks,not calls.
side player returns east if you are an east player,it doesnt make U an east unit.

@Silencer:
Thislist is an array of everything that forfills  a trigger condition.

http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

Silencer

  • Guest
Re:entire side called
« Reply #7 on: 02 Jan 2005, 13:41:49 »
How can you tell who is in the array?

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:entire side called
« Reply #8 on: 02 Jan 2005, 16:38:07 »
by how you make the trigger activated
'east present'
'west present'
'anybody present'
etv

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:entire side called
« Reply #9 on: 02 Jan 2005, 19:06:50 »
The outcome depends ofcourse on your triggerconditions.

U can see the array with:hint format ["%1",thislist] in the on activation field.
http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:entire side called
« Reply #10 on: 02 Jan 2005, 22:35:22 »
yes the player is on the east side!

so i can use side player

but how would it go in this

eastys = side east
"[_x] exec kiled.sqs" foreach{eastys}

like this

eastys = side player
"[_x] exec kiled.sqs" foreach{eastys}

Offline Platoon Patton

  • Members
  • *
  • "Barbecue" CreateVehicle getpos LLama
Re:entire side called
« Reply #11 on: 02 Jan 2005, 23:25:50 »
Code: [Select]
eastys = side playerNo that aint working,the result is simply :eastys = east (assuming player is Russian)
East only tells u a side,it doesnt give u all east units..

All u need is an array,like hater_kint explained,returned from a:
Trigger East present,condition this,and in the on activation:
"[_x] exec kiled.sqs" foreach{thislist}"



http://www.platoon-clan.com/ We always wellcome dedicated OFP players :)

http://www.european-combat-league.com/index.php To play with us in the best OFP league ;)

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:entire side called
« Reply #12 on: 03 Jan 2005, 05:27:53 »
ok ok but i cant use a trigger at all, ;)
how do i do it w/ out a trigger

its to hard to explaing but the script is called right when the mission starts automaticly so a trigger wont work

thanks

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:entire side called
« Reply #13 on: 03 Jan 2005, 05:50:48 »
ah, but it will
whenever you need the list, set a variable to true, that variable being the condition for the trigger. have the trigger set to repeatedly, and make the variable false immediately after

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:entire side called
« Reply #14 on: 03 Jan 2005, 06:10:42 »
hmm

il try it

but the script needs all the units it will be run on to be entered in the trigger like so


[m1,m2,m3,m4,m5,m6,m7]exec "kill.sqs"

so will this list still work