Home   Help Search Login Register  

Author Topic: Marker angle  (Read 710 times)

0 Members and 1 Guest are viewing this topic.

Offline benreeper

  • Members
  • *
  • I'm a llama!
Marker angle
« on: 28 Oct 2004, 01:20:59 »
Can the angle of a marker be set thru a script?  I don't think I see the command on the ref.  
--Ben

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Marker angle
« Reply #1 on: 28 Oct 2004, 04:35:58 »
perhaps SetDir will work
thats the only one i can find

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re:Marker angle
« Reply #2 on: 28 Oct 2004, 08:06:49 »
setDir won't work...

What you need to so is to place 'empty' markers (the ones with that look like this: Ø ), set their angles to what you want, then from a script set their properties with all the available marker commands, setMarkerType/Size/Pos/Color...

Empty markers can have text too, they won't show on the map until their type is set to something else...
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Fire-Fox

  • Members
  • *
  • Violence is just a friend walking on the right way
Re:Marker angle
« Reply #3 on: 22 Nov 2004, 19:47:27 »
That is quite annoying when you for example want to have a marker dynamically change its angle to mark a unit's faced direction on the map...  :(

Nobody knows a way to do this?

Offline benreeper

  • Members
  • *
  • I'm a llama!
Re:Marker angle
« Reply #4 on: 23 Nov 2004, 02:23:36 »
Hey that's exactly what I wanted to use it for.
--Ben

Offline CrashDome

  • Members
  • *
Re:Marker angle
« Reply #5 on: 23 Nov 2004, 04:13:40 »
I remember doing something long ago but never finished it.

I actually created my own markers with names for 8 different directions:

Arrow0
Arrow45
Arrow90
Arrow135
.
.
Arrow270
Arrow315

I then , based on direction, would change the marker to whatever was closest direction, but... I never imported them into my mission. I scrapped the idea because of other problems using them in MP. Nowadays with the newer commands my idea would work but I look back on it as a generally bad idea anyway. (My idea was a bad idea, not the concept  ;) )

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
Re:Marker angle
« Reply #6 on: 24 Nov 2004, 02:12:28 »
Quote
That is quite annoying when you for example want to have a marker dynamically change its angle to mark a unit's faced direction on the map...

Well, you can use two markers: one is always right on the player, while the second is a little distance away from that marker, in the direction the player is facing. Think of a circle, with a dot that revolves around it to match the player's facing.

I tried this in my combat patrol mission, but I decided (a) it didn't look too good (especially when you zoom in or out a lot), and (b) the player gets a compass anyway, which is more realistic to use anyway.

But if you really wanted to show facing with markers (for AI units or other player, perhaps?), then you could try that method.

Ex:

"dirMarker" setmarkerpos [(getpos dude select 0) + 5*(sin getdir dude), (getpos dude select 0) + 5*(cos getdir dude)]

HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline Fire-Fox

  • Members
  • *
  • Violence is just a friend walking on the right way
Re:Marker angle
« Reply #7 on: 24 Nov 2004, 20:38:07 »
Quote
Well, you can use two markers: one is always right on the player, while the second is a little distance away from that marker, in the direction the player is facing. Think of a circle, with a dot that revolves around it to match the player's facing.

If you knew HOW bad I am at using mathematic "mysteria" ;) like sinus, cosinus, arc tangens etc... ;D
Thanks for the example, I will play around with it.


btw: I was astonished by your Combat Patrol mission 8)
« Last Edit: 24 Nov 2004, 20:39:44 by Fire-Fox »