turning unit into nanoframe?

turning unit into nanoframe?

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

Moderator: Moderators

Post Reply
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

turning unit into nanoframe?

Post by knorke »

is it possible to turn a unit back into a nanoframe?
I tried
Spring.SetUnitHealth (unitID, {build =0.5})
but it does not turn into a nanoframe (healtbar widget shows buildprogress as 50% though)
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: turning unit into nanoframe?

Post by Beherith »

I know this may be redundant and useless info, but I recall CA had incremental reclaim of stuff where the stuff turned back into nanoframes.
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: turning unit into nanoframe?

Post by Jazcash »

Beherith wrote:I know this may be redundant and useless info, but I recall CA had incremental reclaim of stuff where the stuff turned back into nanoframes.
ZK Still has it
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: turning unit into nanoframe?

Post by knorke »

when creating a unit you can set the build parameter to true like this:
Spring.CreateUnit (bdefID, x,y,z, i, teamID, true)
and it will be nanoframe.
I thought the parameters at end were a table..thanks Rafal[0K] for pointing out :-)

so for now that is good enough for me.
Post Reply

Return to “Lua Scripts”