OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Mike34 on 15 Jun 2008, 08:36:12

Title: Spawn Ammocrate?
Post 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.
Title: Re: Spawn Ammocrate?
Post by: Gcfungus on 15 Jun 2008, 08:49:12
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
Quote
usefull location to the player.
what do you mean by that?
Title: Re: Spawn Ammocrate?
Post by: Mike34 on 15 Jun 2008, 14:57:04
I would like the ammocrate to "Spawn" at a specific location.
Title: Re: Spawn Ammocrate?
Post by: RolsRois on 03 Aug 2008, 19:32:35
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.