Code console codes

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Boo
Private
Posts: 34
Joined: Fri Jul 18, 2008 1:57 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: mos eisley cantina (under Greedos table)

Code console codes

Post by Boo »

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 :oops:
ryukaji
Major
Major
Posts: 513
Joined: Mon Sep 17, 2007 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Code console codes

Post by ryukaji »

Code console? the only way i know of to change a units health is in their .odf file not in .lua
User avatar
Boo
Private
Posts: 34
Joined: Fri Jul 18, 2008 1:57 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: mos eisley cantina (under Greedos table)

Re: Code console codes

Post by Boo »

ryukaji wrote:Code console? the only way i know of to change a units health is in their .odf file not in .lua
that means i cant make that a unit has 4000 hp in game with the fakeconsole
ryukaji
Major
Major
Posts: 513
Joined: Mon Sep 17, 2007 7:46 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Contact:

Re: Code console codes

Post by ryukaji »

oh you meant fake console and no i dont think it does that...
User avatar
Boo
Private
Posts: 34
Joined: Fri Jul 18, 2008 1:57 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: mos eisley cantina (under Greedos table)

Re: Code console codes

Post by Boo »

ryukaji wrote:oh you meant fake console and no i dont think it does that...
ok thanks ----solved----
Aman/Pinguin
Jedi
Jedi
Posts: 1104
Joined: Tue Jan 30, 2007 6:04 am
Projects :: Inactive
Location: Germany

Re: Code console codes

Post by Aman/Pinguin »

Of course it does. I'm too busy to write that line though. xD
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Code console codes

Post by [RDH]Zerted »

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.
User avatar
Boo
Private
Posts: 34
Joined: Fri Jul 18, 2008 1:57 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: mos eisley cantina (under Greedos table)

Re: Code console codes

Post by Boo »

[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.
thanks but can you give me a correct code please because i dont want to make a script and i cant mod (good)
just pm me
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Code console codes

Post by DarthD.U.C.K. »

Boo wrote:
[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.
thanks but can you give me a correct code please because i dont want to make a script and i cant mod (good)
just pm me
:?
User avatar
Maveritchell
Jedi Admin
Jedi Admin
Posts: 7366
Joined: Mon Aug 21, 2006 11:03 pm

Re: Code console codes

Post by Maveritchell »

Boo wrote:
[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.
thanks but can you give me a correct code please because i dont want to make a script and i cant mod (good)
just pm me
He just gave you the script - SetClassProperty("unitclass name", "MaxHealth", 4000)
SetClassProperty("unitclass name", "CurHealth", 4000)
User avatar
Boo
Private
Posts: 34
Joined: Fri Jul 18, 2008 1:57 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: mos eisley cantina (under Greedos table)

Re: Code console codes

Post by Boo »

Maveritchell wrote:
Boo wrote:
[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.
thanks but can you give me a correct code please because i dont want to make a script and i cant mod (good)
just pm me
He just gave you the script - SetClassProperty("unitclass name", "MaxHealth", 4000)
SetClassProperty("unitclass name", "CurHealth", 4000)
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.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Code console codes

Post by [RDH]Zerted »

Boo wrote:but it works now and please lock the topic.
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...
Post Reply