Jump to content
Sign in to follow this  
TYsiEK

Can somebody fix this script ?

Recommended Posts

Script:

target.sqs

----------------------

_Target = _this select 0

_Marker = _this select 1

#update

"_Marker" setMarkerPos getPos _Target

~0.1

goto "update"

-----------------------

Command in the target (some helicopter or man)

[this, markername1] exec "Target.sqs"

Well, markers doesn't move sad.gif .

Can somebody fix it ?

Share this post


Link to post
Share on other sites

I don't know if it matters, but you could try to use the longer getpos thing, like this.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Target = _this select 0

_Marker = _this select 1

#update

"_Marker" setMarkerPos [(getpos _Target select 0), (getpos _Target select 1), 1]

~0.1

goto "update"<span id='postcolor'>

I also noticed that you called the script "target.sqs" above your script, and in the exec line you called it "Target.sqs", probably you just typed that by mistake right here, but if it's like that in the game, it won't work.

Share this post


Link to post
Share on other sites

I think the problem is, you encased _marker in double-quotes. Try the following instead:

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">_Target = _this select 0

_Marker = _this select 1

#update

_Marker setMarkerPos getPos _Target

~0.1

goto "update"<span id='postcolor'>

and call the script like [this, "markername1"] exec "Target.sqs".

Names of markers are already strings itself.

Share this post


Link to post
Share on other sites

THX man it works. And works without "" in the call script.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×