Mood is a thing for
Moderator: Moderators
Re: Mood is a thing for
yep, 29 years long... surely, if you give me another year, i can get all grown up and serious buisnessmeni
ZogOP, would you be okay, if i ported your sandworm afterwards to Behes Melange? The Spice must flow, no matter if there are worms in it..
ZogOP, would you be okay, if i ported your sandworm afterwards to Behes Melange? The Spice must flow, no matter if there are worms in it..
Re: Mood is a thing for
I'm all for the flow. How can I call your swallow function with my gadget? (so continues moment of slippage) But really though, should I just put swallow in a TransportPickup callin, or is it possible to explicitly call script functions from within a gadget?PicassoCT wrote:ZogOP, would you be okay, if i ported your sandworm afterwards to Behes Melange? The Spice must flow, no matter if there are worms in it..
edit: i'm an idiot, i need to fix the unitdef
Re: Mood is a thing for
Are we there, dad?
No, wait, that doesent fit the situation.
IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
........................................................................................................................IS IT DONE YET, ZOGGOP?!IS IT
........................................................................................................................DONE YET, ZOGGOP?!IS IT DONE YET,
........................................................................................................................ZOGGOP?!IS IT DONE YET,
........................................................................................................................ZOGGOP?!IS IT DONE YET,
........................................................................................................................ZOGGOP?!IS IT DONE YET,
........................................................................................................................ ZOGGOP?!IS IT DONE YET,
........................................................................................................................ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
IS IT DONE YET, ZOGGOP?!IS IT DONE
YET, ZOGGOP?!IS IT DONE YET,
ZOGGOP?!IS IT DONE YET, ZOGGOP?!
IS IT DONE YET, ZOGGOP?!IS IT DONE
YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
IS IT DONE YET, ZOGGOP?!IS IT DONE
YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
IS IT DONE YET, ZOGGOP?!IS IT DONE
YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?! IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
....................................................................... IS IT DONE YET, ZOGGOP?!
.......................................................................IS IT DONE YET, ZOGGOP?!
....................................................................... IS IT DONE YET, ZOGGOP?!
No, wait, that doesent fit the situation.
IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
........................................................................................................................IS IT DONE YET, ZOGGOP?!IS IT
........................................................................................................................DONE YET, ZOGGOP?!IS IT DONE YET,
........................................................................................................................ZOGGOP?!IS IT DONE YET,
........................................................................................................................ZOGGOP?!IS IT DONE YET,
........................................................................................................................ZOGGOP?!IS IT DONE YET,
........................................................................................................................ ZOGGOP?!IS IT DONE YET,
........................................................................................................................ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
IS IT DONE YET, ZOGGOP?!IS IT DONE
YET, ZOGGOP?!IS IT DONE YET,
ZOGGOP?!IS IT DONE YET, ZOGGOP?!
IS IT DONE YET, ZOGGOP?!IS IT DONE
YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
IS IT DONE YET, ZOGGOP?!IS IT DONE
YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
IS IT DONE YET, ZOGGOP?!IS IT DONE
YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?! IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!IS IT DONE YET, ZOGGOP?!
....................................................................... IS IT DONE YET, ZOGGOP?!
.......................................................................IS IT DONE YET, ZOGGOP?!
....................................................................... IS IT DONE YET, ZOGGOP?!
Re: Mood is a thing for
No. Waiting is good for you. It builds character.
The unit script doesn't seem to be getting used (and I should hope it likes to get used).^ this happens, yet every time I create a unit:
Why is Spring looking for the COB script at all, if it found the lua script?
(emergesworm is your unit renamed, which I did for a reason, but I forgot)
The unit script doesn't seem to be getting used (and I should hope it likes to get used).
Code: Select all
[f=0000000] Loading gadget: Lua unit script framework <unit_script.lua>
[f=0000000] Loading unit script: scripts/emergesworm.lua
Code: Select all
[f=0003600] Warning: Could not load COB script for unit "emergesworm" from: scripts/emergesworm.cob
(emergesworm is your unit renamed, which I did for a reason, but I forgot)
Re: Mood is a thing for
did you tell it in the unitdef to look for the script?
something like
script= NameItlikeyouwant.lua,
something like
script= NameItlikeyouwant.lua,
Re: Mood is a thing for
you have to specify .lua for lua unit scripts..
so script = wagarble.lua
so script = wagarble.lua
Re: Mood is a thing for
Not really, but it like, does something now, and stuff. It has a 50% chance (plus 1% for every unit on the sand) to randomly eat a unit on the sand, and does so. Since you're practically jumping up and down, here's what I have so far, which is kind of lame, and causes segfaults with some AIs. I'm guessing I'll have something cooler with wormsign etc in about a week, following my omg-new-thing/who-gives-a-fuck/sucked-back-in cycle.IS IT DONE YET, ZOGGOP?!
- Attachments
-
- cal-sworm_testing.zip
- (511.78 KiB) Downloaded 23 times
Re: Mood is a thing for
The worm movement lua all works, and I made a worm sign lightning effect. I'd show screenshots, but, it's lightning, so I can't really time a screenshot right. What still doesn't work is AttachUnit. I've tried putting this immediately after creating Picasso's swallowing worm unit:
(worm is attackerID)
I've also tried putting the AttachUnit call in the unit script: at the top of the swallow function, which is called by:
(interestingly, simply calling AttachUnit rather than Spring.UnitScript.AttachUnit in the script results in an attempt to call a nil global error)
Both methods don't attach anything. The unit being swallowed runs away, and then disappears when swallow() destroys it.
Any suggestions?
Code: Select all
Spring.UnitScript.CallAsUnit(attackerID, Spring.UnitScript.AttachUnit, 10, targetID)
I've also tried putting the AttachUnit call in the unit script:
Code: Select all
Spring.UnitScript.AttachUnit(foodmagnet, idUnitToBeSwallowed)
Code: Select all
function script.Create()
--move the worm into the position underground
Move(center,y_axis,-230,0) --Moves the worm underground Instantanously
Spin(center,y_axis,0.02,1) -- worm rotates slowly
local x,y,z = Spring.GetUnitPosition (unitID)
if (x and y and z) then
local nearunits=Spring.GetUnitsInSphere (x,y,z, 32) or "nothing"
if (nearunits~="nothing") then
for _, nearunitid in ipairs (nearunits) do
if (nearunitid~=unitID) then
swallow(nearunitid)
break
end
end
end
end
end
Both methods don't attach anything. The unit being swallowed runs away, and then disappears when swallow() destroys it.
Any suggestions?
Re: Mood is a thing for
AttachUnit will only work if the unit calling it has the transportCapacity tag
This is because AttachUnit is not localised in the default unit script header ( https://github.com/spring/spring/blob/m ... header.lua ), due to it not being used in most scripts and there being a limited number of locals in a lua script, iirc.simply calling AttachUnit rather than Spring.UnitScript.AttachUnit in the script results in an attempt to call a nil global error
Re: Mood is a thing for
from the worm's unitdefs:FLOZi wrote:AttachUnit will only work if the unit calling it has the transportCapacity tag
Code: Select all
isTransport = true,
loadingRadius = 512,
transportCapacity = 10,
transportMass = 50000,
transportSize = 10000,
Re: Mood is a thing for
Well.. the runaway is easily fixxed.. by setting the units acceleration to zero.
http://code.google.com/p/zero-k/source/ ... arch+Trunk
unit that loads another unit..
http://code.google.com/p/zero-k/source/ ... arch+Trunk
unit that loads another unit..
Re: Mood is a thing for
have been fiddling with the unitdef per zK's armtboat. still can't get it to attach to anything. is there some kind of uberverbose engine mode that would tell me something helpful like "AttachUnit() not allowed because ____"? or is that pie in the sky?
Re: Mood is a thing for
lets handle this systematic, like a doctor cutting of slices of patient until the guy can be delcared healthy.
Obviously the unitdef. Some of those keywords trigger magic chainreactions, leading to other keywords beeing ignored. If you say its a boat, maxfleightheight will be ignored. So coment everything in there out, that isnt absolutly needed.
Next post infolog.
Obviously the unitdef. Some of those keywords trigger magic chainreactions, leading to other keywords beeing ignored. If you say its a boat, maxfleightheight will be ignored. So coment everything in there out, that isnt absolutly needed.
Next post infolog.
Re: Mood is a thing for
good idea
let the culling begin
let the culling begin
Re: Mood is a thing for
whole damned unitdef:
will not attach. waiting for the other doctor to come take the paddles out of my hands and tell me that his pulse stopped ten minutes ago.
edit: here is infolog, but it's not terribly helpful, and mostly full of debug info from the sand worm gadget.
Code: Select all
return {
sworm = {
blocking = false,
canmove = true,
description = "Giant hungry beast.",
footprintx = 6,
footprintz = 6,
-- holdSteady = true,
isFirePlatform = true,
-- isTransport = true,
levelGround = false,
-- loadingRadius = 256,
maxdamage = 9999,
name = "Sand Worm",
objectname = "sWorm.s3o",
script = [[sWorm.lua]],
-- transmaxunits = [[10]],
transportCapacity = 100,
transportMass = 50000,
-- transportSize = 10000,
customParams = {
ignoreplacementrestriction = true,
},
},
}
edit: here is infolog, but it's not terribly helpful, and mostly full of debug info from the sand worm gadget.
Re: Mood is a thing for
This is for a map right? What game are you testing? There are some limits to prevent loading enemy units, though I would have thought directly AttachUnit'ing the id should work.
Re: Mood is a thing for
Right, the prevention of loading enemy units is why I'm not making the worm actually a transport and giving it load unit commands. I thought the AttachUnit thing would work because it worked for knorke's magnetic BA, which is what I used to tell me what unitdef parameters to use (magnetic BA has a thing that posts to the unitdefs before the game somehow), and how to attach units. The game I'm testing is BA 7.63.
edit: wait, the magnetic thing was only done on friendly units. maybe the no enemy unit loading test is done at an AttachUnit level? But I guess I thought in BA most units are nappable anyway. Well, to continue thinking out loud, I'll make the worms spawn on the same team as the unit they're eating, see what happens.
edit: wait, the magnetic thing was only done on friendly units. maybe the no enemy unit loading test is done at an AttachUnit level? But I guess I thought in BA most units are nappable anyway. Well, to continue thinking out loud, I'll make the worms spawn on the same team as the unit they're eating, see what happens.
Re: Mood is a thing for
Ill gladly add an exception to no load enemy units to gaia units if you need me to.
Re: Mood is a thing for
knorkes magnetic mod loaded enemys and friendlys.. resulting in funny towerdefense infights.. and a full wormstomage is a full wormstomage.. shall god sort out his own..zoggop wrote:Right, the prevention of loading enemy units is why I'm not making the worm actually a transport and giving it load unit commands. I thought the AttachUnit thing would work because it worked for knorke's magnetic BA, which is what I used to tell me what unitdef parameters to use (magnetic BA has a thing that posts to the unitdefs before the game somehow), and how to attach units. The game I'm testing is BA 7.63.
edit: wait, the magnetic thing was only done on friendly units. maybe the no enemy unit loading test is done at an AttachUnit level? But I guess I thought in BA most units are nappable anyway. Well, to continue thinking out loud, I'll make the worms spawn on the same team as the unit they're eating, see what happens.
Spring.UnitScript.AttachUnit ( piece, passengerID )
should work with transport.
Re: Mood is a thing for
Thanks, but it seems that the unit's team wasn't the problem.Beherith wrote:Ill gladly add an exception to no load enemy units to gaia units if you need me to.
I agree, but um...Spring.UnitScript.AttachUnit ( piece, passengerID )
should work with transport.