Home   Help Search Login Register  

Author Topic: Gate Bug ?  (Read 1844 times)

0 Members and 2 Guests are viewing this topic.

Offline Kotp

  • Members
  • *
  • I'm a llama!
Gate Bug ?
« on: 20 May 2007, 16:16:13 »
Hi guys , in the middle of making my 1st mission for ARMA , and its going ok .. but seem to be getting a problem with a Group walking thru the Gate. For some reason they get to the entrance and even though the Gate Arm is Up , they decide to walk round the whole base. As you can imagine this is extremely frustrating but I came up with a sneaky cheat so to speak , but not entirely sure how to implement it.

When they get to the gate , I want to run a Command that basicly teleports the whole group about 10 feet inside the gate , Ive created a Marker and called it Teleport and have a trigger on the entrance of the gate that is Synchronised with the Group.

So my question basicly is what would i need to put in the Trigger to move the whole group to the allocated Marker called Teleport which is 10ft inside the Gate.

Many thanks for any help.

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Gate Bug ?
« Reply #1 on: 20 May 2007, 16:33:17 »
Code: [Select]
{_x getpos setmarkerpos Teleport} foreach units thislist
Try that. If it gives an error try putting " " around Teleport.

Offline Kotp

  • Members
  • *
  • I'm a llama!
Re: Gate Bug ?
« Reply #2 on: 20 May 2007, 16:43:54 »
Get this error when trying :- foreach Type String, Expected Code  >:(



# - quote removed - bedges
« Last Edit: 20 May 2007, 17:22:24 by bedges »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Gate Bug ?
« Reply #3 on: 20 May 2007, 17:23:04 »
please don't quote the post to which you're replying.

Offline johnnyboy

  • OFPEC Patron
  • ****
  • Matan los Pantalones!!!
Re: Gate Bug ?
« Reply #4 on: 20 May 2007, 19:06:34 »
There is a way to force them through "naturally" without teleporting them:

Code: [Select]
{_x  setdir 35; _x playmove "AmovPercMwlkSnonWrflDf"} foreach units thislist

Use setdir to point them in the direction you want them to go, and then execute the walk animation via playmove.  AmovePercMwlkSnonWrflDf means "Move-Erect-Walk-?-weaponRifle-DirectionForward (I forget what the S part means).

They will walk a few steps for each playmove, so you may want a loop to execute it X many times until they are far enough inside the base.

Here's the link to Wiki Move list:

http://community.bistudio.com/wiki/Armed_Assault:_Moves_List

I use this technique to get units to walk down sidewalks instead of their preferred path down the middle of streets.
El Cojon: "Do you like to Tango?"
You: "Only in Bagango."
Download Last Tango in Bagango and discover how El Cojon earned his name...

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Gate Bug ?
« Reply #5 on: 21 May 2007, 20:36:40 »
Kotp, did you try with and without the " " around Teleport?

Code: [Select]
{_x getpos setmarkerpos Teleport} foreach units thislist
and

Code: [Select]
{_x getpos setmarkerpos "Teleport"} foreach units thislist
 ???

Offline Cheetah

  • Former Staff
  • ****
Re: Gate Bug ?
« Reply #6 on: 21 May 2007, 20:38:31 »
Maybe this works:

Code: [Select]
{_x getmarkerpos "Teleport"} foreach units thislist
Like missions? Help with Beta Testing! or take a look at the OFPEC Missions Depot for reviewed missions!

Offline DucusSumus

  • Members
  • *
  • I'm a llama!
Re: Gate Bug ?
« Reply #7 on: 22 May 2007, 18:55:38 »
Jason, getPos setMarkerPos doesn't make sense.  What you want is what -h posted, getMarkerPos.  And yes, the quotes are always necessary when you're dealing with markers. 

Offline Kotp

  • Members
  • *
  • I'm a llama!
Re: Gate Bug ?
« Reply #8 on: 23 May 2007, 15:29:29 »
How exactly would i get that {_x getmarkerpos "Teleport"} foreach units thislist  working ?

I mean when i put it in a trigger , i get an error. Is there anything i need to put before it ?

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Gate Bug ?
« Reply #9 on: 23 May 2007, 15:35:03 »
getmarkerpos returns the coordinates of a marker, so what the command you've asked about actually does is say

get the coordinates of the marker called "Teleport" for each of the loons inside the trigger

which is of course why arma doesn't like it. what you want to say in fact is

for each of the loons inside the trigger, set the loon's coordinates to the same as the coordinates for the marker called "Teleport"

and the way to write that is

Code: [Select]
{_x setpos getmarkerpos "Teleport"} foreach units thislist
you might need brackets () around the getmarkerpos and "Teleport", but i doubt it. it's been a while since i was in the editor...