Home   Help Search Login Register  

Author Topic: RPGs  (Read 1846 times)

0 Members and 1 Guest are viewing this topic.

nmanjar

  • Guest
RPGs
« on: 12 Dec 2004, 06:05:00 »
In the real life RPGs aren't really all that great, half the time RPGs skew wildly off course and don't detonate [even if they go on course], anywhoo, is there a way to randomly have RPGs not explode, obviously the part about them zipping away off course would be too hard to get to ever work if it is even possible.

But can we devise something to randomly cause them to not detonate.

bored_onion

  • Guest
Re:RPGs
« Reply #1 on: 12 Dec 2004, 11:06:57 »
getting them to randomly veer off course is entirely possible - ill see what i can manage to cook up. getting them not to explode is probably more difficult as its difficult to know exactly when they will hit the target.

ill try and make a script to make them veer off course for you (will be a while as im a bit busy)
« Last Edit: 12 Dec 2004, 12:28:27 by bored_onion »

bored_onion

  • Guest
Re:RPGs
« Reply #2 on: 12 Dec 2004, 17:26:35 »
ok ive made it!!

simply download the attachment and stick in users/yourusername/missions and open it from the mission editor.

for the time being there is only one thing you can adjust and thats the probability of it being a dud missile (i.e. one that veers off course). there is a trigger in the mission next to the player in which there is a global variable and it should read:

Code: [Select]
defect=1
this means that every rocket you fire is a dud. the lower the defect value is, the lower the chance of it being a dud. you will know if its a dud for two reasons

1) A message displays saying "Damn, another dud missile!"
2) The missile will veer slightly off course.

if you want to make it veer a bit more, go into the script and mess around

other than that have fun!
« Last Edit: 12 Dec 2004, 17:28:28 by bored_onion »

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:RPGs
« Reply #3 on: 13 Dec 2004, 19:00:22 »
This is a good script, but it there any way to adapt it so it works with the JAM2 RPG7's?

I would try it myself, but i've failed time and time again trying to make scripts  :-[
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

bored_onion

  • Guest
Re:RPGs
« Reply #4 on: 13 Dec 2004, 19:44:42 »
yes there is but i need to know one thing:

the string that represents the name (type) of the RPG7 you speak of

since i dont have the addon if anyone knows the name of the shot please tell so i can make the script work for it :)

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:RPGs
« Reply #5 on: 13 Dec 2004, 21:44:13 »
I find it for you. Just give me an hour or so...  ;)
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:RPGs
« Reply #6 on: 13 Dec 2004, 22:06:34 »
Is this any good:

RPG7
JAM_RPG7Rocket         Standard
JAM_RPG7AARocket     Can Target Air units
JAM_RPG7APRocket     Can Target Soldiers
JAM_RPG7ALLRocket    Can Target Air +Soldiers



Planck
« Last Edit: 13 Dec 2004, 22:11:04 by Planck »
I know a little about a lot, and a lot about a little.

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:RPGs
« Reply #7 on: 13 Dec 2004, 22:18:34 »
Yeah, Planck knows what he's talking about  ;D
« Last Edit: 13 Dec 2004, 22:18:45 by greg147 »
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:RPGs
« Reply #8 on: 13 Dec 2004, 22:22:17 »
Correction..........I sometimes know what I'm talking about.   ;D


Planck
I know a little about a lot, and a lot about a little.

bored_onion

  • Guest
Re:RPGs
« Reply #9 on: 14 Dec 2004, 19:42:44 »
that seems like it will do, give me a while to incorportate it

bored_onion

  • Guest
Re:RPGs
« Reply #10 on: 14 Dec 2004, 19:52:19 »
right its done. be warned though, i have not tested it as obviously i do not have the addon. it should be alright as the code was really simple but neverless report any bugs. to make it go (so to speak) just copy the text and stick it in a new script with the same name as before.

here it is (now with all the missiles for the JAM RPG7),

bored_onion
« Last Edit: 14 Dec 2004, 21:05:59 by bored_onion »

Offline greg147

  • Contributing Member
  • **
    • Royal Air Assault Battalion
Re:RPGs
« Reply #11 on: 14 Dec 2004, 21:00:02 »
NOOOOOO!!!!!! :noo:

Only joking.  ;)

The one I really needed to be in-acurate was the AA one. I could do with it for a BHD mission.

The AA missiles for the RPG7 arn't locked on, it just means the AI target choppers with their ammo instead of personnel.  ;)
Royal Air Assault Battalion - [L/Cpl] Greg
RAAB

bored_onion

  • Guest
Re:RPGs
« Reply #12 on: 14 Dec 2004, 21:01:49 »
::) dang

ill change the script again (see above for new script)
« Last Edit: 14 Dec 2004, 21:06:23 by bored_onion »

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:RPGs
« Reply #13 on: 14 Dec 2004, 21:29:21 »
you know, if someone went over and took a look at the timed handgrenade script in the Eds Depot, I bet you could figure out how to find the fired object and delete it before it reached the object, making it a dud.

jus have no time right now.  :P

cheers mates.
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

bored_onion

  • Guest
Re:RPGs
« Reply #14 on: 14 Dec 2004, 22:53:23 »
yeah i could do that using this script as a basis but the trouble is knowing how far away the target is.

nmanjar

  • Guest
Re:RPGs
« Reply #15 on: 15 Dec 2004, 14:33:23 »
sorry, couldnt say thanks sooner, i jsut checked back on this, looks great,


for the grenades, could you have it assume its for the nearest posible target?

bored_onion

  • Guest
Re:RPGs
« Reply #16 on: 15 Dec 2004, 19:01:24 »
hmmm, ill look into it

Dubieman

  • Guest
Re:RPGs
« Reply #17 on: 15 Dec 2004, 22:03:51 »
For the dispersion part, could we not use the JAM RPGs once more except when you load a rocket that is a reg one, a script activates that randomly determines if that rocket gets switched to a HD rocket that usually goes off course.

Unless its the launcher that does it but I think its the ammo.
Would an idea like that work? So some rockets go normal and others stray off. I've got nothin for duds though, it'd be cool to hear a big clunk and smash as the rocket bounces off the chopper or imbeds itself there. :P ;D

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:RPGs
« Reply #18 on: 15 Dec 2004, 22:54:09 »
yeah, to jump start you B_O, to find the rocket, then the script used something like

_rpg = nearestObject [_unit,_ammo]

where _unit was the unit who fired and _ammo is the type of ammunition that was fired. It is all initiated out of an event handler. Also, it used getPos to find when the rocket was .21 metres off the ground, then froze it.

That part of the simulation would be the difficult part, trying to find how close to the helicopter the RPG is.  :P
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

nmanjar

  • Guest
Re:RPGs
« Reply #19 on: 16 Dec 2004, 02:13:23 »
once again, could we make it assume it is for the nearest possible enemy target?

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re:RPGs
« Reply #20 on: 16 Dec 2004, 02:34:17 »
yes, the nearest enemy object would work, but you don't want to the RPG to hit the target, so you would have to find a way to compare the RPG pos to the chopper pos, then delete the RPG when it's closer than maybe a meter.

I suppose you could use the distance command now that I think about it.
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

bored_onion

  • Guest
Re:RPGs
« Reply #21 on: 16 Dec 2004, 18:29:31 »
the distance command was my thought but it would be really inconsistent

@GuiltyRoachKillar: what does HD stand for?

nmanjar

  • Guest
Re:RPGs
« Reply #22 on: 17 Dec 2004, 01:53:25 »
what about having the projectile lose its lock on a target, or teleport it at a certain distance to another spot [that sounds too complex thogugh]

bored_onion

  • Guest
Re:RPGs
« Reply #23 on: 17 Dec 2004, 17:59:27 »
RPGs dont lock :P

nmanjar

  • Guest
Re:RPGs
« Reply #24 on: 18 Dec 2004, 00:19:55 »
have it do so out of view of the player, have it lock to nearest enemy target, then do all that other junk, this is gettin complicated and maybe impossible but.....................?

bored_onion

  • Guest
Re:RPGs
« Reply #25 on: 18 Dec 2004, 12:50:30 »
well, i dont believe theres a way to check what the player is aiming at execpt when they fire and even then it requires trajectory calculations. i suppose you would need to use setdir and getdir and maybe a couple of direction functions then use the nearestobject command to find the nearest object, then to check if it is in the direction field of the player, then to check if it was enemy, then to check if it is a vehicle. It seems vaguely possible but its probably too involved for me. I pass the baton on here for now...