Page 47 of 59

Re: Mod Question Repository... Questions come in, answers go out

Posted: 15 Jan 2010, 20:11
by thedude
It looks like the airplane plant has something buildin that looks like a repair pad (don't know if it also repairs) but one can also build a repairpad (the description of the repairpad tells that aircraftzs are repaired automaticallybut when I send a plane to the repairpad it also start to guard. By auromatically I understand that one does not have to give a repair command ) (I use ca-stable-6394)

Re: Mod Question Repository... Questions come in, answers go out

Posted: 16 Jan 2010, 02:21
by bobthedinosaur
Post in the CA sub forums as this is a CA issue. Sorry can't I help more.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 16 Jan 2010, 04:01
by KingRaptor
The plane will automatically fly to the pad to repair when its health drops below its "Land at" %, I don't know of a way to force it to go home for repairs.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 17 Jan 2010, 10:45
by PTSnoop
bobthedinosaur wrote:snoop: you want units being built to take no damage until complete?
Yep, that's exactly what I want.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 17 Jan 2010, 10:47
by Argh
To do that, you need to write some Lua to intercept the damage in the appropriate callin (UnitPreDamaged) which checks the Unit's build state (GetUnitHealth, iirc), and if it's not complete, returns 0.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 17 Jan 2010, 18:26
by bobthedinosaur
he needs a lua check? no he doesnt

just have it return 0 damage in hit by weapon until being built, via cob

Re: Mod Question Repository... Questions come in, answers go out

Posted: 22 Jan 2010, 02:01
by PTSnoop
HitByWeapon in Lua animation did the trick.

Next question. At the moment I've got a bunch of units that look basically along the lines of:

Image Image

The problem is the jaggies around the edges of the teamcolour lines.

Image

Is there an easy way of preventing them? The only way I can think of is to be careful when uvmapping to make sure all desired straight lines are perfectly horizontal or vertical; is there a way of doing this effectively on curved surfaces?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 22 Jan 2010, 02:31
by bobthedinosaur
you can try to anti alaise in the texture program you are using, but then you will run into a blurred texture problem. the best solution is to redo the UV map entirely (or the team color areas) with really straight UVs that will minimize the angled team colors.



to other modders. is there a way to adjust the time of the decloak effect after a cloaked unit fires its weapon?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 22 Jan 2010, 17:17
by Argh
Yeah, set... meh... I think it's "decloakonfire" to false (check that in Wiki) in the unitDef, then use the COB to set the cloak state manually.

On the aliased lines:

1. You'll hardly ever see that, except in screenshots.
2. If you aren't happy with that, grab the blur tool, set to 3-pixel radius, about 20% - 40% blur, and run it along that line, or lasso that edge (doesn't need to be perfect) and slightly blur it.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 22 Jan 2010, 22:22
by bobthedinosaur
hmm, didnt know about that code, it looks useful. what im looking for with the cloak though is a short fliker when shooting, i want the cloak to stay on but not be completely cloaked when shooting, like a short off then on. should i do that via script with get sets in the shot?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 23 Jan 2010, 00:38
by Argh
should i do that via script with get sets in the shot?
Yeah, should be OK.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 30 Jan 2010, 00:39
by Master-Athmos
I have a LUPS related question:
I'm thinking of doing an effect via LUPS but have some issues with its integration. While I should have everything needed and also have got a working radar dot spawning mechanism (like in NOTA) I still don't see any distortions or whatever else effects there are. To my understanding things like the distortion gets triggere by e.g. a weapon's AOE and there are lots of effects bound to standard TA unit names...

Still I'm not seeing any of them. Is there an additional "master setting" you have to switch or something to get those effects live?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 30 Jan 2010, 18:31
by Gota
This is the script of MR.D's annihilator.
the wanted behavior is for it to close down and retract its head and neck into itself when built.
When an enemy is in range it opens up and starts firing.
After all enemies are gone it has a cooldown period and than it,again,retracts its head and neck into the body until new enemies are inside it's range.

ATM,with this script it does not close when build only after the first shot.
after it shoot something it immediately closes down without a cooldown period and when aiming it constantly moves it's head left and right which looks horrible.

What is the problem in the script?

http://pastebin.com/m23286c57

Re: Mod Question Repository... Questions come in, answers go out

Posted: 31 Jan 2010, 00:43
by Noruas
Mr. D script for Anni fixed Gota has recieved...

Re: Mod Question Repository... Questions come in, answers go out

Posted: 06 Feb 2010, 07:38
by KingRaptor
So I've got this Lua unit script.

Why does it give this error at unit death and not execute script.Killed()?

Code: Select all

attempt to yield across metamethod/C-call boundary

Re: Mod Question Repository... Questions come in, answers go out

Posted: 06 Feb 2010, 09:21
by SeanHeron
I only yesterday wrote my first Lua-unitanimation, and maybe others could answer you so - for me it would be helpful to see the code you're using (I've no idea what the error message means though, so I'll likely not be able to help anyhow :/ )

Edit: hmm, though I was onto something but no...
Starting to deciphre the error - meta-methods are what are used in Lua for building classes (for objects), if I'm not mistaken. So that's likely refering to the class used for "script", I'd guess. I'll try to find out what the "yield" means.

2nd Edit: pardon my asking for the code, I completely missed the link....

Re: Mod Question Repository... Questions come in, answers go out

Posted: 06 Feb 2010, 11:48
by imbaczek
KingRaptor wrote:So I've got this Lua unit script.

Why does it give this error at unit death and not execute script.Killed()?

Code: Select all

attempt to yield across metamethod/C-call boundary
does it work if you remove sleeps?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 06 Feb 2010, 11:53
by Tobi
KingRaptor: do you have link to complete game/mod with this script in it, or simple instructions to create it from an existing game/mod?

Re: Mod Question Repository... Questions come in, answers go out

Posted: 06 Feb 2010, 13:46
by KingRaptor
http://kraptor.eat-peet.net/THIS_WIP11_beta2.sd7

Commenting out the sleeps didn't help.

Re: Mod Question Repository... Questions come in, answers go out

Posted: 06 Feb 2010, 13:59
by Tobi
There's a bug in it (when starting using Spring menu):
[string "gamedata/defs.lua"]:37: [string "gamedata/defs.lua"]:25: error = 2, gamedata/unitDefs.lua, error = 2, gamedata/unitdefs_post.lua, [string "gamedata/unitdefs_post.lua"]:63: attempt to perform arithmetic on local 'costMult' (a nil value)
EDIT:
And found the original issue.. bug in my unit script gadget :|

Now making a fix.

(Removing Sleeps does work though, probably you just forgot one?)

EDIT 2: Fixed in master