OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: bedges on 17 Oct 2005, 10:16:58
-
when stocking an ammocrate with flares and/or grenades, i noticed the player has to take the 'weapon' part of the ammo first, then the ammo.
is there any way of having the 'weapon' already loaded, as putting the ammo before the 'weapon' in the script doesn't work like it usually does...
-
IIRC, you can only have that when you switch weapons in mission for ammo crates.
So no. :P
-
Actualy, if you clear the ammo crate and then add only a few primary magazines (like 4) and some grenades or flares, then anyone who takes the weapon should get the 4 mags and some grenades (I think). But no there is no way to control it, but why do you even need to do that?
-
hmmm. in my experience, separate weapons and ammo need to be taken separately from an ammocrate.
to clarify the context, this is for a script which will summon a stocked ammocrate to the player's position. the ammocrate is script-created. it has very little ammo in it (actually only grenades, hand-grenades, satchels, flares and smoke shells), but if the player doesn't already have a flare or hand-grenade in the inventory, the 'throw' part of the weapon has to be taken first, then the ammo works. simply adding/taking the ammo doesn't.
-
Well the unit should allready have the throw weapon anyways. If it doesn't then just add it at the start of the mission.
-
Ahah. This worked for me:
1) Create a loon in some abandoned unused island/part of the map.
2) Remove all weapons & ammo.
3) Add magazines then weapon.
4) Use action ["DropWeapon",myLoon] or whatever to add it to the ammo crate. (I'll have to find it again...)
5) Delete unit, or repeat process.
The nice thing about the action is that the loon executes it from his current position - he doesn't have to move to the ammo crate to perform it - and it still works.
[EDIT] It's somewhere in this tute: Plank's Actions Tute (http://www.ofpec.com/editors/resource_view.php?id=862)
-
and the weapons/ammo go into the ammocrate... how?
i have the actions list. says nothing about storing in an ammocrate. :-\
-
I do know that when using an action to make a loon take weapons from an ammocrate, the loon does not have to be near the crate. Don't know how you get him to put something in it though .... maybe its one of these actions we haven't worked out yet.
-
I suppose you could try:
unitname action ["drop magazine",vehiclename,0,0,magazinename]
or
unitname action ["drop weapon",vehiclename,0,0,"weaponname"]
vehiclename would be the name of your crate in this case.
Let me know if it works and I'll amend the actions list document.
Planck
-
nope. still requires two pickups to get a working flare. sorry :-\
weird how he drops it into the crate from miles away though.... ::)
aye, so to clarify, yes - the action works to drop the weapon/ammo into the crate, no - it still doesn't create a simgle pickupable flare that works...
-
Hmm. Well, I tried. :P
Too bad you can't just transfer weapons from Y to Z without using actions etc. :(