Jump to content

Knock out state


Recommended Posts

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 1

Which would call FadeOutGame from Game Script with its 5 arguments:

 

; Fades out the game to black, or vice versa

Function 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" selected

That'd pass the selected reference as akKiller without the need of copying the reference's form id.

Link to comment
Share on other sites

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 1

Which would call FadeOutGame from Game Script with its 5 arguments:

 

; Fades out the game to black, or vice versa

Function 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" selected

That'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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...