OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mike34 on 15 Jun 2008, 08:36:12
-
Hey guys, I would like some info on writing a script for a ammocrate to respawn over and over. I think this would be better then creating a hundred of them at the beginning of the game, That would probaly create too much unneccasary lag. At some point after the respawn the new ammocrate would be teleported to a usefull location to the player. Thanks Mike.
-
I did a test, but when I tried to get how dammaged an ammo box was, it wouldn't give me a value. Therefore, you could try using an action, radio trigger or looping timer to do it. Also, when you say a
usefull location to the player.
what do you mean by that?
-
I would like the ammocrate to "Spawn" at a specific location.
-
lets say you want to spawn ammocratewest, and the player's name is "dude", then:
"Ammocratewest" createvehicle getpos dude;
Im not sure you must check the ammocrate you want specific name and write it instead of Ammocratewest.