It works! Apparently all that culling of pointless unitdef params was good, and all I needed was to put transportSize = 10000 back in. I thought it was unnecessary because after reading http://springrts.com/wiki/Units-UnitDefs#Transports I dyslexiaed transportSize and transportMass (size defaults to 0, mass defaults to 100000).
PS aside from the LOD thing, everything seems to be running smoothly. Give it a go if you like before I actually release anything to springfiles. And it might be good to have someone other than my brother and I test it if it gets put into any other map.
edit: i forgot about sound--this def. needs sound (ha ha, get it?) (and this topic should be renamed "zoggop mumbles to himself")
wormXZ[wID] wormTarget[wID] bestDist[wID] worm[wID].x worm[wID].z worm[wID].blabla Makes many things easier eg: local function wormDie(wID) worm[wID] = nil end instead of reseting all tables manually.
Quote:
there are roughly 33 game frames per second
30
In function wormTargetting() you could skip alot of stuff if at the start you do if isEmergedWorm[uID]
Quote:
Give it a go if you like
too lazy to copy the stuff in some map to test :/
With MoveCtrl instead of attach'ing the worm could also swallow buildings and units that react lolzy to being attached, try attaching an aircraft There is some function to read piece position in world coordinates.
Also it is absolutely essential that bigger units do not get swallowed whole but are bitten into pieces. Like the cookiemonster that does not eat cookies but just enjoys throwing crumbles in the air Try if you can make unit pieces explode from a gadget, maybe:
Code:
env = Spring.UnitScript.GetScriptEnv(unitID) if (env) then local pieceNumber = math.random (0,table.getn(Spring.GetUnitPieceList (unitID))) --random piece local exploType = exploType = SFX.FALL + SFX.NO_HEATCLOUD Spring.UnitScript.CallAsUnit(unitID, env.Explode, pieceNumber, exploType) end
(lus-units only, not tested)
Quote:
Spring.MarkerAddPoint(x, y, z, "Worm Sign") Spring.MarkerErasePosition(x, y, z)
kinda dislike when widgets do this because it erases drawings in a radius around x,y,z. But I guess it is up to the mod to add some better MiniMapPing (x,y,z) function. (iirc zK has that, at least i remember circles on the minimap if something gets attacked. Not sure if useable by other wupgets)
I'm also not really a fan of the the whole adding a marker point and erasing it thing, but I was feeling too lazy to write something that does essentially the same thing, but more aesthetically & without accidentally erasing other marker points. :-P
Just tried it out in a 1v1 game, and discovered that worm chases airplanes like a dog chasing a laser pointer. LOL need to add an if.
much progress: sounds, lod fixed, sworm no longer ghosts as a penis, less shitty radar icon, targetting prioritization, little lightning arcs on the sand, working on a worm sign notification widget that's not just markeraddpoint&markerremoveposition (pink lightning bolt icon instead!).
Users browsing this forum: No registered users and 0 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum