Jump to content
Sign in to follow this  
Mike31

Mission Script problem.

Recommended Posts

Can any one help me with a script problem.

When I load my mission up; a error pops up on the top right corner saying this:

http://img88.imageshack.us/img88....MG]

I found what the error what pointing to but I dont know why it should give me an error. This is a script from OFP I am just converting it to ArmA.

Here is the a potion of the script.

#mstart

~2

_lt = leader _group

_lt sideChat "Roger, where to?"

onMapSingleClick {"marker1" setMarkerPos _pos}

_mark = getMarkerPos "marker1" select 0

? _mark == _check: goto "mstart"

_group move getMarkerPos "marker1"

_lt sideChat "Moving on"

onMapSingleClick {}

destset = true

@destset

_dest setMarkerType "destroy"

_dest setMarkerPos getMarkerPos "marker1"

Share this post


Link to post
Share on other sites

remove the {} because ArmA thinks code is in there but the command onMapSingleClick wants a string...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">onMapSingleClick "marker1 setMarkerPos _pos"

but then again, I'm havin problems myself so I'm probably wrong. crazy_o.gif

Share this post


Link to post
Share on other sites

The error is gone, but the units still don't move to ware I did the map click. If I gave you my mission would it be much better for you to see what the problem is??

Share this post


Link to post
Share on other sites

So has any found out how to fix the onMapSingleClick "marker1 setMarkerPos _pos", the AI dont go to the marker point for some reason.

Share this post


Link to post
Share on other sites

What is ?:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

? _mark == _check: goto "mstart"

Maybe this condition is met before the move command can be executed, because you jump to "mstart" before.

Without your full script, we can't help you.

Share this post


Link to post
Share on other sites

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">onMapSingleClick """marker1"" setMarkerPos _pos"

also change the {} with "" a few line lower.

also find those OFP_MARKER_Destroy in the mission.sqm and change that line to just: Destroy.

cheeers

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  

×