Default action on...

Default action on...

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Default action on...

Post by Caydr »

A way to set the default action for any unit onto any unit or object.

So for instance there'd be the default context-action for when you have X unit selected and your mouse is hovering over...
a dead unit
a live, friendly unit
a live, enemy unit
a live, friendly factory

and any others you can come up with...

The purpose is, it would be useful to allow a unit to by default, reclaim rather than repair, or capture rather than attack, etc. Very very useful.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

The eerie silence makes me think this has already been done and everyone's mocking me.
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Post by quantum »

Lua!
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Can that seriously be done with LUA, or are you just on the "flying krogoth with balloon sandals? Just use LUA!" bandwagon?

If it can really be done with LUA, someone help me out please.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Is that you in your avatar?

And yes you can make the krogoth fly on baloons wearing sandals in lua.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Yessir, that's me. You DON'T want to see the earlier attempts, that you do not.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I prefered it before your latest contrast increase tbh, now it looks more like the cliched average internet attempt at monochrome, change it back ^_^
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Changed it back. So, can someone tell me how to do this? It's really important.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

IIRC this si controlled in th code in a function with a name similair to GetDefaultCommand or Action.

Look at CUnit and the classes that inherit from it.
User avatar
Comp1337
Posts: 2434
Joined: 12 Oct 2005, 17:32

Post by Comp1337 »

And caydr, you look like a badass in that pic. just had to say
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Post by Neddie »

We should all have greyscale images of ourselves, then mix them up randomly on April Fools!
User avatar
Acidd_UK
Posts: 963
Joined: 23 Apr 2006, 02:15

Post by Acidd_UK »

Comp1337 wrote:And caydr, you look like a badass in that pic. just had to say
And you look like a dirty cartoon slut!
User avatar
Comp1337
Posts: 2434
Joined: 12 Oct 2005, 17:32

Post by Comp1337 »

Acidd_UK wrote:
Comp1337 wrote:And caydr, you look like a badass in that pic. just had to say
And you look like a dirty cartoon slut!
And you love me for it <3
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Thanks, I was going for a Sin City look... sorta failed and wound up grayscaleish...

(I've never actually seen Sin City or... well I've never read a comic book either actually...)

ANNNNYWAYYYY, this feature is of vital importance to some stuff I'm looking at trying, and a bunch of people just said it's possible. Can someone outline how to do it with LUA?

Thanks
trepan
Former Engine Dev
Posts: 1200
Joined: 17 Nov 2005, 00:52

Post by trepan »

A little something I posted in the lobby this week:
http://trepan.bzflag.bz/spring/defcmd_geotherm.lua

It's first demo widget for the DefaultCommand() lua call-in.
LuaUI, LuaCob, and LuaRules can all use this call-in, but
LuaUI gets the final say (requires a recent SVN exec to
try it out).

The example widget sets up a geotherm build on valid
geotherm sites if an applicable builder is currently selected.
User avatar
Zoy64
Posts: 454
Joined: 12 Nov 2006, 00:30

Post by Zoy64 »

my avatar is a pic of me
User avatar
quantum
Posts: 590
Joined: 19 Sep 2006, 22:48

Post by quantum »

quantum wrote:Lua!
Caydr wrote:If it can really be done with LUA, someone help me out please.
Woops, I said that then went into hiding, away from the Internets for a month :oops:

Anyway... what trepan said :P
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

I'll take a look at your code, Trepan. Thanks!

Who's that in Comp1337's avatar? Looks Lucyish. No, wait... eyes aren't red. Who is that?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Nyu or what she's called.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

That's what I thought, but her eyes don't look red enough. Weird.
Post Reply

Return to “Feature Requests”