OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Fudsine on 16 Mar 2008, 23:01:25

Title: Camp and Ammo Spawn
Post by: Fudsine on 16 Mar 2008, 23:01:25
Ok i want to make it so that only one player can spawn a ammo depot once this is what i have so far


Code: [Select]
INIT.SQS

Player addaction ["Set Up Camp", "campsetup.sqs"]
Player addaction ["Set Up Ammo Depot", "ammosetup.sqs"]


EDIT:
i managed to get the camp script working but i dont know how to get the ammo depot one to work
Title: Re: Camp and Ammo Spawn
Post by: Cheetah on 18 Mar 2008, 15:22:43
Quote
only one player

Are you referring to multiplayer or singleplayer? I guess that you're talking about multiplayer, but if it's SP - could you state what does not work.
Title: Re: Camp and Ammo Spawn
Post by: Fudsine on 18 Mar 2008, 18:13:24
i meant so only one player could spawn but i got that working now i just dont know how to make a ammo depot spawn
Title: Re: Camp and Ammo Spawn
Post by: Fudsine on 19 Mar 2008, 20:36:56
nvm solved this to
Title: Re: Camp and Ammo Spawn
Post by: savedbygrace on 27 Mar 2008, 03:13:11
It would be very helpful to the community if you would post your rsults here partner. As doing searches for topics that return no conclusion is time consuming. Thanks.
Title: Re: Camp and Ammo Spawn
Post by: Fudsine on 05 Apr 2008, 09:09:18
Init is above

Campsetup.sqs
----------------------------------------------

tent = "campeast" createVehicle [0,0,0];

_user = _this select 0
_id = _this select 2
tent setpos [(getpos trooper1 select 0)+1, (getpos trooper1 select 1)+1, getpos trooper1 select 2]
_user removeaction _id
-----------------------------------------------

ammosetup.sqs
-----------------------------------------------
_user = _this select 0
_id = _this select 2
ammo setpos [(getpos trooper1 select 0)+1, (getpos trooper1 select 1)+1, getpos trooper1 select 2]
_user removeaction _id

hint "Ammo Depot becomes usable less than 1 minute after Creation"; exit
----------------------------------------------


for ammo setup you need to place a ammo depot somewhere on the map with the name ammo