Page 1 of 1

Fake Console Code Console Lua Unit Commands (Phew!( [Solved]

Posted: Tue Apr 17, 2012 8:22 am
by yukisuna
Hi Gametoast, i know this question has been answered before, but i didnt manage to find the post. this is mostly directed at the more experienced lua coders.

straight to it: I cant remember the Lua code setup for the fake console's code console to change unit values. can you please help me out on this? :)

Basically, i want to know the code to change a units values (example: WeaponName) i need to know how i am to set the line of lua up so it will change the units weapon (for example, the engineer's main primary weapon, to the rifleman's) or any other weapon loaded with the side. Does anyone remember this? Thank You For Any Help

I Do remember how to change the values when programming the side before munging, and i know how to check which values will work - but i dont remember in what order to write then in to the console!

EDIT: Thanks A Lot, Yuke, That Was EXACTLY What I Were Looking For! :D
I Needed to find out

SetClassProperty("rep_inf_ep3officer", "PointsToUnlock", 0)
^This^ ^ ^ ^ All the , signs and () Signs, where to put them! Again Thank You, I'll Save this somewhere and credit your name there in case i decide to use it as a part of a tutorial :3

Re: Fake Console Code Console Lua Unit Commands (Phew!)

Posted: Tue Apr 17, 2012 3:21 pm
by yuke5
THIS might help. All the Fake Console does is use LUA commands (well, it does a little more than that). You can use these LUA commands to change stuff, like how many points it takes to unlock a unit, or what gun a unit has.

You can see all the LUA commands HERE However, what you're specifically trying to do is explained in the tutorial above. I just posted this link for extra reference if you have any further questions. Good luck and happy modding!

P.S.

You can change a unit's value by adding this code:

Code: Select all

SetClassProperty("rep_inf_ep3officer", "PointsToUnlock", 0)
By inserting this line after I set up my teams, I made the Republic officer unlocked at the beginning of the map. You put the name of the unit, "PointsToUnlock" and after that, how many points it takes to unlock the unit.

Edit: No problem man, just doing my job. Glad I could help! :D