Home   Help Search Login Register  

Author Topic: Deploying Mortars and machine guns  (Read 2112 times)

0 Members and 1 Guest are viewing this topic.

Nobby

  • Guest
Deploying Mortars and machine guns
« on: 23 Nov 2002, 17:02:24 »
Here's what I got in mind...
How would you go about placing mortars and machine guns (like the WW2 MG42 or 30cal) at any posistion on the map just be clicking on the map?
For example: In the game I have a mortar guy, and in the game, when i click on the map, the guy will run to that posistion which I marked and set up his mortar. also taking into acount which direction I want him to face.
This will apply to other such things like machine guns that have to be on tripods to shoot, but the guy can carry it and shoot with it. Not very realistic.
Is it possible to do this?
« Last Edit: 23 Nov 2002, 20:50:01 by Nobby »

Azraell

  • Guest
Re:Deploying Mortars and machine guns
« Reply #1 on: 24 Nov 2002, 22:52:44 »
well.....i dont know much about it, but in the editors depot theres some user defined marker scripts, so check those out...


as for the m2 machine gun.... u could have ur soldier run to a marker, then createvehicle or camcreate a m2 when he reaches said marker, then use the variable u gave the createveh/camcreate m2 to order soldier into m2 machinegun. giving it the apperence that hes the "heavy gunner" that "setup" the gun.....or better yet, make so it has to be 2 units that are needed to trigger the m2 to appear...like they both had to carry the heavy parts.

just some thoughts....checkout the editors depot for those marker scripts though...



Stix

  • Guest
Re:Deploying Mortars and machine guns
« Reply #2 on: 25 Nov 2002, 04:12:01 »
other than markers u could try that onsinglemap click thing used in the new airstike script

Baphomet

  • Guest
Re:Deploying Mortars and machine guns
« Reply #3 on: 25 Nov 2002, 07:56:31 »
I was thinking about something very similar. It came to me when I was viewing a preview for the TOW missile launcher by the desert OFP mod team. It would be of limited usefulness if it was just sitting there. I mean for base defense, or perhaps static at an encampment. Still you can't "take" it anywhere.

Basically what I was thinking for that. Or for anything really so long as you can change the entity name. Is to allow for a vehicle, structure, etc. With a specific name. To run a script which, when you move close to the vehicle, building, etc. Gives you an action command to deploy the gun in front of you (assuming you give a little leeway for the deploy radius around the vehicle.


The player could use the medic animation to simulate putting crap together. Then, when the gun is made. You will inversely be given an option to deconstruct it and move on to another point at your leisure. Of course adding a variable to track whether it's been deployed would be good to. Just so you can't deploy fifty million goddamned launchers around the car, because that'd just be gay. =P

I hope someone capable and ambitious enough reads this. I'd do it myself. However apparently I have a brain similar to that of a monkey addicted to huffing gasoline. So, eh.  ::)

PsyWarrior

  • Guest
Re:Deploying Mortars and machine guns
« Reply #4 on: 25 Nov 2002, 17:22:06 »
Hey there ppl!

Check out Kegetys AGS-17 grenade launcher. It comes with a script which enables you to load your AGS into an APC/Car/truck.
This might be helpful for 'carrying' a static weapon - you could convert the script (with Kegetys permission of course  ::) ) or create your own from scratch enableing you to 'load' the static weapon onto an infantryman and deploy it somewhere on the map.
As for actually carrying/shooting with the weapon, this could be done with an addon...but that's not in my dept...

 8) hope this helps

==================
PsyWarrior
-----------------------
Message Ends
==================


PsyWarrior

  • Guest
Re:Deploying Mortars and machine guns
« Reply #5 on: 25 Nov 2002, 17:29:05 »
Hmmmmm...

This is quite possible. I'll have a go at this script with an MG and a TOW launcher as well and get back to you
(soldier carrying massive mounted TOW...Not too realistic but still ;) )

*thinks :hmm: *

=========================
PsyWarrior
--------------------------------
"I lost a bomb...have YOU got it?"
=========================

PsyWarrior

  • Guest
Re:Deploying Mortars and machine guns
« Reply #6 on: 26 Nov 2002, 22:58:31 »
If anyone's still interested, i've been working on this script. It's not finished yet but here are the features...

-player can move MGs and other mounted weapons

-player can order AI gunners to pick up their MG's and walk (using OnMapSingleClick)

-AI moving command is activated via action menu when close to MG/TOW/Whatever. Then map is forced onscreen and AI will move the MG to wherever you click.

-weapon is 'deconstructed' using animation and reconstructed in the desired location and also in your preferred direction (not really that important for an M2 but since the TOW launchers only have about 45 degree range, this is important.)

-weapon currently faces direction of the person deploying

That's it so far. Contact me if you want anything changed.
I am V busy now so expect the script in the next day or two.
That's it.  :D

==============
PsyWarrior
-------------------
Engage at Will
==============

Nobby

  • Guest
Re:Deploying Mortars and machine guns
« Reply #7 on: 26 Nov 2002, 23:10:14 »
Sounds fantastic.
Please keep me posted.

Cheers

Nobby. ;D

Nobby

  • Guest
Re:Deploying Mortars and machine guns
« Reply #8 on: 01 Dec 2002, 22:02:03 »
Yo, howz this script going?

Nobby

PsyWarrior

  • Guest
Re:Deploying Mortars and machine guns
« Reply #9 on: 09 Dec 2002, 16:50:20 »
Sorry, sorry, sorry :-[ .
     I haven't been able to get near an internet- capable PC for a couple of weeks now so there has been a noticable delay. Things will improve when I get Broadband Internet (in about 5 years -- when BT get round to networking my area  >:( ).

Anyway, coursework is finished for the time being so I can complete the script.
-player deployment script 99% complete - finalising/testing
-AI script 90% complete

some strange things may happen if the MGun carrier is killed while 'carrying' weapon, but i'm working on a solution.

That's all for now. Expect the script very soon.

===========
PsyWarrior
--------------
End Report
===========

kevinfostereditguy

  • Guest
Re:Deploying Mortars and machine guns
« Reply #10 on: 09 Dec 2002, 17:01:21 »
im just getting back into scripting now, so excuse any mistakes, how about something like using an addaction command on a guy that you can cycle though and when selected creates a gun at a position slightly in front of him? i did this by the mounted gun i wanted was -10 below ground, and when the guy was told to construct it, he did his animation and a second or 2 later he deployed his gun making it appear in front of him for use, i also did this with a tent for a camper, but it seems to work. a bit different than clicking onthe map but it work. when you want him to get rid of the gun, there should be an addaction command for him to do so, a small animation and the gun should go -10 or so below its current position (theres a really easy setpos command but im too fuzzy at the moment to remeber it).


PsyWarrior

  • Guest
Re:Deploying Mortars and machine guns
« Reply #11 on: 10 Dec 2002, 11:43:40 »
@kevinfostereditguy
Yeah, this is the sort of thing i'm doing. here are the mechanics:
-when PLAYER is within 3m of DEPLOYED STATIC WEAPON running MoveMG.sqs, action "Move Weapon" is added

- When action is issued, player 'dismantles' MGun using "combatToMedic" and the weapon is transported to [0,0,-10-random 10] (to avoid weapons all appearing in the same place). Action "Deploy Weapon" is added.

-When deploy command is issued, player rebuilds weapon using "combatToMedic" anim.

-weapon appears about .5m in front of him. this cannot be done with conventional setpos but requires a calculation based in direction
----------------------------------------------------------
-there is also a script for AI: PLAYER moves within 3m of AI MOUNTED IN MGUN. action "order ai to move" however, i'm having trouble with onMapSingleClick at the minuite.

==============
PsyWarrior
------------------
message ends
==============

Nobby

  • Guest
Re:Deploying Mortars and machine guns
« Reply #12 on: 10 Dec 2002, 16:38:24 »
sounding pretty mint so far guys.
plz keep us informed

cheers

Nobby