Midhaven 0 Posted March 1, 2007 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">marker1= createMarker ["MyMarker",[*,*]] Ok, so I want the [*,*] to point towards an object, tho I can't enter coordinates since the object will change places from time to time. Any way to automaticly get the coordinates for the object pasted in the script? Share this post Link to post Share on other sites
terox 316 Posted March 1, 2007 <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">marker1= createMarker ["MyMarker",[*,*]] Ok, so I want the [*,*] to point towards an object, tho I can't enter coordinates since the object will change places from time to time. Any way to automaticly get the coordinates for the object pasted in the script? marker1= createMarker ["MyMarker",[(getpos objectname select 0),(getpos objectname select 1)]]; Share this post Link to post Share on other sites
Midhaven 0 Posted March 2, 2007 I've spent the entire night completing what I hope is going to be a popular coop map on large servers. I just need to set up the mission end triggers. Your help will be greatly appritiated and I will mention you in the credits. Ok so I have 7 towns, 3 of wich are controlled by the players at the beginning, when one gets siezed by the AI the objectives gets set to "ACTIVE", and when they are controlled by the player the objective is set to "DONE". When all objectives are set to "ACTIVE" I want the mission to end (in faliure), and when they are all "DONE" it'll be completed. So how do I make the trigger check the objStatus? Share this post Link to post Share on other sites
HulkingUnicorn 0 Posted March 5, 2007 I don't know how to check objStatus (or if it is possible at all), but you can create some additional variables. At the same time as you set "1" objStatus "ACTIVE" set obj1Active to true and so on. Then just set your endtrigger to check for obj1Active, obj2Active, obj3Active etc. Share this post Link to post Share on other sites
MuadDib 0 Posted March 5, 2007 marker1= createMarker ["MyMarker",[(getpos objectname select 0),(getpos objectname select 1)]]; just a quick query on that format but doesn't getpos return an array anyway so would it not be more efficient to simply put <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">marker1= createMarker ["MyMarker",getpos objectname ]; instead of initializing getpos twice? or is this not allowed by the engine? ( I cant test it at the moment as I am not at home.) Share this post Link to post Share on other sites
fasad 1 Posted March 5, 2007 Marker commands are meant to work on 2d arrays [x,y] and getPos returns a 3d value [x,y,z]. eg: setMarkerPos But some (all) of the commands work happily with 3 element arrays anyway. Share this post Link to post Share on other sites