Home   Help Search Login Register  

Author Topic: Help with code  (Read 1195 times)

0 Members and 1 Guest are viewing this topic.

Offline trooper543

  • Members
  • *
Help with code
« on: 01 Dec 2007, 05:15:24 »
Hi there all

I am looking for a bit of assistance in understanding on how to use the follwing bit of code that i found on the forum:

Code: [Select]
? ({alive _x} count units group player) == ({_x in heli1} count units group player):hint "all aboard"
When i cut and paste this into the trigger act field , i keep getting an error message

what i am trying to do is the following

i have chopper (player)  that comes into land and picks up a team
The team has a get in waypoint and the chopper has a load way sync it
where and how do i use the above code

and how do i alter it to show when they land at the dz

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: Help with code
« Reply #1 on: 01 Dec 2007, 07:18:42 »
i think it shud b sufficient 2 just sync da WPs 2 have da desirble effect... but im not sure :P

as 4 da code it shud b split in 2 wayz

1) in da condition field (da next line works 4 players group and choper named heli1... change names 4 dif vehicles/groups):

Code: [Select]
({alive _x} count units group player) == ({_x in heli1} count units group player)
2) in da activition :

Code: [Select]
hint "all aboard"
2 convert da code 2 check when they all out do

Code: [Select]
({alive _x} count units group player) == ({_x == vehicle _x} count units group player)

:D

LCD OUT
« Last Edit: 03 Dec 2007, 23:51:36 by LCD »
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline trooper543

  • Members
  • *
Re: Help with code
« Reply #2 on: 03 Dec 2007, 22:36:01 »
Thanks for the fast response LCD much apprecaited

But i still get errors

could you please guide me a little bit more

i have the way points etc and what i am trying to do is get the code to work to tell the player that all the troops are aboard and then it compltes the objective and then the player fly out to the LZ2 and unloads them and loads another squad



Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re: Help with code
« Reply #3 on: 04 Dec 2007, 00:00:24 »
lotsa things u wanna do there :P ill give u wat u need in general lines n stuff like dat ;) :D

sync a WP between da players group and da squad group.... players group wp shud b load and da squad shud b get in

next u sync a getout WP w/ transfer unload WP in some other area (on LZ2) and repeat 4 da next squad... if im not wrong it shud work smoothly....

as 4 da objective

make a triger

condition

({_x in (vehicle player)} count units groupname1) == ({alive _x} count units groupname1)

on activation

"objectivename" objstatus "DONE"

also make sure u name da group (and replace groupname1 w/ da name of da group)

2 name da group u put in init line of any of da soldiers in da group

groupname1 = group this

:D

LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline trooper543

  • Members
  • *
Re: Help with code
« Reply #4 on: 07 Dec 2007, 23:18:07 »
LCD

Thanks a lot mate i will try this out now and let know

Once again the help is much appreciated