Need to query 3 points for nano [Solved]

Need to query 3 points for nano [Solved]

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
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Need to query 3 points for nano [Solved]

Post by Forboding Angel »

https://code.google.com/p/evolutionrts/ ... actory.bos

QueryNanoPiece(piecenum)

I want to query spikeright1 spikeright2 and spikeright3. The current function will only allow me to query 2. Any ideas? (yes I know this script is fugly -_-)
Last edited by Forboding Angel on 28 Mar 2013, 11:57, edited 1 time in total.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Need to query 3 points for nano

Post by PicassoCT »

Code: Select all

if( spray == 0 )
{
if (hey==0)
{
********************
}else
hey!=hey;
{
********************
}
piecenum = spikeright1;
}
if( spray != 0 )
{
piecenum = spikeright3;
}
spray = !spray;
Or you use math.random() - oh you cant, because you wont, because you aint the sort of guy, to get domed by a ran, especially a math one.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Need to query 3 points for nano

Post by Anarchid »

I'll just leave this here: http://springrts.com/mantis/plugin.php? ... iew&id=209

And maybe this: Spring.SetUnitNanoPieces(unitID, {piece1, piece2, piece3, and_four_is_forever});
.bos
oh wait 0_0
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Need to query 3 points for nano

Post by Forboding Angel »

You volunteering your services to convert the script to LUS? :-)

And don't mention the "converter", because it only gets you like 40% of the way, and the rest is you figuring out what is broken (or at least that's the way it used to be) without the compiler dinging at you when you screwed something up.

Edit: NixTux got me sorted out: https://github.com/n3wm1nd/TA/blob/mast ... llhtcp.bos

Thanks :-)
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Need to query 3 points for nano [Solved]

Post by Anarchid »

because it only gets you like 40% of the way
I actually tried the converter on some quite complicated scripts (much much worse than that 300-liner of yours; my tackle was suspension scripts for vehicles and i failed because cba to parse 100500 cryptically named two-letter variables with zero comments).

It gets the basic stuff like yours quite well, though. The things it chokes on are cob magical stuff and complex math (which you don't have).

Oh, and you can use '/luarules reload' to refresh the script on the fly without having to restart spring, and you get syntax highlighting in your favorite editor (unless that happens to be cobbler).

Totally not a propaganda post.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10454
Joined: 24 Jan 2006, 21:12

Re: Need to query 3 points for nano [Solved]

Post by PicassoCT »

Nobody is trying to convince anyone, its not like we forcechoke coborcs..
Post Reply

Return to “Game Development”