How to make a widget that...

How to make a widget that...

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
Kerr
Posts: 37
Joined: 27 Feb 2010, 03:18

How to make a widget that...

Post by Kerr »

I'm making a space mod, half for fun (play) and hlaf to learn how to mod spring.

Well, after asking around for several days in the chat the way to make air units unable to land (as used in CA) has a glitch with fixed wing aircraft type movement.

once out of the factory they fly in a straight line forever, right off the map if they aren't given an order.

I just need to know how to make a gadget that checks these units for orders shortly after they are built and if they have none then tell them to move to their current location (or guard, i don't care)

Help would be appreciated
SeanHeron
Engines Of War Developer
Posts: 614
Joined: 09 Jun 2005, 23:39

Re: How to make a widget that...

Post by SeanHeron »

I'm not about to write the gadget for you, but within the Callin "Gadget:UnitFromFactory() (which returns following values --> "unitID, unitDefID, unitTeam, factID, factDefID, userOrders" ) is probably a good place to place your checks/order giving. (Other Callins here).

Then you'll need to call the appropriate SyncedRead function (using the unitID you got above) for it's position, and use that to give a move order (via the correct SyncedCtrl function).

If all that is still more or less jarble to you, I'd suggest you either look for someone to simply code the thing for you (or request so here explisitly), or grab the Spring-Lua-Guide (aka "lua bible").
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: How to make a widget that...

Post by SanadaUjiosan »

I've found it's easiest to start small and easy, and slowly build on your knowledge. My example is right off the bat the idea of animating my models seemed overwhelming and impossible. And then one night it suddenly hit me, after staring at the simple weapon animation scripts, and I was then able to make my mechs move their arms. A week later, walking came. It's a process.

That being said, I have no idea how to do what you're wanting. Best of luck though.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: How to make a widget that...

Post by FLOZi »

SWIW apparantly had the bug where aircraft just fly straight off the map too, gnomre said i should ask Zsinj
Kerr
Posts: 37
Joined: 27 Feb 2010, 03:18

Re: How to make a widget that...

Post by Kerr »

well, I still haven't found a fix for this.

For now i'll just have to let my fighters land... and te gunships aren't bugged with this.
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: How to make a widget that...

Post by Saktoth »

You're using the special air flight dynamics tags? maxrudder, aileron, etc?

Yeah those are whacky.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: How to make a widget that...

Post by FLOZi »

Saktoth wrote:You're using the special air flight dynamics tags? maxrudder, aileron, etc?

Yeah those are whacky.
No, he isn't.
Kerr
Posts: 37
Joined: 27 Feb 2010, 03:18

Re: How to make a widget that...

Post by Kerr »

I Stopped looking lol.

No I'm not.

Here one min i'll post my code...

err

http://darkstars.co.uk/svn/kerr

EDIT:

Emphasis on i just started modding spring!
(don't comment on cosmetics >_<)
:shock:

basically, to repeat this bug, build 1 Frintas (light Scout) at the Command Portal, and watch and wait.

oooh! flies right off the map!
User avatar
JohannesH
Posts: 1793
Joined: 07 Apr 2009, 12:43

Re: How to make a widget that...

Post by JohannesH »

Its possible to make planes fly off map in any game... Spring planes are just retarded to micro :/
But just give the airfactory a waypoint automatically, shouldnt that fix the problem?
Kerr
Posts: 37
Joined: 27 Feb 2010, 03:18

Re: How to make a widget that...

Post by Kerr »

That was what this was about.

But I got FLOZi to help me out on that, it's rather a bit rickety fix and I removed it.

(gave the fighters a waypoint upon creation if no orders, however, they wouldn't follow rally points by the factory Because for some reason it's not given before the unit finishes building...)

also you had to have a huge offset of position or it would fill the move order before it finishes factory flyout.

This had inherient problems with building placement, if it is near the edge of the map then it won't work. (same for the nano patrol roam widgets; Try DSD East and place nanos on the very edge, they'll not be given the order)

so...
Post Reply

Return to “Game Development”