[?]:Dynamic Metal Map

[?]:Dynamic Metal Map

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

Moderator: Moderators

Post Reply
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

[?]:Dynamic Metal Map

Post by REVENGE »

I vaugely remember this topic had come up before, but I couldn't find it using the forum search or looking in the wiki.

Is it possible to alter the metal map while ingame? How about metal extractor radii?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: [?]:Dynamic Metal Map

Post by knorke »

REVENGE wrote:Is it possible to alter the metal map while ingame?
nope. lua your own metalmap with some 2d array?
How about metal extractor radii?
Spring.SetUnitMetalExtraction ( number unitID, number depth [,number range] ) -> nil
springrts.com/wiki/Lua_SyncedCtrl
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: [?]:Dynamic Metal Map

Post by knorke »

hm, seems to become possible with 0.83:)
from changelog:
- added Spring.{Get, Set}MapSquareTexture (these allow complete dynamic run-time retexturing of SMF maps)
- added Spring.GetMetalMapSize (returns size in metal map coordinates)
- added Spring.GetMetalExtraction (note: uses metal map coordinates)
- added Spring.{Get, Set}MetalAmount (note: uses metal map coordinates)
User avatar
REVENGE
Posts: 2382
Joined: 24 Aug 2006, 06:13

Re: [?]:Dynamic Metal Map

Post by REVENGE »

Sweeeeeeeeet.
Post Reply

Return to “Lua Scripts”