Laser designator for airstrike?
2 posters
Page 1 of 1
Laser designator for airstrike?
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...
F-35 Lightning II- Master Sergeant
- Posts : 97
Join date : 2009-01-07
Re: Laser designator for airstrike?
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.
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.
Re: Laser designator for airstrike?
Thanks Bro!
F-35 Lightning II- Master Sergeant
- Posts : 97
Join date : 2009-01-07
Re: Laser designator for airstrike?
I did what you said, the sniper fire the laser dummy but it doesn't spawn the airstrike...
F-35 Lightning II- Master Sergeant
- Posts : 97
Join date : 2009-01-07
Re: Laser designator for airstrike?
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.
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.
Re: Laser designator for airstrike?
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
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
F-35 Lightning II- Master Sergeant
- Posts : 97
Join date : 2009-01-07
Re: Laser designator for airstrike?
hmm, you know i think we can talk via pm you might be a great asset to the team.
Re: Laser designator for airstrike?
I leave a PM lets talk there
F-35 Lightning II- Master Sergeant
- Posts : 97
Join date : 2009-01-07
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum