L.Trale 10 Posted October 4, 2014 (edited) Hello, I'm making a mission which includes a lot of Arrays. So I made this simple script: cost=1; yourmoney = myVariable2; if (yourmoney < cost) then {hint "You don't have any Tomato Seeds!"} else { yourmoney = yourmoney - cost;hint format ["%1 Tomato Seed(s) Remaining", myVariable2]; Plant = "Land_BottlePlastic_V1_F" createVehiclelocal position player; Plant attachTo [item, [0, 0, 0] ]; player playMove "AinvPknlMstpSnonWnonDnon_1"; sleep 1; deleteVehicle Item; Detach Plant; Plant addAction ["Check State", "Actions\CheckState.sqf"]; execVM "Plant_init\Tomato_init.sqf"; myVariable2 = yourmoney; }; It works great but there is only one problem; If you use the script more than once, it breaks. i.e I plant a Tomato, then I plant another one. Everything is good until this next part: hint "You've planted a Tomato Plant."; sleep 10; PlantS2 = "Sign_Pointer_F" createVehiclelocal position Plant; PlantS2 attachTo [Plant, [0, 0, 0.2] ]; sleep 20; DeleteVehicle PlantS2; PlantS3 = "Sign_Pointer_Pink_F" createVehiclelocal position Plant; PlantS3 attachTo [Plant, [0, 0, 0.2] ]; sleep 20; DeleteVehicle PlantS3; PlantS4 = "Sign_Pointer_Yellow_F" createVehiclelocal position Plant; PlantS4 attachTo [Plant, [0, 0, 0.2] ]; sleep 30; DeleteVehicle PlantS4; PlantS5 = "Sign_Pointer_Green_F" createVehiclelocal position Plant; PlantS5 attachTo [Plant, [0, 0, 0.2] ]; Plant addAction ["Harvest Tomato", "Actions\Harvest_Tomato.sqf"]; Then the only one plant grows, and the other just sits there. I've tried createVehiclelocal, but no luck. I've also tried to use private arrays: private ["Plant", "PlantS2", "PlantS3", "PlantS4"]; [code]Any help? Thanks. Edited October 4, 2014 by L.Trale Share this post Link to post Share on other sites