OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: macguba on 09 May 2005, 17:09:09
-
We know that you can do strange things like giving a tank gun to a soldier by using addWeapon commands. But how would you add, say, an M16 to a tank? I mean to fire in the normal way, selected by pressing the space bar and having it appear in the top left corner of the screen.
I'm sure you could do this by creating an addon, but I'm hoping there is a scriptable solution.
Many thanks.
-
We know that you can do strange things like giving a tank gun to a soldier by using addWeapon commands. But how would you add, say, an M16 to a tank? I mean to fire in the normal way, selected by pressing the space bar and having it appear in the top left corner of the screen.
I'm sure you could do this by creating an addon, but I'm hoping there is a scriptable solution.
Many thanks.
None, you have to make a new addon. This is due to the fact that vehicles other than a soldier can ony take hardmounted weapons. Infantry has a special ability to carry weapons in a proxy, thats why you can keep adding unlimitted hardmounted (vehicular) weapons to a soldier but only 1 rifle... Its a one way thing, infantry can use vehicle weapons, vehicles cannot use infantry small arms weapons...
-
that should work shouldnt it just use
Tank1g addweapon "m16"; tank1g addmagazine "m16"that might not be the right names of weaons but you know what i mean
Since you didnt know about g, d, and c there basically ways of saying gunner, driver, commander
So tank1g would be the gnner of the tank names tank1
So that should add an m16 to his weapon selection. Hopefully and thanks for the idea of this im going to try and add an m16 to a jeep so you could fire an m16 from a jeep without addons.
-
@Kyle Sarnik - thanks for that. I suspected as much.
@456820 - good idea, thank you, but that would add weapons to the individual crew members. And when you're in a tank you can't use your individual weapons.
I want it added to the tank itself. Using addWeapon to the tank doesn't work of course, which is why I asked here.
-
Could you fake it? I'm thinking about the recent post on flat tires that involved creating bullets with velocity & direction - could you use an action to trigger a load of that (or a fired eventHandler on a tank weapon) just like machinegun fire?
If that would work, could you find something that looked right, use a setpos loop to stick it on the back of a truck, call it a MRL, and have an action to create a load of rockets with setvelocity & stuff to just spray over and make an impressive mess of some bad guys? That might be entertaining ;D
-
nd have an action to create a load of rockets with setvelocity & stuff to just spray over and make an impressive mess of some bad guys? That might be entertaining
Ooohh yes, that sounds like fun. ;D
Yes I probably can fake it. I'm not even sure what I'm trying to do yet. Not even at the design stage yet, I'm still playing with ideas. Laser rangefinder was one thought, or smoke grenades, or guideable missiles. The underlying point I was trying to get it was whether it was possible to make this weapon fire in the normal way, or is it going to require an Action. Looks like I'm gonna have to decide whether addon or action is the lesser of two evils.