I was wondering since it seems with Speed_Ball and Duck_Fusions and such its possible to add new mod units within the map file, could wrecks of units be added to a map that could be resurrected to create custom units (from the map file).
My immediate idea is an Experimental Scrapyards map for BA4.7 where the theme was all sorts of corpses in a metal world that could be resurrected into unique units such as an Orcone or stuff like 'Flash Tank MkII' that had a different gun and any other crazy stuff. If possible the stuff wouldn't be reclaimable and it would lead to some fun gameplay having people fight over the rights to resurrect the more powerful units.
Map Idea - Is this possible?
Moderator: Moderators
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
LuaGaia can be used to do what you want:
You could also use the map defined features rather then create your own:
Code: Select all
local featureID = Spring.CreateFeature("name", x, y, z, heading)
Spring.SetFeatureResurrect(featureID, "armcom", facing)
Code: Select all
local mapX, mapY = Game.mapX * 512, Game.mapY * 512
for _,fID in ipairs(Spring.GetFeaturesInRectangle(0,0, mapX, mapY)) do
local fDefID = Spring.GetFeatureDefID(fID)
local fDef = FeatureDefs[fDefID]
if (fDef.name == "treetype0") then
Spring.SetFeatureResurrect(fID, "armmav")
end
end
Last edited by trepan on 28 Mar 2007, 02:29, edited 1 time in total.
resurrecting things on map
Wow +1
This really would rock if this was ahppening not only ppl would start fighting on metal but also resurecting great units. This would also be very usefull in a campain story line where new tecnology could be gained by reserecting nuke facilitys for example
This really would rock if this was ahppening not only ppl would start fighting on metal but also resurecting great units. This would also be very usefull in a campain story line where new tecnology could be gained by reserecting nuke facilitys for example
Not much happens if there's no "armcom" or "armmav".
The resurrector keeps trying to resurrect a unit that can't
be resurrected.
It's easy to determine if a mod has a particular unit. You
can set up the UnitDefs table to have bidirectional mapping
(the CMD and CMDTYPE tables have the name mapping
already done for you, but not the Defs tables).
Then:
The resurrector keeps trying to resurrect a unit that can't
be resurrected.
It's easy to determine if a mod has a particular unit. You
can set up the UnitDefs table to have bidirectional mapping
(the CMD and CMDTYPE tables have the name mapping
already done for you, but not the Defs tables).
Code: Select all
for _,ud in pairs(UnitDefs) do
UnitDefs[ud.name] = ud
end
Code: Select all
if (UnitDefs["unitName"]) then ... end