Page 1 of 1
Need to query 3 points for nano [Solved]
Posted: 28 Mar 2013, 09:26
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 -_-)
Re: Need to query 3 points for nano
Posted: 28 Mar 2013, 09:35
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.
Re: Need to query 3 points for nano
Posted: 28 Mar 2013, 09:55
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
Re: Need to query 3 points for nano
Posted: 28 Mar 2013, 11:21
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

Re: Need to query 3 points for nano [Solved]
Posted: 28 Mar 2013, 13:21
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.
Re: Need to query 3 points for nano [Solved]
Posted: 28 Mar 2013, 18:00
by PicassoCT
Nobody is trying to convince anyone, its not like we forcechoke coborcs..