Fighters and Jets

Estel3

New Member
Reaction score
6
What's a good unit or way to make fighters and jets? I'm working on a history project and I need to show air craft battles but I'm not sure how to make them "dog-fight", i.e. go forward, but shoot in the same motion and then circle around. I could completely trigger it but that seems like more work than I probably need to do.
 

grognog

New Member
Reaction score
1
just make a few regions and tell him to move to one.
i.e.
Code:
Events
Unit - A unit enters Region 001 <gen>
Conditions 
(none)
Actions
Unit - Order (Triggering unit) to Move To (Center of Region 002 <gen>)
 

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
No, triggering it is the simpliest way unless moving them handly.
You could use a AI script but it's such more work than triggering it.
 

WindexIsBack

New Member
Reaction score
100
You can set the units turn rate (do this via triggers, as it allows them to turn much slower) to a very low number.
In the object editor, set the units "Art - Propulsion Window (degrees) to 180

These 2 changes will make the jet never stop to turn, while at the same time make it's turn radius very big. However, you will have to script it's attack, otherwhys it will have to stop to attack.
This problem can be remidified by making a dummy unit (which itself has an attack) which is tied to the fighter.
attackunit = dummy for attacking
baseunit = fighterjet (Technically this has an attack, however the range is set to 0. This makes the unit head after enemy units, but at the same time not able to attack)
Every .03 seconds
call SetUnitX(attackunit, GetUnitX(baseunit))
call SetUnitY(attackunit, GetUnitY(baseunit))
call SetUnitRotation(attackunit, GetUnitFacingDegrees(baseunit)) Fairly certain function is wrong, but the meaning is there

This has to be done in jass, as the GUI equivilant stops the order of the unit.
The above script makes it so the attackunit can not rotate, but will attack (or at least, should) if the jet is facing it's target.


When a plane is attacked, it should try and attack the target behind it, while occasionally ordering random planes to attack another random plan, to keep the battle random.

The high propulsion window on the jets though can cause more than a few glitches.
Circling Forever - this happens when the target reaches it's destination, but needs to turn to reach it. Coupled with a very slow turn rate, it will continually turn around it's target.
This problem is harder to name. An old youtube vidoe shows it.
http://www.youtube.com/watch?v=zmRa9IzTnys
The problem would only happen after it passes extreme terrain differences. Ordering the aircraft would fix this problem.

If you have any questions, just ask. If this is for online, it's going to be a lot more complicated - an update for .03 seconds for every airplane is heavy for connections.
For the game (which I should probably work on, as it brings back good memories) I had the planes have their natural attack, rather than working with dummies. While planes would stop to attack their enemies, it would not last terribly long.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top