Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
Collegia Titanica

Missile trajectory and Target acquisition

Question

I'm new to doom modding and am trying to create a unit which fulfills 3 roles that I need help with:

 

1) Eligible targets must be a certain height Z above the unit in order to be targeted or even considered. I don't want this firing on ground targets.

 

2) Missile trajectory must be curved in the beginning , then switch to homing.

  

                        

                                   (nohomo)            .     .         (homo)

                                                    .                      .    . 

                                         .                                               .     . (x)

                              .  ____(You must be this high in order to be killed)________________________________________________

                      .

               .

      (Poom Poom)

 

 

Yes, it's an AA platform.

 

I assume (2) would be done by adding a certain pitch to the projectile with a fast change in angles for a certain time

 

3) Making sure once a missile is fired, the target is considered dead. I'm aware of the existance of ClearTarget but I'd like certainty, forcing the unit to choose another target.

 

 

This is my first post and I'd appreciate detailed answers and code contributions. With your help, I can get my project done and will feature all those who help.

AA.png

Edited by Collegia Titanica

Share this post


Link to post

2 answers to this question

Recommended Posts

  • 1

You might have better luck over on the ZDoom forums/Discord for really detailed ACS / ZScript stuff.  I can help with one thing though: 

5 hours ago, Collegia Titanica said:

2) Missile trajectory must be curved in the beginning , then switch to homing.

This is relatively easy.  Set the projectile to be -NOGRAVITY and fire it upwards, so it starts to arc down after launch. 

 

But instead of having the Spawn state be a loop like most projectiles, after a certain number of tics (say 35) have it end with "Goto Home" and create a second state called "Home" that has the Homing property attached to the frames.  Then make that state loop until Death.

Share this post


Link to post
  • 1

about 1) here's my idea:

 

the Fire state can execute a global script in ACS. This script can check the height of the Hate Target (whatever the battery is targeting) and launch a missile if it is tall enough. The script can also change the hate target.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×