Code console codes
Posted: Sat Jan 03, 2009 1:59 pm
can i put in a lua code in the code console that gives al units 4000 hp
and witch code is it im not very good in modding
and witch code is it im not very good in modding
that means i cant make that a unit has 4000 hp in game with the fakeconsoleryukaji wrote:Code console? the only way i know of to change a units health is in their .odf file not in .lua
ok thanks ----solved----ryukaji wrote:oh you meant fake console and no i dont think it does that...
thanks but can you give me a correct code please because i dont want to make a script and i cant mod (good)[RDH]Zerted wrote:Yeah, you could write a line to do that. I don't know the exact line offhand, but it would be something like SetClassProperty(<unit class>, "CurHealth", 4000).
You could also create a custom user script that adds that change health command as a standard Fakeconsole command. That way you won't have to type it in every time.
Boo wrote:thanks but can you give me a correct code please because i dont want to make a script and i cant mod (good)[RDH]Zerted wrote:Yeah, you could write a line to do that. I don't know the exact line offhand, but it would be something like SetClassProperty(<unit class>, "CurHealth", 4000).
You could also create a custom user script that adds that change health command as a standard Fakeconsole command. That way you won't have to type it in every time.
just pm me
He just gave you the script - SetClassProperty("unitclass name", "MaxHealth", 4000)Boo wrote:thanks but can you give me a correct code please because i dont want to make a script and i cant mod (good)[RDH]Zerted wrote:Yeah, you could write a line to do that. I don't know the exact line offhand, but it would be something like SetClassProperty(<unit class>, "CurHealth", 4000).
You could also create a custom user script that adds that change health command as a standard Fakeconsole command. That way you won't have to type it in every time.
just pm me
i know but at the first time i doesnt work so i tought that there was an error in the code but it works now and please lock the topic.Maveritchell wrote:He just gave you the script - SetClassProperty("unitclass name", "MaxHealth", 4000)Boo wrote:thanks but can you give me a correct code please because i dont want to make a script and i cant mod (good)[RDH]Zerted wrote:Yeah, you could write a line to do that. I don't know the exact line offhand, but it would be something like SetClassProperty(<unit class>, "CurHealth", 4000).
You could also create a custom user script that adds that change health command as a standard Fakeconsole command. That way you won't have to type it in every time.
just pm me
SetClassProperty("unitclass name", "CurHealth", 4000)
I'd rather not, as there is a better way to do it. But I haven't had the time to look that code up yet...Boo wrote:but it works now and please lock the topic.