OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Pr0ph3t on 21 Mar 2005, 03:57:55

Title: QUICKIE -> Getposition question
Post by: Pr0ph3t on 21 Mar 2005, 03:57:55
To facilitate coordinate hunting during mission editing, I want a placed unit to echo its x,y coordinate location on the screen. any way to do this with a single line in the activation field?

thanks d00ds
Title: Re:QUICKIE -> Getposition question
Post by: Roni on 21 Mar 2005, 05:44:22
once only -

hint format ["X = %1, Y = %2", getPos this select 0, getPos this select 1]


repeatedly -

Create script ping.sqs
Put this exec "ping.sqs" in init field of target unit.

;ping.sqs
#loop
hint format ["X = %1, Y = %2", getPos this select 0, getPos this select 1]
~10
goto "loop"

cheers



roni
Title: Re:QUICKIE -> Getposition question
Post by: Woodpeckersam on 21 Mar 2005, 09:40:45
once only -

hint format ["X = %1, Y = %2", getPos this select 0, getPos this select 1]


repeatedly -

Create script ping.sqs
Put this exec "ping.sqs" in init field of target unit.

;ping.sqs
#loop
hint format ["X = %1, Y = %2", getPos this select 0, getPos this select 1]
~10
goto "loop"

cheers



roni

Hey dude, you dont need to make a script... just create a trigger, axis (both) 0. activated by radio charlie, radio bravo etc etc.. then just set the trigger to repeatedly and input the code in the field


hint format ["X = %1, Y = %2", getPos this select 0, getPos this select 1]


... in game, press 0,0,1 and can be done many timnes u want.

simple..
Title: Re:QUICKIE -> Getposition question
Post by: Pr0ph3t on 21 Mar 2005, 13:34:53
Thanks fellas I'll let you know as soon as I test
 ;D
Title: Re:QUICKIE -> Getposition question
Post by: Roni on 21 Mar 2005, 21:33:20
Yeah, I suppose you COULD do it that way, but my way is . . . ah forget it.   :)   :P