Home   Help Search Login Register  

Author Topic: Group Teleporting  (Read 793 times)

0 Members and 1 Guest are viewing this topic.

Offline Captain Crunch

  • Members
  • *
Group Teleporting
« on: 26 Jan 2004, 23:56:42 »
Hi!

   I try to teleport a group of troops to a marker. I get an error message that says:

"Type group, expected object"

  In the "Init" field of the group leader I typed this:

"Police01 = Group This"

And in an "On Activation" field of a waypoint, I have typed this:

 Police01 SetPos GetMarkerPos "PoliceM01"

Looking at the error message, (Type group, expected object) I suppose it is possible. (Because of the "Type group" part)

What am I doing wrong? Well, if it's even possible!!

   Thanks a lot!!!

                                                  crunch
Back to the forest!

_hammy_

  • Guest
Re:Group Teleporting
« Reply #1 on: 27 Jan 2004, 00:16:43 »
try changing
Police01 SetPos GetMarkerPos "PoliceM01"

to

"_x setpos setpos getmarkerpos "PoliveM01"" Foreach units group Police01

its probably wrong, you could always put
This setpos setpos getmarkerpos "PoliveM01"
in each of the units init field :P
« Last Edit: 27 Jan 2004, 00:20:33 by HAMMY »

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Group Teleporting
« Reply #2 on: 27 Jan 2004, 00:17:23 »
"_x setpos getmarkerpos {policem01}" forEach police01


:edit - yeah hammy u were faster but wrong if there hasn't
been changed anything lately.

"_x setpos getmarkerpos "policem01"" forEach police01
doesn't work, as it should be:

"_x setpos getmarkerpos ""policem01""" forEach police01

:note - watch the dbl-quotation marks

np. anyway - and no offense meant in anyway  :D

~S~ CD
« Last Edit: 27 Jan 2004, 00:20:34 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Group Teleporting
« Reply #3 on: 27 Jan 2004, 00:20:26 »
Never mind...

:beat: Got beaten by many before me :beat:
« Last Edit: 27 Jan 2004, 00:21:54 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Group Teleporting
« Reply #4 on: 27 Jan 2004, 00:21:32 »
The underlying points is that some commands take a group as an argument, and other commands take a unit.   Some commands take either.    The comref usually makes it clear.

The error message in this case is very helpful:  the game found a group when it was expecting an object.    When you get a message like this look through your code to find a group - and there's your problem.

The proposed solution should work just fine.
Plenty of reviewed ArmA missions for you to play

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Group Teleporting
« Reply #5 on: 27 Jan 2004, 00:23:38 »
errm - scripts are always useful and handy, but in this case,
i would suggest the one-liner  ;)

Maybe you could use a script, if u don't want them to get
beamed into the very same spot, but even that wouldn't
be a problem, as they would imidiately step back into the right
place of their formation, once needed.

:what the hell is goin on in this thread??

one types a reply, just to edit it, because others already
started typing a reply  :o  ;D

~S~ CD
« Last Edit: 27 Jan 2004, 00:25:11 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

_hammy_

  • Guest
Re:Group Teleporting
« Reply #6 on: 27 Jan 2004, 00:30:47 »
pfft i never knew it had to be double quotes ;)

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Group Teleporting
« Reply #7 on: 27 Jan 2004, 00:31:25 »

:what the hell is goin on in this thread??

one types a reply, just to edit it, because others already
started typing a reply  :o  ;D

~S~ CD
;D

Guilty...  :D

I'm alawys too slow on replying... same info ten times won't do any good  ;)
« Last Edit: 27 Jan 2004, 00:33:10 by HateR_Kint »
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Captain Crunch

  • Members
  • *
Re:Group Teleporting
« Reply #8 on: 27 Jan 2004, 01:02:13 »
Thanx guys!!

   Though neither syntax actually worked!!
I played around with You guys' ideas and mixed a little of Your responses.

   Here is the correct syntax:


"_X SetPos GetMarkerPos ""PoliceM01""" ForEach Units Police01


And to MacGuba:

  Hi! I remember having such problem (even just recently) :-[ You had actually told me the same thing!!! I'm sorry!  :-[

I'll watch myself, I'll think about my problem longer before posting next time!

  Many thanks again!!



Back to the forest!

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Group Teleporting
« Reply #9 on: 27 Jan 2004, 02:05:04 »
Quote
Though neither syntax actually worked!!
I played around with You guys' ideas and mixed a little of Your responses.

  Here is the correct syntax:


"_X SetPos GetMarkerPos ""PoliceM01""" ForEach Units Police01

So what's then been wrong with the syntax, i posted in my
2nd reply?

Anyway, if my first suggestion didn't work for you, i suppose
you're using pre-resistance then - don't you?

If not, suggestion 1 should work aswell, if yes, {} brackets
were not supported by OFP engine before one of the
patches after 1.75

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Captain Crunch

  • Members
  • *
Re:Group Teleporting
« Reply #10 on: 27 Jan 2004, 05:21:51 »
no, I have version 1.91

   The part missing was the "Units" word!! between "ForEach" and "Police01".

And about Your syntax, sorry, I made a mistake and didn't typed the right brakets in!!
I had used [] instead of {}!

  But thanx!!  ;D
Back to the forest!

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Group Teleporting
« Reply #11 on: 27 Jan 2004, 06:07:16 »
Ah yeah, i can see now  :D

I might have been working too much with arrays
the last days then.

Ya know: "_x dosummit" forEach ARRAY
                "_x dosummit" forEach units group/unit

you see forEach array doesn't require the units, but
forEach group/unit does.

That's because: units group/unit represents an array of
units aswell, while the name of a group just represents
an object.

hmm - will this accusation get me out of ma typo  ::)

 ;D

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted