Page 1 of 1

The cruise tag and nukes...

Posted: 01 Aug 2011, 08:37
by Twilight
A nuke uses the weapontimer to determine how many seconds it will ascend before aiming at its target, and at that point proceed in a direct path toward it, forming a sharp angle.

In TA, there was a tag (I believe it was Cruise = 1) that would tell the nuke to go to its peak altitude, then travel in a horizontal line until it was almost directly over the target, and then it would come almost straight down on top of it.

The advantage of this was that you could hit things even behind high mountains or walls, since it would come from almost directly above the target.

Cruise doesn't seem to work in Spring, and so I'm wondering if there is another way to allow a nuke to hit things behind steep walls, beyond just giving it a very high weapontimer value, so it goes up really high before coming down at an angle.


To illustrate, with L being the Launching silo, and T being the target:

Code: Select all

Non-Cruise:
|\
|  \
|    \
|      \
|       \
L         T

Cruise:
 ____________
|          |
|          |
|          |
|          |
|          |
L         T
Imagine the first non-cruise example with it only going half to one third as high before angling in on the target, and you'll see why it would easily be blocked by even smaller mountains in front of the target.

Suggestions or ideas?

Thanks,

Twilight

Re: The cruise tag and nukes...

Posted: 01 Aug 2011, 09:53
by PicassoCT
dirty haxxors for the work

you could set the nuke to shoot way over its target, and when he actually reaches it flying high above, you delete it and spawn a new nuke instead, that having zero time to rise, goes straight down...

Helpfool tools would be a banana and boobs, both excellent examples on how to calculate curves

;)

Re: The cruise tag and nukes...

Posted: 01 Aug 2011, 10:37
by Google_Frog
I have 2 suggestions, both of them pretty silly. Both are somewhat explained on this page http://springrts.com/wiki/Lua_SyncedCtrl

1. Spring.SetProjectileMoveControl, basically control the projectile yourself.

2. Spring.SetUnitWeaponState with projectileSpeed. You can change the speed of the projectile such that it's turning circle causes it to hit the ground vertically regardless of where it is aimed.

A better tag for the second option would be turnRate but that doesn't appear to be a modifiable weapon attribute.

Re: The cruise tag and nukes...

Posted: 01 Aug 2011, 13:40
by FLOZi
Use a missile launcher instead of Starburst launcher with the trajectoryHeight tag?

Also, fwiw, never heard of that tag in OTA.

Re: The cruise tag and nukes...

Posted: 01 Aug 2011, 13:52
by KDR_11k
In KP we have the Signal doing that job, it's a bomber that self-destructs upon firing one shot and the bomb it drops is the nuke.

Re: The cruise tag and nukes...

Posted: 01 Aug 2011, 14:13
by PicassoCT
KDR_11k wrote:In KP we have the Signal doing that job, it's a bomber that self-destructs upon firing one shot and the bomb it drops is the nuke.
so, you never will be able to have a pure bomber only defense without worrying, oh, the price of the dirty workaround, so high

Re: The cruise tag and nukes...

Posted: 01 Aug 2011, 14:34
by Google_Frog
What? Pure bomber only defence = weapon which only fires at bombers.

Re: The cruise tag and nukes...

Posted: 04 Aug 2011, 20:34
by Guessmyname
Google_Frog wrote: 1. Spring.SetProjectileMoveControl, basically control the projectile yourself.
Actually, this would work pretty well:

Image

Re: The cruise tag and nukes...

Posted: 06 Aug 2011, 13:26
by KDR_11k
PicassoCT wrote:
KDR_11k wrote:In KP we have the Signal doing that job, it's a bomber that self-destructs upon firing one shot and the bomb it drops is the nuke.
so, you never will be able to have a pure bomber only defense without worrying, oh, the price of the dirty workaround, so high
It's not in any target categories so no unit can attack it. If I wanted to make a nuke defense (which could use ANY weapon type, not just starbursts) I'd just give it a weapon that's set to target only the signal's category.

Re: The cruise tag and nukes...

Posted: 11 Aug 2011, 07:36
by Twilight
I think I have found a solution, of sorts. The nuke had turnrate set to 32768, which means that as soon as it peaked at the end of the weapontimer number of seconds, it turned straight towards the target. If I set it much lower, say at 3000 or so, it hits the peak, and then slowly turns toward the target, resulting in a nice, slow arc toward the target, almost like a high-trajectory ballistic shot.

Anyway, I just thought I would report back, in case anyone else might find this information useful.

Thanks again for all your help!

Twilight

Re: The cruise tag and nukes...

Posted: 11 Aug 2011, 15:22
by PicassoCT
so if the target moves towards the enemy, your nuke strikes behind it?