User talk:Knorke: Difference between revisions

From Spring
Jump to navigationJump to search
Knorke (talk | contribs)
m answer
Knorke (talk | contribs)
m →what your meaning ?: fix mistake
Line 21: Line 21:
I hate looking at scripts and see many numbers with no meaning!
I hate looking at scripts and see many numbers with no meaning!


2) ''Spring.UnitScript.GetUnitValue(COB.BUILD_PERCENT_LEFT)''
2) ''Spring.UnitScript.GetUnitValue(COB.HEALTH)''


Number replaced with constant, is better now.
Number replaced with constant, is better now.
Line 28: Line 28:


I like this one best.
I like this one best.


== http://springrts.com/wiki/Animation-LuaCallins ==
== http://springrts.com/wiki/Animation-LuaCallins ==

Revision as of 03:03, 14 November 2012

how a knorke brain work ?

  • how the knorke game maker moderator engine dev who writed :
--- knorke says:

dont use the stupid GetUnitValue with stilly number parameter,...blablah... Using numbers is evil TA style!

feel not acting felony when showing factory in NOTreleased mods and by playing activelly often ZK corecommander COB factory ?

what your meaning ?

  1. infiltrating evil group of TA atari suppots /server owners /engine owner/devs for convert them to remove all copyright infrigement and factory of their OWNED mod(+engine) ?
  2. being a pure troll unaware of being illogic ?
  3. being nice & quiet for not shocking mad people having the power to crush insurgent but still pushing slowly in the good direction ?


knorke says:
In example, script wants to get health of unit:

1) Spring.UnitScript.GetUnitValue(4)

Very confusing, what does 4 mean? Reader does not know. I hate looking at scripts and see many numbers with no meaning!

2) Spring.UnitScript.GetUnitValue(COB.HEALTH)

Number replaced with constant, is better now.

3) health=Spring.GetUnitHealth(unitID)

I like this one best.

http://springrts.com/wiki/Animation-LuaCallins

BTW, don't forget to set INBUILDSTANCE to 1 to start building! For lua script, that is
function script.StartBuilding(heading, pitch)
SetUnitValue(COB.INBUILDSTANCE, 1)
end
function script.StopBuilding()
SetUnitValue(COB.INBUILDSTANCE, 0)
end


knorke says: yes, for 2 or 3 things there is no other function and SetUnitValue must be used. (for now?) But again, use SetUnitValue(COB.INBUILDSTANCE, 0)

and not

SetUnitValue(5, 0)