Toggleable Flight

Toggleable Flight

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
esteroth12
Posts: 501
Joined: 18 May 2006, 21:19

Toggleable Flight

Post by esteroth12 »

I know that we can't now, but can someone code a way to have flight as an ability? i.e., if you hit the toggle, it will turn CanFly to theother state.

what you could do is make a new attribute (defaulting to 0), ToggleableFlight, that, when 1, adds a new button to the ability panel of the unit. The button swaps CanFly from 0 to 1, or 1 to 0 (depending on whether the unit is flying).

This could be used to make jumpjet units, i.e. a jumpjet Zues, that defaults CanFly as 0 (so it comes out on land). Then, if you encouter a slope to tall, you pop the light button, and the Zues starts charging you 150 E or something, and it flys like a gunship. this *should* cost something to use, though
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Hmm

Post by Pxtl »

The more that is done, the more that it seems that custom toggles are needed. After all, with the "immelman" toggle and the "landat" toggle and various other tedious toggles, it's seeming like any gui will be cluttered with toggles.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

Jump packs would be good instead of on/off flight. I'd rather it just be available to the unit and spring use it to have said unit jump to pass over ledges that are beyond it's level of moveable slope. having to turn them on and off would be anoying.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Post by Pxtl »

smoth wrote:Jump packs would be good instead of on/off flight. I'd rather it just be available to the unit and spring use it to have said unit jump to pass over ledges that are beyond it's level of moveable slope. having to turn them on and off would be anoying.
Pathing for that would be a huge biatch - consider that the jump packs could be used to fly over open water, or long lengths of too-steep-terrain.

What seems most feasible would be to have the unit scripted to change movement types depending on terrain/slope. You know, something like

ifslope > X then movetype = AIRCRAFT else movetype = LAND

It would look like jumppacks, but would really be "the unit flies over rough terrain".
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Post by zwzsg »

I'd like some script command to change the FBI and movement class of a unit (while keeping the same script and model), but I guess that sort of thing is easier said than done, and would introduce nightmarish bugs.
Post Reply

Return to “Engine”