Home   Help Search Login Register  

Author Topic: What's wrong with this code then…?  (Read 633 times)

0 Members and 1 Guest are viewing this topic.

Offline Burn

  • Members
  • *
What's wrong with this code then…?
« on: 06 Jun 2003, 06:23:40 »
Hi again ya'll :wave:... I'm back with another unexplained question for you to solve ;D... This time I think I've got a litle syntax error, why don't u clever people start waking up those gray big lumps inside u'r heads n' check this out :beat::
"_X setPos getMarkerPos Marker" forEach units agrp

I got that piece of code inserted in a trigger that is activated by me... and the trigger works, I have tested it several times...

Shouldn't this make the group named agrp get setPossed to the position of the marker named Marker... ::)  

Belive it or not, I haven't managed to find the solution for this... even when searching the forums n' faq :-[ :help:

As allways any help is greatly appreciated... :cheers:

« Last Edit: 06 Jun 2003, 06:27:45 by Bizon »

Offline LCD

  • Former Staff
  • ****
    • Everon Cartel
Re:What's wrong with this code then…?
« Reply #1 on: 06 Jun 2003, 06:40:16 »
u forgot 2 put {} around da markername :P

Code: [Select]
"_X setPos getMarkerPos {Marker}" forEach units agrp
LCD OUT
"guess being the community has downsides .." - cheetah
Help Perfecting Da Next Best Thing - O-Team Beta

Offline Burn

  • Members
  • *
Re:What's wrong with this code then…?
« Reply #2 on: 06 Jun 2003, 07:01:53 »
Thanx m8 :thumbsup:... But one hilarious thing happened to the tank group that was supposed to be setpossed... the frikkin tanks remained at the original position, while only the crew where setpossed to the marker :o... is that normal :hmm: :noo:... N' how do I get them to stay in their tanks ???...

 :help:Thanks in advance :cheers:

deaddog

  • Guest
Re:What's wrong with this code then…?
« Reply #3 on: 06 Jun 2003, 07:20:19 »
You will have to move the vehicle, as well as the crew.

Try this:

"(vehicle _X) setPos getMarkerPos {Marker}" forEach units agrp

What will happen here is that the vehicle the unit is in (or just the unit if it is not in a vehicle) will get moved.  Say you have 1 tank in a group.  It will actually get setpositioned three times because there are three crew members.  You will not be able to tell any difference, however.

Give it a try and see what happens.  :)

Offline Burn

  • Members
  • *
Re:What's wrong with this code then…?
« Reply #4 on: 06 Jun 2003, 07:43:46 »
:oIt worked!!!… Thanks A LOT M8 :wow:, and apologies to LCD for not clarifying that I had a tank group :-[ ::)…

 :PAnyways, thanks a billion times for U'r much needed reply's :thumbsup:
 :cheers:
See YA LATER :wave:

#Topic locked n' solved :toocool:…