The cruise tag and nukes...

The cruise tag and nukes...

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Twilight
Posts: 14
Joined: 06 Jul 2011, 18:59

The cruise tag and nukes...

Post by Twilight » 01 Aug 2011, 08:37

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
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10238
Joined: 24 Jan 2006, 21:12

Re: The cruise tag and nukes...

Post by PicassoCT » 01 Aug 2011, 09:53

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

;)
0 x

Google_Frog
Moderator
Posts: 2440
Joined: 12 Oct 2007, 09:24

Re: The cruise tag and nukes...

Post by Google_Frog » 01 Aug 2011, 10:37

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.
0 x

User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6109
Joined: 29 Apr 2005, 01:14

Re: The cruise tag and nukes...

Post by FLOZi » 01 Aug 2011, 13:40

Use a missile launcher instead of Starburst launcher with the trajectoryHeight tag?

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

User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: The cruise tag and nukes...

Post by KDR_11k » 01 Aug 2011, 13:52

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.
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10238
Joined: 24 Jan 2006, 21:12

Re: The cruise tag and nukes...

Post by PicassoCT » 01 Aug 2011, 14:13

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
0 x

Google_Frog
Moderator
Posts: 2440
Joined: 12 Oct 2007, 09:24

Re: The cruise tag and nukes...

Post by Google_Frog » 01 Aug 2011, 14:34

What? Pure bomber only defence = weapon which only fires at bombers.
0 x

User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Re: The cruise tag and nukes...

Post by Guessmyname » 04 Aug 2011, 20:34

Google_Frog wrote: 1. Spring.SetProjectileMoveControl, basically control the projectile yourself.
Actually, this would work pretty well:

Image
0 x

User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: The cruise tag and nukes...

Post by KDR_11k » 06 Aug 2011, 13:26

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.
0 x

User avatar
Twilight
Posts: 14
Joined: 06 Jul 2011, 18:59

Re: The cruise tag and nukes...

Post by Twilight » 11 Aug 2011, 07:36

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
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10238
Joined: 24 Jan 2006, 21:12

Re: The cruise tag and nukes...

Post by PicassoCT » 11 Aug 2011, 15:22

so if the target moves towards the enemy, your nuke strikes behind it?
0 x

Post Reply

Return to “Game Development”