ughfhhyg4555786 Posted April 3, 2023 Author Share Posted April 3, 2023 This works like a charm. So callfunction can call any script function in console,right? Link to comment Share on other sites More sharing options...
DieFeM Posted April 3, 2023 Share Posted April 3, 2023 CallFunction (cf) can call any function from scripts attached or inherited on the selected reference.CallGlobalFunction does the same thing for global functions like Game.FadeOutGame: cgf "Game.FadeOutGame" 1 1 1 1 1Which would call FadeOutGame from Game Script with its 5 arguments: ; Fades out the game to black, or vice versaFunction FadeOutGame(bool abFadingOut, bool abBlackFade, float afSecsBeforeFade, float afFadeDuration, bool abStayFaded = false) native global And there's a third one, CallQuestFunction, which calls functions from scripts attached to quests: cqf QuestEditorIDorFormID "ScriptName.FunctionName" arguments On most cases, when you pass an argument to a function you can use the word selected to send the current selected reference. Let's say you want to kill piper and "blame" the actor that you have currently selected: 2F25.cf "Actor.KillEssential" selectedThat'd pass the selected reference as akKiller without the need of copying the reference's form id. Link to comment Share on other sites More sharing options...
lee3310 Posted April 3, 2023 Share Posted April 3, 2023 CallFunction (cf) can call any function from scripts attached or inherited on the selected reference.CallGlobalFunction does the same thing for global functions like Game.FadeOutGame: cgf "Game.FadeOutGame" 1 1 1 1 1Which would call FadeOutGame from Game Script with its 5 arguments: ; Fades out the game to black, or vice versaFunction FadeOutGame(bool abFadingOut, bool abBlackFade, float afSecsBeforeFade, float afFadeDuration, bool abStayFaded = false) native global And there's a third one, CallQuestFunction, which calls functions from scripts attached to quests: cqf QuestEditorIDorFormID "ScriptName.FunctionName" arguments On most cases, when you pass an argument to a function you can use the word selected to send the current selected reference. Let's say you want to kill piper and "blame" the actor that you have currently selected: 2F25.cf "Actor.KillEssential" selectedThat'd pass the selected reference as akKiller without the need of copying the reference's form id.oO, didn't know about the "selected" keyword. Link to comment Share on other sites More sharing options...
ughfhhyg4555786 Posted April 4, 2023 Author Share Posted April 4, 2023 wow, this is really valuable information. I played fallout 4 almost three years, but never know I can use this in console. Thank you very much guys. Link to comment Share on other sites More sharing options...
DieFeM Posted April 4, 2023 Share Posted April 4, 2023 I like using this one, very funny: Player.cf "ObjectReference.PushActorAway" selected 1000 :laugh: Link to comment Share on other sites More sharing options...
ughfhhyg4555786 Posted April 4, 2023 Author Share Posted April 4, 2023 definitely gonna to try Link to comment Share on other sites More sharing options...
Recommended Posts