OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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
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
-
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.
-
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
-
nvm solved this to
-
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.
-
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