Home   Help Search Login Register  

Author Topic: Grenade Launcher and other stuff  (Read 555 times)

0 Members and 1 Guest are viewing this topic.

HotShotAce

  • Guest
Grenade Launcher and other stuff
« on: 27 Dec 2004, 04:08:27 »
Can anyone make a script that the squad leader has more control over the grenade launcher like something like you select the grenadier and click on the map where he shoots or something like that.
Also maybe a same sort of system to have suppressive fire from you machine gunner.
Im also looking for a smoke script where you can use smoke shells to block the AI's view. I don't know if it has been done or not.

Dubieman

  • Guest
Re:Grenade Launcher and other stuff
« Reply #1 on: 27 Dec 2004, 04:27:13 »
JAM smoke shells are supposed to block AI view. Well it'd be JAM2 now... It should be floatin around the OFPEC addon depot. :)

As for the script thing you're talkin about, there is prolly a direct and indirect way to do this. The indirect way being easier.

indirect: We show the grenader shootin something and have the smoke and all. Except he never really shot anything and then we activate an arty script that drop a grenade or explosive object on the postion you specified. Then maybe depending on the grenadier's skill, the grenade would fall closer to the target with more skill and farther away with less skill.

direct: You guessed it, make the guy actually shoot something. I dunno how to do this, maybe the more skilled scriptors could do it this way. :P

I like the indirect way better, although on the battlefield, it would need some testing. :P

And I think there are some suppresive fire scripts in the editor depot. Or you could use some invisible targets and delete them and create/setpos them when in use. Or use the fire command. I don't have a good answer for this either. :-\


HotShotAce

  • Guest
Re:Grenade Launcher and other stuff
« Reply #2 on: 27 Dec 2004, 06:19:57 »
Ok, about the grenade launcher I would like it to be direct but indirect sounds good as well (just that I dont know how to script), maybe you could fix me up with a script if you know how. The suppressive fire ideas are quite good just that with invisible targets my whole squad would attack them and i only want one person to. The fire command might be good but like I said i cant script. I'll have a look in the editor depot.
Thanx.

(PS the JAM smokeshells are very limited and the ai see through it most of the time)

Dubieman

  • Guest
Re:Grenade Launcher and other stuff
« Reply #3 on: 27 Dec 2004, 16:31:24 »
JAM smokeshells, well I never depended on them for hiding, I just heard that they block AI view. Back when I was a wee OFP MPer I played a few missions were the stupid smoke shells saved my arse from one guy in a M1A1 who was chasing me in a CTI or MCTI, got enough time to get my AT4 and blasted away... ;D 8)

As for the grenades, I haven't scripted in so long, I could try and get on it soon. I just need to take care of a few things.

And for the targets, make it on your side, "invisible target west", and then use the dofire command on the machinegunner like

mger dotarget bigtarget
mger dofire bigtarget

Cheers

Dubieman

  • Guest
Re:Grenade Launcher and other stuff
« Reply #4 on: 27 Dec 2004, 19:59:06 »
Well actaully, now that I think of it. This script would be a big copy of an "on map single click" arty script dropping grenades. We would just need to add the anim and smoke for the grenade shot, or delete the grenade after a fire command.

I don't think there is a getskill command so I was thinking just randomize the grenade creation within a small area, like 10m or something.

Sorry I can't work on this right now, too much is going on. Maybe someone else could help or you could mess around with an arty scritp yourself... :P

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:Grenade Launcher and other stuff
« Reply #5 on: 27 Dec 2004, 20:57:50 »
you dont need to do indirect, just use the inv target addons, im sure u guys could figure out the rest on yor own.


DBR_ONIX

  • Guest
Re:Grenade Launcher and other stuff
« Reply #6 on: 27 Dec 2004, 21:50:27 »
Useing the mapclick thing, move a civvilian invisible target (AGF mod site..), and the grenerier dotarget/fire on it
- Ben

HotShotAce

  • Guest
Re:Grenade Launcher and other stuff
« Reply #7 on: 29 Dec 2004, 04:02:53 »
thanx for all your help and ideas guys, I will probably try onix's method because it is the most direct and it uses a well known script. Maybe you could direct me to a script or tutorial that shows how to make the map click script and the dofire command. thanx

Offline Triggerhappy

  • Contributing Member
  • **
  • Llama, it's what's for dinner.
Re:Grenade Launcher and other stuff
« Reply #8 on: 29 Dec 2004, 04:10:27 »
comref:
Quote
onMapSingleClick command
Operand types:
    command: String
Compatibility:
    Version 1.85 required.
Type of returned value:
    Nothing
Description:
    Define action performed when user clicks in map. Command receives:
   
    _pos array position
    _units array selected units
    _shift,_alt bool key state
   
    If click is processed, command should return true.

Example:
    onMapSingleClick {"SoldierWB" createUnit [_pos,group player];true}
so:
onMapSingleClick {target = "invisibletargetname" camcreate _pos;NameOfGrenadier dotarget target;NameOfGrenadier fire ["cfgNadeLauncherName","single"]
or something similar

HotShotAce

  • Guest
Re:Grenade Launcher and other stuff
« Reply #9 on: 29 Dec 2004, 04:56:18 »
lol to be honest im not that good of a scripter. I'll try it out, doesnt seem that hard, but i wouldnt mind if someone made a demo mission or somethin to help me, thnx.

EDIT: I tried it myself, didnt turn out well, the soldiers went crazy for some reason... need help.
« Last Edit: 29 Dec 2004, 15:26:02 by HotShotAce »