Laser designator for airstrike?

View previous topic View next topic Go down

Laser designator for airstrike?

Post  F-35 Lightning II on Fri May 07, 2010 7:57 am

Is there code to make a sniper in Zero Hour use visible laser to target an area to call airstrike? I'm trying all I've got but still I don't know how...Please help me...
avatar
F-35 Lightning II
Master Sergeant
Master Sergeant

Posts : 97
Join date : 2009-01-07

View user profile

Back to top Go down

Re: Laser designator for airstrike?

Post  Marc15yo [Admin] on Fri May 07, 2010 8:25 am

The way i suggest to do it is to:

1) create a dummy laser weapon code. Just a weapon, that uses a laser, but has no dammage or effect on the targeted unit. like give it a damage of 0, or a damage of 0.0001 or something like that lol

Now i don't know if there is a code named "DetonationOCL" in the weapon parameters or something like that since i have not looked at ZH code in a very long time, but if you can find this, this will be your key code as it will "spawn" your airstrike OCL. (Hope you know how to code an airstrike superweapon ocl, look at the a-10 strike)

If you can't do that, there are plenty of innovative ways to spawn your ocl's (this is what makes taow so successful codewise lol) get creative with it, look at many many different codes and don't be afraid to switch it to your purposes. when i code, i'm all over the place and my code does not look traditional lol.

If you still haven't found a way to spawn your superweaponOCL air strike where the laser hits, then i suggest doing it the more complicated way. (which is a more complex way of coding weapons that comes in very handy) i'll tell you how if you need more help on this part.

when your done with this step move on to the next step

2) Add this dummy laser weapon to your sniper. BUT make sure your sniper does not fire it automatically. Look at the commanche's rocket pod weapon code.

3) In your sniper's commandset copy the commanche's rocket pod fire weapon commandbutton and rename it as to fit to your needs.

4) In the commandbutton make a copy of the commanche's fire weapon button and rename it appropriately


from what it sounds like after this it should work. Your sniper should have a button when selected that will let him fire the "dummy" laser, and when the laser hits it's target, it will spawn an airstrike at the location.


If you want (i strongly suggest) is to give the dummy laser weapon have a long reload time so that players don't go and spam it at the enemy.

_________________


Recognizing that I volunteered as a Ranger, fully knowing the hazards of my chosen profession...
I accept the fact that as a Ranger my country expects me to move further, faster and fight harder than any other soldier...
Surrender is not a Ranger word. I will never leave a fallen comrade to fall into the hands of the enemy...


- Excerpts from the Ranger Creed
avatar
Marc15yo [Admin]
General of the Army [Administrator]
General of the Army [Administrator]

Posts : 3610
Join date : 2008-01-19
Age : 32
Location : United-States

View user profile http://taow.simulationboard.com

Back to top Go down

Re: Laser designator for airstrike?

Post  F-35 Lightning II on Fri May 07, 2010 8:39 am

Thanks Bro!
avatar
F-35 Lightning II
Master Sergeant
Master Sergeant

Posts : 97
Join date : 2009-01-07

View user profile

Back to top Go down

Re: Laser designator for airstrike?

Post  F-35 Lightning II on Fri May 07, 2010 9:18 am

I did what you said, the sniper fire the laser dummy but it doesn't spawn the airstrike...
avatar
F-35 Lightning II
Master Sergeant
Master Sergeant

Posts : 97
Join date : 2009-01-07

View user profile

Back to top Go down

Re: Laser designator for airstrike?

Post  Marc15yo [Admin] on Fri May 07, 2010 11:42 am

Did you use the detonationOCL line? or is it projectiledetonationocl or something of that sort.

If you did and it didn't, this is the part where we get creative. There are multiple ways of making an OCL appear after firing a weapon, all we need to figure out now, is how to do it with lasers.

If i had my modding tools and zh on this pc i would check back to see if i could find a good code for u to use. from memory, i guess the best way to do it, is to give the dummy laser a projectile. This projectile would have a death ocl which would be your airstrike.

However i'm not sure if you can add a projectile to a laser weapon in sage. There may be a dependency. Give it a try. Oh and your projectile object should not have a model or art parameter. I've never really played with lasers in ZH so i wouldn't know how to attach an OCL to a laser weapon.


If the problem persists maybe you could post the OCL code of your airstrike just to make sure it's not the airstrike causing the problem. that would help.

_________________


Recognizing that I volunteered as a Ranger, fully knowing the hazards of my chosen profession...
I accept the fact that as a Ranger my country expects me to move further, faster and fight harder than any other soldier...
Surrender is not a Ranger word. I will never leave a fallen comrade to fall into the hands of the enemy...


- Excerpts from the Ranger Creed
avatar
Marc15yo [Admin]
General of the Army [Administrator]
General of the Army [Administrator]

Posts : 3610
Join date : 2008-01-19
Age : 32
Location : United-States

View user profile http://taow.simulationboard.com

Back to top Go down

Re: Laser designator for airstrike?

Post  F-35 Lightning II on Fri May 07, 2010 12:02 pm

I found in my search the code... I combined two weapons, the laser and the invisible weapon with projectile object that spawn OCL... Thanks anyway,

I've been working this for days, 12 hours a day, hehehe finally I did it... Modding a game isn't easy but when you finished doing something it brings you smile... Did the TAOW team continuously work with ZH version of the mod? I could help editing the armor.ini and the weapon.ini and the OCL, I want to join in the team, just only in the ZH but not CNC3 because I have no background in modding CNC3 and I have never play it yet..hehehe
avatar
F-35 Lightning II
Master Sergeant
Master Sergeant

Posts : 97
Join date : 2009-01-07

View user profile

Back to top Go down

Re: Laser designator for airstrike?

Post  Marc15yo [Admin] on Fri May 07, 2010 12:07 pm

hmm, you know i think we can talk via pm Cool! you might be a great asset to the team.

_________________


Recognizing that I volunteered as a Ranger, fully knowing the hazards of my chosen profession...
I accept the fact that as a Ranger my country expects me to move further, faster and fight harder than any other soldier...
Surrender is not a Ranger word. I will never leave a fallen comrade to fall into the hands of the enemy...


- Excerpts from the Ranger Creed
avatar
Marc15yo [Admin]
General of the Army [Administrator]
General of the Army [Administrator]

Posts : 3610
Join date : 2008-01-19
Age : 32
Location : United-States

View user profile http://taow.simulationboard.com

Back to top Go down

Re: Laser designator for airstrike?

Post  F-35 Lightning II on Fri May 07, 2010 12:15 pm

I leave a PM lets talk there
avatar
F-35 Lightning II
Master Sergeant
Master Sergeant

Posts : 97
Join date : 2009-01-07

View user profile

Back to top Go down

Re: Laser designator for airstrike?

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum