Home   Help Search Login Register  

Author Topic: How can I fix a marker to a moving vehicle??  (Read 520 times)

0 Members and 2 Guests are viewing this topic.

Offline Captain Crunch

  • Members
  • *
How can I fix a marker to a moving vehicle??
« on: 02 May 2003, 16:13:16 »
Hi everyone! :)

   I was just wondering if it is possible to attach a marker or maybe a game logic to a vehicle in a maner that the marker or game logic would stick to it even if moving, on a car for instance.

   I've tried a few things around without succes, I'm out of ideas. Anyone can help me?

   I've tried this here at last and thought it would work but...


-----I've put a marker (tried with game logic too) named "MM01" on the map.

-----A trigger with " [This] Exec "Script.sqs "  in the "On Activation" field.

-----And the "Script.sqs" :


#Loop

TrabantPos = GetPos Trabant

TrabantPosX = (TrabantPos Select 0) + 1
TrabantPosY = TrabantPos Select 1
TrabantPosZ = TrabantPos Select 2

MM01 SetPos GetPos TrabantPos

~0.5

GoTo "Loop"


The idea of the    "TrabantPosX = (TrabantPos Select 0) + 1"     line is to put the marker (or game logic) beside the car and make it keep this position.

Does it make sense at all?? If not, how can it be done?

I greatly appreciate any help!
Back to the forest!

jojojoni

  • Guest
Re:How can I fix a marker to a moving vehicle??
« Reply #1 on: 02 May 2003, 16:22:24 »
You'll have to change this line:
MM01 SetPos GetPos TrabantPos

into this one:
"MM01" Setmarkerpos TrabantPos

 Good luck :)
« Last Edit: 02 May 2003, 16:24:01 by Jo-Jo-Joni »

Offline Captain Crunch

  • Members
  • *
Re:How can I fix a marker to a moving vehicle??
« Reply #2 on: 02 May 2003, 18:00:31 »
Hmm! No, unfortunately it doesn't work. I try since a week now only to get this thing done. It seems simply impossible. Thanx for the help anyway!  :-\
Back to the forest!

Offline Captain Crunch

  • Members
  • *
Re:How can I fix a marker to a moving vehicle??
« Reply #3 on: 02 May 2003, 18:34:11 »
PLEASE ANYONE!!! :-\


I need some help. I am certain that there is a way to position a marker to an object and make it stay there even if the object moves!!!

I work around this stupid matter for A WEEK now!!! It still doesn't work!!

---My goal is to attach a marker or a game logic or a whatever that works a meter in front of an object that will be moving. WHY??? Because at some point, when the moving object(the one with the whatever attached to it) will stop and then I want a unit to move RIGHT THERE on the marker or the game logic or the whatever!

  ABOUT THE MARKER! I added a marker named MM01 on the map in the editor, should it be instead a marker created in a script or someother thing???


Please end my misery!!!

 :(
Back to the forest!

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:How can I fix a marker to a moving vehicle??
« Reply #4 on: 02 May 2003, 18:49:48 »
Copied and pasted from one of my scripts

#marker
"CSMmarker" setMarkerPos getPos (leader CSM)
~4
goto "marker"


Worry about the extra metre later.
« Last Edit: 02 May 2003, 18:50:56 by macguba »
Plenty of reviewed ArmA missions for you to play

CrashnBurn

  • Guest
Re:How can I fix a marker to a moving vehicle??
« Reply #5 on: 02 May 2003, 19:15:52 »
Here's a script I use

_marker = _this select 0
_vcl = _this select 1

#LOOP
? ! canmove _vcl: exit
_pos = getpos _vcl
_marker setmarkerpos _pos
~1
goto "LOOP"


save it as movemarker.sqs. call it in the init of the vehicle-
["MM01",trabant] exec "movemarker.sqs" (use the quotation marks!)