LEDZ widgets: nukeTracker.lua

LEDZ widgets: nukeTracker.lua

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

gajop
Moderator
Posts: 3040
Joined: 05 Aug 2009, 20:42

Re: LEDZ widgets: nukeTracker.lua

Post by gajop »

how about adding map/minimap tracking to it as well ? (by displaying a special symbol for it while in air, think defcon)
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14638
Joined: 17 Nov 2005, 02:43

Re: LEDZ widgets: nukeTracker.lua

Post by Forboding Angel »

Nice! I can haz sauce?
LEDZ
Posts: 66
Joined: 27 Jun 2011, 13:43

Re: LEDZ widgets: nukeTracker.lua

Post by LEDZ »

This widget will be released along with others once I have cleaned up the code :)

Gajop, do you know how I could track the missile? I'm not sure of how to get the projectileID for instance.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14638
Joined: 17 Nov 2005, 02:43

Re: LEDZ widgets: nukeTracker.lua

Post by Forboding Angel »

For maximum awesomeness, allow the indicator to be animated (multiple image frames).
LEDZ
Posts: 66
Joined: 27 Jun 2011, 13:43

Re: LEDZ widgets: nukeTracker.lua

Post by LEDZ »

Thanks Beherith, but how do I get a projectileID from a firing silo?

Forboding Angel: You mean a moving animation on the minimap?
I'm literally just learning to use openGL stuff so bare with me on that one.
User avatar
Beherith
Moderator
Posts: 4983
Joined: 26 Oct 2007, 16:21

Re: LEDZ widgets: nukeTracker.lua

Post by Beherith »

When the silo fires, do a Spring.GetProjectilesInRectangle for whole map.

It will be called armsilo_armsilomissile or something, then you have its ID. Spring.GetProjectileName

When the projectile becomes invalid (position check returns nil) the nuke went boom.

Whatever you do, dont call GetProjectilesInRectangle every frame for whole map!
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: LEDZ widgets: nukeTracker.lua

Post by knorke »

Beherith wrote:When the silo fires, do a Spring.GetProjectilesInRectangle for whole map.
http://springrts.com/wiki/LuaCallinReturn#Projectiles: ?
User avatar
Beherith
Moderator
Posts: 4983
Joined: 26 Oct 2007, 16:21

Re: LEDZ widgets: nukeTracker.lua

Post by Beherith »

Or yeah, dont be a tard like me and follow knorke's advice :)

Thanks!
LEDZ
Posts: 66
Joined: 27 Jun 2011, 13:43

Re: LEDZ widgets: nukeTracker.lua

Post by LEDZ »

I've tried out the projectile call-ins before. You need to set the watch weaponsID which I could only do via a gadget IIRC.
Am I missing something here?
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: LEDZ widgets: nukeTracker.lua

Post by jamerlan »

Show additional messages when nuke was successful / failed.

Nice job!
LEDZ
Posts: 66
Joined: 27 Jun 2011, 13:43

Re: LEDZ widgets: nukeTracker.lua

Post by LEDZ »

Now has a nice GUI box.

http://www.youtube.com/watch?v=Y_gFnLDhwtw

I have a couple of issues to sort out before I release it though, perhaps someone could help:

The sounds have been borrowed from a few sources which means they violate copyright. I believe the "missile launch sensors online" will be ok (recut voice of CABAL from CnC Tiberian Sun). However, "nuclear missile ready" is from CnC 3 and some of the sounds are from DEFCON (naturally). So will need to replace these.

Also, the missile itself is tracked by gettings its ID via Spring.GetProjectilesInRectangle(wholeMap) in a widget:StockpileChanged call-in. This sometimes fails and I can only reason that sometimes the projectile appears a gameframe after the stockpile on the silo decreases. Again, any sagacity thrown below will help massively!
User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: LEDZ widgets: nukeTracker.lua

Post by jamerlan »

Looks really great!

Don't know what to do with sounds.. I propose to find a girl with a sexy voice and ask her to say these texts like in orgasm :-D I am serious :-D wanna sexy voice
LEDZ
Posts: 66
Joined: 27 Jun 2011, 13:43

Re: LEDZ widgets: nukeTracker.lua

Post by LEDZ »

Lolz Jamerlan.
"nukeTracker (sexy-bitch remix by Jamerlan)" is on the to-do.
LEDZ
Posts: 66
Joined: 27 Jun 2011, 13:43

Re: LEDZ widgets: nukeTracker.lua

Post by LEDZ »

Here is a beta version of the widget with sounds included (note these sounds include game ripped files) just for examples of eventual functionality.
http://www.mediafire.com/?2o5uiidfs56ksqt
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14638
Joined: 17 Nov 2005, 02:43

Re: LEDZ widgets: nukeTracker.lua

Post by Forboding Angel »

Make gui optional (otherwise I have to dig into it and rip it out myself and I'd rather not).

Successful nuke sound, and Failed nuke sound.

Edit: The gui is neat, but the issue is for games that use ChiliGUI, we basically have to go in and remove it, which is a shame.
LEDZ
Posts: 66
Joined: 27 Jun 2011, 13:43

Re: LEDZ widgets: nukeTracker.lua

Post by LEDZ »

The gui is neat, but the issue is for games that use ChiliGUI, we basically have to go in and remove it, which is a shame.
What about ChiliGUI interferes with the GUI I made?
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14638
Joined: 17 Nov 2005, 02:43

Re: LEDZ widgets: nukeTracker.lua

Post by Forboding Angel »

Honestly? The entire thing :-/

However, making gui in chili is apparently the easiest thing you will ever do (one of the reasons why some lua people only make things that are compatible with chili).
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: LEDZ widgets: nukeTracker.lua

Post by Niobium »

Forboding Angel wrote:Honestly? The entire thing :-/

However, making gui in chili is apparently the easiest thing you will ever do (one of the reasons why some lua people only make things that are compatible with chili).
Are there actually things that interfere, as in things break in the widget and/or chilli if both are enabled? Or is it more a matter of it not being consistent graphically/interactively/etc.
Post Reply

Return to “Lua Scripts”

cron