jeffv202 1 Posted November 13, 2020 Hello guys, i'm a beginner and i have no idea how to create this .I would like a civilian to be present between 6am and 9pm and after or before this time it disappears. Anyone have an idea how to create this? I've been googling for 30 minutes but I haven't found an answer. A big thank you guys. Share this post Link to post Share on other sites
Joe98 92 Posted November 13, 2020 Are those times correct? it is unlikely that a mission would last for 15 hours. . Share this post Link to post Share on other sites
jeffv202 1 Posted November 13, 2020 This is just an example. 🙂 Share this post Link to post Share on other sites
ZaellixA 383 Posted November 14, 2020 You could possibly do something like the following while {true} do { private _hour = floor daytime; // Get the hour of the local in-game time private _sheep = objNull; // Initialise the sheep if(_hour > 6 && {_hour < 21} && {_sheep isEqualTo objNull}) then { _sheep = createVehicle["Sheep_random_F", getPos player, [], 10, "NONE"]; // Create a sheep }; if({_hour < 6 || {_hour > 21}} && {!(_sheep isEqualTo objNull)}) then { deleteVehicle _sheep; // Delete the sheep }; // Sleep a while to save some CPU sleep 30; }; I am sure you could refine and make the code better in many ways, but I hope you do get the basic idea. Please let us know if you have any more issues or further questions. Have fun, stay safe and ArmA a lot. 1 Share this post Link to post Share on other sites
pierremgi 4906 Posted November 14, 2020 I'm using sunOrMoon > 0.5 condition for day/night environment. Simple, efficient. 2 Share this post Link to post Share on other sites
ZaellixA 383 Posted November 14, 2020 2 hours ago, pierremgi said: I'm using sunOrMoon > 0.5 condition for day/night environment. Simple, efficient. Yep, this should work fine, but it's a wee bit more difficult to control the exact time the unit will appear and disappear. Share this post Link to post Share on other sites
pierremgi 4906 Posted November 14, 2020 22 minutes ago, ZaellixA said: Yep, this should work fine, but it's a wee bit more difficult to control the exact time the unit will appear and disappear. Bah, jeffV202 said it was an example. So, he didn't mention a time clock for the sheep. ⏲️🐑🐑🐏 1 Share this post Link to post Share on other sites
jeffv202 1 Posted November 14, 2020 Guys a big thank you for your help!! 1 Share this post Link to post Share on other sites