frankovich213 10 Posted September 13, 2016 Hi, was wondering if anyone could help with this? I am using 'addWaypoint' to create waypoints during my mission. I need to make the waypoints spawn at specific heights so that the player must be at the required height to trigger it and also so they have a visual aid to see where they are supposed to be going. I notice that if I manually place waypoints in the editor, that I can specify it's height on the Z axis so was wondering if there's any way to specify a Z axis position in the script that creates the waypoint. I tried to change the height of the markers that I use to mark the waypoint positions, but quickly realised that you can't change the height of markers. So, I tried placing some invisible helipads in the air and tried using setPos/getPos to change the position of the waypoints to the helipads but I couldn't get that to work either. Maybe I did something wrong? Any help with this would be much appreciated. Cheers :) Share this post Link to post Share on other sites
f2k sel 164 Posted September 14, 2016 If you using a marker for the WP location as you know it only works in two dimensions so you'll have to add the the third (Z) You'll first need to get the X,Y of the marker, this can be seen below 12=Z height. wp1 = group player addWaypoint [[getmarkerpos "mkr1" select 0,getmarkerpos "mkr1" select 1,12],1]; wp1 setWaypointType "MOVE"; Share this post Link to post Share on other sites
frankovich213 10 Posted September 14, 2016 Hey mate! Thanks for the suggestion. I tried it but for some reason it makes the waypoint spawn in the very corner of the map. The same exact thing happened when I did the helipad thing I mentioned above. I'm not too sure why. Share this post Link to post Share on other sites
f2k sel 164 Posted September 14, 2016 That happens when the marker name in the waypoint doesn't match the name of the marker placed in the editor. I know it happened last night when I made a mistake myself, just make sure "mkr1" has the same name as he marker you placed using the editor. Share this post Link to post Share on other sites
frankovich213 10 Posted September 14, 2016 Oh my bad, I did have a typo there. It works! Thank you so much for your help! :D Share this post Link to post Share on other sites
frankovich213 10 Posted September 14, 2016 Hey mate, just wondering if you know how to get the same thing working for createVehicle? This is the code I'm currently using which works but places the circle sign on the ground since I haven't specified the Z axis: _sign = "Sign_Circle_F" createVehicle (getMarkerPos _mkr1); I tried this: _sign = "Sign_Circle_F" createVehicle [(getPos _mkr1 select 0),(getPos _mkr1 select 1),50]; but it gives me an error message and doesn't work. Have any ideas? Cheers mate. :) Share this post Link to post Share on other sites
HallyG 239 Posted September 14, 2016 _sign = createVehicle ["Sign_Circle_F", (getMarkerPos _mkr1) vectorAdd [0, 0, HEIGHT], [], 0, "NONE"]; Replace HEIGHT with a number of your choice. 1 Share this post Link to post Share on other sites
frankovich213 10 Posted September 14, 2016 Replace HEIGHT with a number of your choice. Thanks so much hallyg! Champion! ;) Share this post Link to post Share on other sites