Can someone help fix this gadget?

Can someone help fix this gadget?

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

Moderator: Moderators

Post Reply
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Can someone help fix this gadget?

Post by Forboding Angel »

http://pastebin.ca/1964269

Basically, what it's supposed to do is add a customparam for weapons that will cause that weapon to not damage (or do -damage in this case) to enemy units.

Quantum already helped me some (This is a mutation of his no friendly fire gadget), and I've tried everything I could think of (Which, admittedly, isn't much).

Anyone see where I went wrong?
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Can someone help fix this gadget?

Post by Niobium »

In new spring don't you have to return two values for PreDamaged, being damage and impulse? Other than that it looks pretty solid.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Can someone help fix this gadget?

Post by Forboding Angel »

Problem is, it doesn't work :-(

Also about the two damage values you mentioned... I don't understand :cry:
User avatar
bobthedinosaur
Blood & Steel Developer
Posts: 2702
Joined: 25 Aug 2004, 13:31

Re: Can someone help fix this gadget?

Post by bobthedinosaur »

well wouldnt you define them as 0, 0 for 0 damage and 0 impulse?
User avatar
Niobium
Posts: 456
Joined: 07 Dec 2008, 02:35

Re: Can someone help fix this gadget?

Post by Niobium »

bobthedinosaur wrote:well wouldnt you define them as 0, 0 for 0 damage and 0 impulse?
Yep, so you'd have:
return damage, 1
or
return 0, 0

At least this is what every damage gadget in BA was changed to with new spring.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Can someone help fix this gadget?

Post by FLOZi »

You only have to return the first value, second is optional.

(Unless it was broken again in 82.6.1 but I haven't heard any complaints from S44 testers)
Post Reply

Return to “Lua Scripts”