Page 1 of 1
Disable fakeconsole through scripting [Solved]
Posted: Wed Mar 23, 2011 7:49 pm
by asleeponduty
Hey, I have a problem.
My brother is addicted to fakeconsole, and is causing trouble in my map. Without uninstalling the 1.3 patch, I want to disable the fakeconsole just for my map, or make it do stuff in the map fore me, say trigger an animation.
How could I do this?
thanks,
asleeponduty
Re: Disable fakeconsole through scripting
Posted: Thu Mar 24, 2011 8:06 pm
by CalvaryCptMike
Okay so wait...
How is your brother "causing trouble" in your map? He can only use it to change the gameplay as he uses your map, he can not permanently change anything or mess with your map FILES with the fake console.
So basically if I understand your question: your brother is using the fake console to cheat and/or have fun running around w/invuln at super high speeds and you for some reason want to put an end to it...?

Anyways I don't know of anyway to do this.
Okay but now for the second part of your question:
Well all of the fake console commands are just Lua commands that you should just add right in your mission script.
For Instance:
When you use the Fake console command "EnableAIAutoBalance Off" all that does is uses the Lua function:
So if you want to say Trigger an animation just tell what ever you're animating to do it
right in the lua script itself. Hopefully this is want you needed.
Re: Disable fakeconsole through scripting
Posted: Thu Mar 24, 2011 8:41 pm
by fasty
Make a custom ingame.lvl.
Have it say:
Code: Select all
ucft
{
REQN
{
"script"
"ifs_fakeconsole"
}
Open up ifs_fakeconsole in C:\BF2_ModTools\data_ABC\Common\scripts
Change this:
Code: Select all
fakeconsole_listbox_layout = {
-- Height is calculated from yHeight, Spacing, showcount.
yHeight = 22,
ySpacing = 0,
showcount = 9,
font = gListboxItemFont,
width = 320,
To this:
Code: Select all
fakeconsole_listbox_layout = {
-- Height is calculated from yHeight, Spacing, showcount.
yHeight = 0,
ySpacing = 0,
showcount = 9,
font = gListboxItemFont,
width = 0,
It worked for me anyway. There are probably better ways and I think this will affect all maps as long as this maps installed.
Re: Disable fakeconsole through scripting
Posted: Thu Mar 24, 2011 9:25 pm
by asleeponduty
Okay, Ill just do that instead, because the annoyingness of teleporting every single unit to out of bounds and a million feet in the air is pretty annoying.
Thanks!
Solved.
Re: Disable fakeconsole through scripting [Solved]
Posted: Sat Mar 26, 2011 12:22 am
by [RDH]Zerted
There are many other ways you could have done it too. The simplest would be adding DisableNormalFCCommands = true somewhere in your map script (such as the very top). That should disable all the commands I added and still allow all the game's commands in the debug version.
Re: Disable fakeconsole through scripting [Solved]
Posted: Sat Mar 26, 2011 2:30 am
by THEWULFMAN

wow folks, its that easy.
Give yourself a round of applause for making things harder on youself

Re: Disable fakeconsole through scripting
Posted: Sun Mar 27, 2011 9:16 pm
by asleeponduty
CalvaryCptMike wrote:
So if you want to say Trigger an animation just tell what ever you're animating to do it right in the lua script itself. Hopefully this is want you needed.
Something like this?
Code: Select all
function scriptPostLoad()
blablabla
end
function Cheat()
DeactivateRegion("trigger_mapend")
PauseAnimation("freedom")
RewindAnimation("freedom")
PlayAnimation("freedom")
end
And so how would i designate a button for this, or does it do it itself?
Re: Disable fakeconsole through scripting [Solved]
Posted: Sun Apr 01, 2012 12:36 am
by fasty
Pardon the bump, but does anyone know of any other ways to disable FC? Zerteds method does not seem to work for me.