Kydoimos 916 Posted October 9, 2014 Not sure if this is a bug or not, but I can't seem to check for vehicles after they have been spawned. For example: Varsuk_A = createVehicle ["O_MBT_02_cannon_F", (getMarkerPos "Varsuk_A"), [], 0, "NONE"]; Spawns the vehicle, but this trigger condition fails when the Varsuk is disabled: ! canMove Varsuk_A; Also, setCaptive doesn't work on spawned vehicles - am I missing something? :) ---------- Post added at 18:17 ---------- Previous post was at 18:15 ---------- Never mind. I'm an idiot - its fine. However, new question, how does one setCaptive on a spawned UAV? I can't get that to work! Share this post Link to post Share on other sites
jshock 513 Posted October 9, 2014 (edited) You would have to set the UAV createUnit return value as global or use setVehicleVarName or even get/set variable, I think. Of course assuming that you are in a scripting environment :p. Edited October 9, 2014 by JShock Share this post Link to post Share on other sites
Kydoimos 916 Posted October 9, 2014 Thanks JShock - here's what's not working: AAF_Darter_A = createVehicle ["I_UAV_01_F", (getMarkerPos "Darter_A"), [], 0, "FLY"]; AAF_Darter_A setDir -120; createVehicleCrew AAF_Darter_A; AAF_Darter_A doMove getMarkerPos "Darter_A_WayPoint_A"; AAF_Darter_A setCaptive true; All the other commands, except the setCaptive work fine...? Share this post Link to post Share on other sites
IndeedPete 1038 Posted October 9, 2014 Maybe you need to apply the setCaptive on the crew and not the vehicle? Share this post Link to post Share on other sites
Tajin 349 Posted October 9, 2014 Maybe you need to apply the setCaptive on the crew and not the vehicle? Was just about to say that too. :P Share this post Link to post Share on other sites
Kydoimos 916 Posted October 9, 2014 Odd, I'm sure I tried that: crew AAF_Darter_A setCaptive true; right? Still can't get it to work :p ---------- Post added at 19:39 ---------- Previous post was at 19:37 ---------- Ah, no, hang about - that doesn't look right! Maybe that's where I'm going wrong! ---------- Post added at 19:45 ---------- Previous post was at 19:39 ---------- Weird, seems to be working now with simple setCaptive - sorry guys - I'll give it another bash! Thanks as always for your responses! Share this post Link to post Share on other sites
das attorney 858 Posted October 9, 2014 Try this: { _x setCaptive true; } forEach crew AAF_Darter_A; Share this post Link to post Share on other sites
Beerkan 71 Posted October 9, 2014 Could also try setting the vehiclevarname Varsuk = createVehicle ["O_MBT_02_cannon_F", (getMarkerPos "Varsuk_A"), [], 0, "NONE"]; Varsuk setVehicleVarName "Varsuk_A"; Share this post Link to post Share on other sites
IndeedPete 1038 Posted October 9, 2014 Try this: { _x setCaptive true; } forEach crew AAF_Darter_A; Yes, didn't look it up but "crew vehicle" should return an array while setCaptive expects an object as first parameter. Share this post Link to post Share on other sites
Kydoimos 916 Posted October 10, 2014 Thanks guys! Got it all working, cheers! very helpful! :) Share this post Link to post Share on other sites