Home   Help Search Login Register  

Author Topic: LZ and FZ  (Read 1961 times)

0 Members and 1 Guest are viewing this topic.

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
LZ and FZ
« on: 29 Oct 2003, 02:36:53 »
i know this would be hard to do, propably impossible, but can someone make a script for player infantry units where they can call in helo support i.e. Landing Zones and Fire Zones via the radio menu, then throw a yellow smoke for LZ or red, green, or white for FZ.  I know it'd be hard because the game doesn't recognize smoke grenades.  I think this should be implimented into ofp2 for more realism

m21man

  • Guest
Re:LZ and FZ
« Reply #1 on: 29 Oct 2003, 03:53:12 »
The EH "fired" would note when a smoke grenade was dropped, and then could execute a script which would bring in a chopper to that location.

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
Re:LZ and FZ
« Reply #2 on: 30 Oct 2003, 00:07:27 »
m21man, i don't get it...talk in baby steps :hmm:

m21man

  • Guest
Re:LZ and FZ
« Reply #3 on: 30 Oct 2003, 00:26:11 »
Here's a tidbit from Igor Drukov's EH tutorial about the "fire" eventhandler:

Quote
Here are the returned values of the most famous EH, "fired", which can be added to either vehicles or men :

_this select 0 : who fired ;
_this select 1 : with what weapon ;
_this select 2 : with what muzzle (your M16, or M203 ?)
_this select 3 : mode ? (either single, or burst, or auto)
_this select 4 : the type of ammo used.

Basically, in your mission you could give your guy an eventhandler like this:
Code: [Select]
player AddEventHandler ["fired",{_this exec "checksmoke.sqs"}]
Which would then be checked by checksmoke.sqs:
Code: [Select]
_thower = _this select 0
_checktype = _this select 4

#Check
?(_checktype == "SmokeShellRed"): goto "smoke_marked"

#exit
exit

#Smoke_Marked
_smokepos = getpos _thrower
_px = _smokepos select 0
_py = _smokepos select 1
_pz = _smokepos select 2
[_px,_py,_pz] exec "marked.sqs"
goto "exit"

Now, hopefully once a red smoke shell is thrown, the script will send the coordinates of the thower to a script called "marked.sqs", which could then call in a chopper to the marked area.
« Last Edit: 30 Oct 2003, 00:31:10 by m21man »

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
Re:LZ and FZ
« Reply #4 on: 30 Oct 2003, 23:26:55 »
Ok, sounds good m21, except i'll use yellow smoke.  But i don't know if it would work correctly.  Can it be used with other scripts and waypoints.  What i have is the helo waits for the radio call, then flys to either LZ depending on the call.  Right now, it's only one because i can't make the waypoint or trigger move to either LZ so it's always primary LZ.  

But can the smoke script you're talking about be used with a waypoint that activates another script and trigger?  I could post the mission file here and you can take a look if u want.

m21man

  • Guest
Re:LZ and FZ
« Reply #5 on: 31 Oct 2003, 02:40:49 »
I wouldn't use other waypoints, what I'd do is have the "marked.sqs" script handle the chopper's movement by itself:

Code: [Select]
_tx = _this select 0
_ty = _this select 1
_tz = _this select 2

#Stuff
_landlogic = "logic" createvehicle [_tx,_ty,_tz]
_hidelogic = "logic" createvehicle getmarkerpos "safemkr"

#Move
chopper domove getpos _landlogic
@(chopper distance _landlogic <= 50)
chopper land "get in"
@(wounded in chopper)
chopper domove getpos _hidelogic
@(chopper distance _hidelogic <= 50)
chopper land "land"

#Exit
exit
« Last Edit: 31 Oct 2003, 23:20:17 by m21man »

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
Re:LZ and FZ
« Reply #6 on: 31 Oct 2003, 23:13:02 »
ok, can u write an example mission for me?  You know a hell of lot more than i do and if i do it, i might sink Everon.

m21man

  • Guest
Re:LZ and FZ
« Reply #7 on: 31 Oct 2003, 23:19:17 »
I'll make the scripts and include a template showing you how to set up the scripts. It could take me a little while, I'm currently working on an island and some assorted scripts.
« Last Edit: 31 Oct 2003, 23:23:08 by m21man »

m21man

  • Guest
Re:LZ and FZ
« Reply #8 on: 01 Nov 2003, 21:54:27 »
Here's what I have so far. The medevac feature hasn't been added yet, but the included scripts will cause a UH-60 to be spawned at marker "safeplace", take off, and fly to the marked area where it will land. To make it take off and go back, use radio 0-0-1. Look at the template in your mission editor to learn how to set it up.
« Last Edit: 02 Nov 2003, 01:40:34 by m21man »

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
Re:LZ and FZ
« Reply #9 on: 02 Nov 2003, 21:27:48 »
i'm impressed...i didn't think the the AI had the brain to go to the smoke lol.  but it's not what i need :'(  it's really confusing to put it here, so here's the mission it's self.  It's also confusing so i added a little text that explains it.  I forgat to put down i can't have the helicopters spawn...the same ones are needed through the whole mission.

m21man

  • Guest
Re:LZ and FZ
« Reply #10 on: 03 Nov 2003, 00:41:17 »
So if the mission goes fubar then you can throw a smoke grenade and call a chopper to your position. Under normal conditions, you have to be in either the first or second LZ.

OK, I can change the scripts to do this. I'll also get rid of the spawning feature and just have the choppers station themselves out of an airbase.
« Last Edit: 03 Nov 2003, 00:42:36 by m21man »

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
Re:LZ and FZ
« Reply #11 on: 04 Nov 2003, 00:59:19 »
right...if possible, they're to get to the secondary LZ due to the threat of AA guns if things go fubar but can call it anywhere.  I didn't mention this in the readme, but there's only two suitable exraction LZs on tonal where the area of operation is.  Anyother place is teeth grinding.  Also can you write the scripts to use yellow Lone Wolf's 100 smoke shell addons at ofp.gamezone.cz?

I hate to ask this, but in order to make it super realistic, the helicopters need to start at low fuel (the airbase is 1500 miles north :(  when they come to thier waiting area, can you also simulate an air to air refuel.

I'm really thankful for your help...if u got all of BAS's stuff, i can send u the mission when it's finished, and it's computer freindly.  Yes, it does not lag!

m21man

  • Guest
Re:LZ and FZ
« Reply #12 on: 04 Nov 2003, 14:18:45 »
Could you send me a mission.sqm with markers showing the locations of the Area of Operation and the two LZs?

Quote
Also can you write the scripts to use yellow Lone Wolf's 100 smoke shell addons at ofp.gamezone.cz?
I'll download them and see what I can do.

Quote
when they come to thier waiting area, can you also simulate an air to air refuel.
I can make a chopper touch another one's refueling boom, would that be a good enough simulation?
« Last Edit: 04 Nov 2003, 14:20:16 by m21man »

Offline Delta Hawk

  • Members
  • *
  • I'm a llama!
Re:LZ and FZ
« Reply #13 on: 05 Nov 2003, 00:09:25 »
I don't got time, so here's the thing.  Just to be clear, the area of operation extends from LZ alpha to the road, down to the objective.  Also the probe on the MH-60K receives fuel, not give...i don't know if u know this.  I'm sure u know though.