OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: The-Architect on 13 Aug 2005, 18:03:30

Title: Display Grid Number
Post by: The-Architect on 13 Aug 2005, 18:03:30
I have a shot down pilot and I want to have updates on his position displayed via radio message. How do I go about this?
Title: Re:Display Grid Number
Post by: bored_onion on 13 Aug 2005, 18:12:02
theres a really cool function which will return the grid co-ordinates of a unit

http://www.ofpec.com/editors/funcref.php?filter_func=11 (http://www.ofpec.com/editors/funcref.php?filter_func=11)

i think that should be what you're after - unless you need to know how to format it into the sidechat, but i think you probably know that already.
Title: Re:Display Grid Number
Post by: The-Architect on 13 Aug 2005, 18:30:38
That works fine for the player but when I tried it for a guy called pilot it didn't return anything. What do I do to make it work?
Title: Re:Display Grid Number
Post by: bored_onion on 13 Aug 2005, 19:19:28
what was the syntax you were using to call the function?
Title: Re:Display Grid Number
Post by: The-Architect on 13 Aug 2005, 19:22:10
player groupChat format ["%1", [getPos player] call Gridcoord] is the bones of it. I changed the player bits to Pilot.
Title: Re:Display Grid Number
Post by: bored_onion on 13 Aug 2005, 19:26:34
including to "pilot groupchat etc"?

cant think why else it would be doing it... ???

try doing it in a script and passing the position of the pilot as a variable
Title: Re:Display Grid Number
Post by: The-Architect on 13 Aug 2005, 19:33:23
Talk about a blond moment. You got it right, I was telling the pilot to tell his group where he was. Thanks for your help.
Title: Re:Display Grid Number
Post by: 456820 on 13 Aug 2005, 19:55:14
solve button