Public Member Functions | |
void | CallDelayedMapScript (const kStr &in funcName, kActor@ instigator, const float delay) |
even with delay 0 it will be called when map scripts update | |
void | CallDelayedMapScript (const int scriptID, kActor@ instigator, const float delay) |
even with delay 0 it will be called when map scripts update | |
void | CallMapScript (const int scriptID, kActor@ instigator) |
Use to call map script right away. | |
void | HaltMapScript (const int scriptID) |
void | PlaySound (const kStr &in path) |
void | PlaySoundID (const int soundID) |
void | PlayMusic (const kStr &in path, const bool loop) |
bool | MusicIsPlaying () |
bool | MusicIsPaused () |
void | PauseMusic () |
void | ResumeMusic () |
kStr | MusicSong () |
void | MusicPitch (const float pitch) |
int | PlayTactile (const kStr &in path, int channel, int pos) |
Start controller vibration from tactile sound file. Returns a handle. | |
bool | IsTactilePlaying (int vibHandle) |
bool | IsTactilePlaying (int vibHandle, const kStr &in path) |
void | StopMusic () |
void | StopTactile (int vibHandle) |
void | StopAllTactile () |
void | Restart () |
void | PrintLine (const kStr &in text, const int lineNumber, const int ticks=120) |
Print a message to the HUD. | |
void | Print (const kStr &in text, const int ticks=120) |
Print a message to the HUD on the next line. | |
void | PrintHelp (const kStr &in text, const bool endGame=false) |
void | StartTimer () |
void | StopTimer () |
void | RemoveTimer () |
void | ChangeMap (const kStr &in path) |
void | ShowMainMenu (const bool mouseCenter=true) |
const int | GetMapNumberFromName (const kStr &in mapName) |
This returns the HUB number NOT the map number. mapName is the HUB name such as "Map_Jungle". | |
const int | GetMapIDFromName (const kStr &in mapName) |
This returns the mapID from the mapName. | |
const int | GetCurrentMapID () |
const int | GetDifficulty () |
EnumDifficulty. Internally calls GameVariables.GetInt("g_difficulty") | |
void | SetDifficulty (const int value) |
EnumDifficulty. | |
float | GetGameSpeed () |
void | SetGameSpeed (const float speed, const float blendSpeed) |
Sets the current GameSpeed. kPuppet and kPlayerWeapon are not effected by GameSpeed. | |
bool | GetHubKeyInfo (const uint hubID, int &out nKeys, int &out remainingKeys, int &out keyBits) |
bool | SetHubKey (const uint hubID, int key) |
void | SpawnFx (const kStr &in fxPath, kActor@ source, const kVec3 &in velocity, const kVec3 &in origin, const kQuat &in rotation) |
void | SpawnFx (const kStr &in fxPath, kPuppet@ source, const kVec3 &in velocity, const kVec3 &in origin, const kQuat &in rotation) |
void | SpawnFx (const kStr &in fxPath, kActor@ source, const kVec3 &in origin, const kQuat &in rotation) |
void | SpawnFx (const kStr &in fxPath, kPuppet@ source, const kVec3 &in origin, const kQuat &in rotation) |
void | SpawnFx (const kStr &in fxPath, kActor@ source, const kVec3 &in origin, const float yaw, const float pitch) |
void | SpawnFx (const kStr &in fxPath, kPuppet@ source, const kVec3 &in origin, const float yaw, const float pitch) |
void | SpawnFx (const kStr &in fxPath, const kVec3 &in origin, const int sectorIndex) |
kStr | GetLocalizedText (const kStr &in key) |
const bool | AutomapEnabled () |
is the automap displaying on screen | |
const bool | AutomapDeactived () |
void | AutomapToggle (const bool toggle) |
show/hide the automap. | |
void | AutomapDeactive (const bool toggle) |
permanently deactivates the automap. | |
void | AutomapCustom (const bool toggle) |
allow actors with custom automap colors to be drawn to the automap. (for mods) | |
void | LifeForcePulse () |
Shows the LifeForces on the HUD. | |
void | LivesPulse () |
Shows the Lives on the HUD. | |
void | RunWalkPulse () |
Shows the RunWalk graphic on the HUD. | |
void | WeaponWheelPulse () |
Shows the WeaponWheel on the HUD. | |
bool | SetWeaponWheelPic (const int weapon, const kStr &in imagePath) |
bool | ClearWeaponWheelPic (const int weapon) |
void | SetLivesPic (const kStr &in imagePath) |
void | ClearLivesPic () |
void | SetLifeForcePic (const kStr &in imagePath) |
void | ClearLifeForcePic () |
void | MessageBox (const kStr &in msg1, const kStr &in msg2) |
void | ConfirmMenu (const kStr &in msg1, const kStr &in msg2) |
void | SaveMenu () |
Opens the save game menu. Should always check if(PlayLoop.CanOpenSaveMenu()) | |
void | LoadMenu () |
Opens the load game menu. Should always check if(PlayLoop.CanOpenPauseMenu()) | |
void | SetDamageFlash () |
Shows the damage screen flash. | |
void | SetPickupFlash () |
Shows the pickup screen flash. | |
void | SetArmorFlash () |
Shows the armor damage screen flash. | |
const uint | ConButtons () |
EnumPlayerConButtons. | |
uint | MenuButtons (void) const int64 GetTimestamp() |
void | GetDateAndTime (int &out seconds, int &out minutes, int &out hours, int &out day, int &out month, int &out year, kStr &out text) |
void | KillAllFx () |
void | StopSounds () |
void | AddText (const int id, const int font, const kStr &in text, const float x, const float y, const int edge=0, const float scale=1.0f, const bool center=false, const bool shadow=false, const int r=255, const int g=255, const int b=255, const int a=255, const int r2=255, const int g2=255, const int b2=255, const int a2=255) |
add custom text to the HUD. HUD size is 640x480 (pillar box). AddPic must be done in OnPostBeginLevel or later. if the id already exists then simply sets all it's variables. | |
bool | SetTextMsg (const int id, const kStr &in text) |
bool | SetTextOrigin (const int id, const float x, const float y) |
bool | SetTextColor (const int id, const int r=255, const int g=255, const int b=255, const int a=255) |
bool | SetTextColors (const int id, const int r=255, const int g=255, const int b=255, const int a=255, const int r2=255, const int g2=255, const int b2=255, const int a2=255) |
bool | SetTextProps (const int id, const float scale, const int font=0, const int edge=0, const bool center=false, const bool shadow=false) |
Set the text scale, font, edge, center, shadow. | |
bool | RemoveText (const int id) |
void | ClearText () |
void | GetTextSize (const kStr &in text, const int font, const float scale, float &out width, float &out height) |
EnumGameFontType. | |
float | GetHUDOffset (const bool user=false) |
if user is false will return the width to the edge of the screen (negative value). if true will return the width from the menu option "HUD Position". | |
bool | AddPic (const int id, const kStr &in path, const float x, const float y, const float w, const float h, const int edge=0, const float s1=0.0f, const float t1=0.0f, const float s2=1.0f, const float t2=1.0f, const int r=255, const int g=255, const int b=255, const int a=255) |
add custom image to the HUD. HUD size is 640x480 (pillar box). AddPic must be done in OnPostBeginLevel or later. if the id already exists then simply sets all it's variables. | |
bool | SetPicTex (const int id, const kStr &in path) |
bool | SetPicOrigin (const int id, const float x, const float y) |
bool | SetPicEdge (const int id, const int edge) |
edge 1=left side 2=right side (for convenience. You can set to 0 and offset x position with GetHUDOffset() as well) | |
bool | SetPicAngle (const int id, const float angle) |
in rads | |
bool | SetPicWH (const int id, const float w, const float h) |
bool | SetPicUV (const int id, const float s1=0.0f, const float t1=0.0f, const float s2=1.0f, const float t2=1.0f) |
bool | SetPicColor (const int id, const int r=255, const int g=255, const int b=255, const int a=255) |
bool | RemovePic (const int id) |
void | ClearPics (const bool clearImageCache=false) |
bool & | HideHealth () |
Hide health display on the HUD. | |
bool & | HideAmmo () |
Hide ammo display on the HUD. | |
bool & | HideLifeForces () |
Hide LifeForces display on the HUD. | |
bool & | HideRunWalk () |
Hide RunWalk display on the HUD. | |
bool & | HideLives () |
Hide Lives display on the HUD. | |
bool & | HideBossBar () |
Hide BossBar display on the HUD. | |
bool & | HideAirBar () |
Hide AirBar display on the HUD. | |
bool & | HideWeaponWheel () |
Hide WeaponWheel display on the HUD. | |
bool & | HideCrosshair () |
Hide Crosshair display on the HUD. | |
bool & | HideHelpMessages () |
Hide HelpMessages display on the HUD. | |
bool & | HideMessages () |
Hide Messages display on the HUD. | |
bool & | HideTimers () |
Hide Timers display on the HUD. | |
const float | GetExtraZFar () |
void | SetExtraZFar (const float zfar) |
affects actors, ai, particles, fog and underwater. (works normally unlike the cvar r_zfarextent) | |
const float | ShakeIntensity () |
kVec3 | WorldToHUDPoint (const kVec3 &in origin) |
bool | SphereInView (const kVec3 &in origin, const float radius) |
bool | BoxInView (const kVec3 &in min, const kVec3 &in max) |
const float | ViewZFar () |
void | SaveModFile (const kStr &in filename) |
make sure to call GameModFileData.Empty() before adding key/values to save | |
bool | LoadModFile (const kStr &in filename) |
make sure to call GameModFileData.Empty() after you're done loading | |
bool | LoadModDataFile (const kStr &in filename) |
Returns false if couldn't load file. Clears and Sets GameModFileData with the contents of the loaded file. | |
void | SetNoModSelect (const bool bToggle=true) |
Disable the mod select menu when selecting new game for workshop mods only. (seta g_nomodselect "1") | |
void | PlayMovie (const kStr &in filename, const bool skippable=true) |
Only .ogv files (replaces/adds .ogv extension to filename). Can not read from kpfs. | |
kStr | GetActionBind (const int action, const bool first=true, const bool sort=true) |
Returns the key bind name of action. Returns empty string if nothing is bound. | |
kStr | GetCommandBind (const kStr &in command, const bool first=true, const bool sort=true) |
Returns the key bind name of the console command. Returns empty string if nothing is bound. | |
bool | IsJoystickActive () |
if true the players last input was from a controller. | |
kStr | GetInputImagePath (const kStr &in bindName) |
bool | InputImageExists (const kStr &in path) |
void | SetCursorHotPos (int x, int y) |
change the mouses cursors click point (default is 0, 0) | |
void | SetModBindings (const bool show=true) |
Shows custom mod bindings in menu Bindings > Actions. | |
kStr | PlayerName () |
Returns "Player" if could not get name. | |
void | MarkActorPersistentBit (const int actorIndex, const bool clear=false, const int hubID=-1, const int mapNum=0) |
an invalid hub or map uses current maps persistent data. | |
const bool | IsActorPersistentMarked (const int actorIndex, const int hubID=-1, const int mapNum=0) |
an invalid hub or map uses current maps persistent data. | |
const bool | GetPreventOpenPauseMenu () |
void | SetPreventOpenPauseMenu (const bool value) |
void | ShowPauseMenu () |
Should always check if(PlayLoop.CanOpenPauseMenu()) | |
void | OverrideSkyHeight (const float height) |
Set to 0 to stop overriding. | |
const int | BossDamageScaler (const int difficulty, const int damage) |
int | PurgeUnusedModels () |
Returns number of models freed. | |
void | CenterMouse () |
kVec3 | GetWorldSunLightColor () |
kVec3 | GetWorldSunAmbientColor () |
kVec3 | GetWorldSunDirection () |
void | SetWorldSunLightColor (const float r, const float g, const float b) |
void | SetWorldSunAmbientColor (const float r, const float g, const float b) |
void | SetWorldSunDirection (const float x, const float y, const float z) |
bool | IsWorkshop () |
Returns true if game was run through the steam workshop (ran with command arg -workshop) | |
void | OverridePerPolyCollision (const int value) |
0=none, 1=force disable, 2=force enable | |
void | DisableLegalText () |
Removes the text at the bottom of the title screen. | |
void | OverrideFogType (const int value) |
0=none, 1=force Radial, 2=force Plane | |
void | ClearInterpolationOnGameObjects () |
Clears Interpolation on all gameobjects and the camera if it's active. | |
void | ShowDummyMenu (void) |
Actors OnMenuTick fucntion will now be processed. Call ClearDummyMenu to close the dummy menu. | |
void | ClearDummyMenu (bool bClearAll=false) |
void | ToggleCursor (bool b=false) |
Definition at line 1516 of file t1_scriptAPI.cpp.
bool kGame::AddPic | ( | const int | id, |
const kStr &in | path, | ||
const float | x, | ||
const float | y, | ||
const float | w, | ||
const float | h, | ||
const int | edge = 0, | ||
const float | s1 = 0.0f, | ||
const float | t1 = 0.0f, | ||
const float | s2 = 1.0f, | ||
const float | t2 = 1.0f, | ||
const int | r = 255, | ||
const int | g = 255, | ||
const int | b = 255, | ||
const int | a = 255 ) |
add custom image to the HUD. HUD size is 640x480 (pillar box). AddPic must be done in OnPostBeginLevel or later. if the id already exists then simply sets all it's variables.
edge | 1=left side 2=right side (for convenience. You can set to 0 and offset x position with GetHUDOffset() as well) |
void kGame::AddText | ( | const int | id, |
const int | font, | ||
const kStr &in | text, | ||
const float | x, | ||
const float | y, | ||
const int | edge = 0, | ||
const float | scale = 1.0f, | ||
const bool | center = false, | ||
const bool | shadow = false, | ||
const int | r = 255, | ||
const int | g = 255, | ||
const int | b = 255, | ||
const int | a = 255, | ||
const int | r2 = 255, | ||
const int | g2 = 255, | ||
const int | b2 = 255, | ||
const int | a2 = 255 ) |
add custom text to the HUD. HUD size is 640x480 (pillar box). AddPic must be done in OnPostBeginLevel or later. if the id already exists then simply sets all it's variables.
font | EnumGameFontType |
edge | 1=left side 2=right side (for convenience. You can set to 0 and offset x position with GetHUDOffset() as well) |
void kGame::AutomapCustom | ( | const bool | toggle | ) |
allow actors with custom automap colors to be drawn to the automap. (for mods)
void kGame::AutomapDeactive | ( | const bool | toggle | ) |
permanently deactivates the automap.
const bool kGame::AutomapDeactived | ( | ) |
const bool kGame::AutomapEnabled | ( | ) |
is the automap displaying on screen
void kGame::AutomapToggle | ( | const bool | toggle | ) |
show/hide the automap.
const int kGame::BossDamageScaler | ( | const int | difficulty, |
const int | damage ) |
void kGame::CallDelayedMapScript | ( | const int | scriptID, |
kActor@ | instigator, | ||
const float | delay ) |
even with delay 0 it will be called when map scripts update
even with delay 0 it will be called when map scripts update
void kGame::CallMapScript | ( | const int | scriptID, |
kActor@ | instigator ) |
Use to call map script right away.
void kGame::CenterMouse | ( | ) |
void kGame::ChangeMap | ( | const kStr &in | path | ) |
void kGame::ClearDummyMenu | ( | bool | bClearAll = false | ) |
void kGame::ClearInterpolationOnGameObjects | ( | ) |
Clears Interpolation on all gameobjects and the camera if it's active.
void kGame::ClearLifeForcePic | ( | ) |
void kGame::ClearLivesPic | ( | ) |
void kGame::ClearPics | ( | const bool | clearImageCache = false | ) |
void kGame::ClearText | ( | ) |
bool kGame::ClearWeaponWheelPic | ( | const int | weapon | ) |
const uint kGame::ConButtons | ( | ) |
msg1 | top line |
msg2 | bottom line // Usage:
// Then check for result on Tick:
int result;
GameVariables.GetInt("ConfirmMenuResult", result);
switch(result)
{
case 1:
Sys.Print("Selected No");
break;
case 2:
Sys.Print("Selected Yes");
break;
default: // There's no ConfirmMenuResult waiting
break;
}
|
void kGame::DisableLegalText | ( | ) |
Removes the text at the bottom of the title screen.
kStr kGame::GetActionBind | ( | const int | action, |
const bool | first = true, | ||
const bool | sort = true ) |
Returns the key bind name of action. Returns empty string if nothing is bound.
action | EnumInputActions |
first | if is false returns a string of all the bound keys separated by the ; character. |
sortsorts | binds by keyboard, mouse, and controller binds. depending on if controller or keyboard is active. |
kStr kGame::GetCommandBind | ( | const kStr &in | command, |
const bool | first = true, | ||
const bool | sort = true ) |
Returns the key bind name of the console command. Returns empty string if nothing is bound.
command | the name of the console command. "weapon 0" to "weapon 13"
"automap"
"changeammotype"
"runwalktoggle"
"menu_up"
"menu_down"
"menu_left"
"menu_right"
"*menu_select"
"menu_back"
"menu_cancel"
"menu_activate"
|
first | if is false returns a string of all the bound keys separated by the ; character. |
sort | sorts binds by keyboard, mouse, and controller binds. depending on if controller or keyboard is active. |
const int kGame::GetCurrentMapID | ( | ) |
void kGame::GetDateAndTime | ( | int &out | seconds, |
int &out | minutes, | ||
int &out | hours, | ||
int &out | day, | ||
int &out | month, | ||
int &out | year, | ||
kStr &out | text ) |
const int kGame::GetDifficulty | ( | ) |
EnumDifficulty. Internally calls GameVariables.GetInt("g_difficulty")
const float kGame::GetExtraZFar | ( | ) |
float kGame::GetGameSpeed | ( | ) |
bool kGame::GetHubKeyInfo | ( | const uint | hubID, |
int &out | nKeys, | ||
int &out | remainingKeys, | ||
int &out | keyBits ) |
float kGame::GetHUDOffset | ( | const bool | user = false | ) |
if user is false will return the width to the edge of the screen (negative value). if true will return the width from the menu option "HUD Position".
const int kGame::GetMapIDFromName | ( | const kStr &in | mapName | ) |
This returns the mapID from the mapName.
const int kGame::GetMapNumberFromName | ( | const kStr &in | mapName | ) |
This returns the HUB number NOT the map number. mapName is the HUB name such as "Map_Jungle".
const bool kGame::GetPreventOpenPauseMenu | ( | ) |
void kGame::GetTextSize | ( | const kStr &in | text, |
const int | font, | ||
const float | scale, | ||
float &out | width, | ||
float &out | height ) |
kVec3 kGame::GetWorldSunAmbientColor | ( | ) |
kVec3 kGame::GetWorldSunDirection | ( | ) |
kVec3 kGame::GetWorldSunLightColor | ( | ) |
void kGame::HaltMapScript | ( | const int | scriptID | ) |
bool & kGame::HideAirBar | ( | ) |
Hide AirBar display on the HUD.
bool & kGame::HideAmmo | ( | ) |
Hide ammo display on the HUD.
bool & kGame::HideBossBar | ( | ) |
Hide BossBar display on the HUD.
bool & kGame::HideCrosshair | ( | ) |
Hide Crosshair display on the HUD.
bool & kGame::HideHealth | ( | ) |
Hide health display on the HUD.
bool & kGame::HideHelpMessages | ( | ) |
Hide HelpMessages display on the HUD.
bool & kGame::HideLifeForces | ( | ) |
Hide LifeForces display on the HUD.
bool & kGame::HideLives | ( | ) |
Hide Lives display on the HUD.
bool & kGame::HideMessages | ( | ) |
Hide Messages display on the HUD.
bool & kGame::HideRunWalk | ( | ) |
Hide RunWalk display on the HUD.
bool & kGame::HideTimers | ( | ) |
Hide Timers display on the HUD.
bool & kGame::HideWeaponWheel | ( | ) |
Hide WeaponWheel display on the HUD.
bool kGame::InputImageExists | ( | const kStr &in | path | ) |
const bool kGame::IsActorPersistentMarked | ( | const int | actorIndex, |
const int | hubID = -1, | ||
const int | mapNum = 0 ) |
an invalid hub or map uses current maps persistent data.
bool kGame::IsJoystickActive | ( | ) |
if true the players last input was from a controller.
bool kGame::IsTactilePlaying | ( | int | vibHandle | ) |
bool kGame::IsTactilePlaying | ( | int | vibHandle, |
const kStr &in | path ) |
bool kGame::IsWorkshop | ( | ) |
Returns true if game was run through the steam workshop (ran with command arg -workshop)
void kGame::KillAllFx | ( | ) |
void kGame::LifeForcePulse | ( | ) |
Shows the LifeForces on the HUD.
void kGame::LivesPulse | ( | ) |
Shows the Lives on the HUD.
void kGame::LoadMenu | ( | ) |
Opens the load game menu. Should always check if(PlayLoop.CanOpenPauseMenu())
bool kGame::LoadModDataFile | ( | const kStr &in | filename | ) |
Returns false if couldn't load file. Clears and Sets GameModFileData with the contents of the loaded file.
bool kGame::LoadModFile | ( | const kStr &in | filename | ) |
make sure to call GameModFileData.Empty() after you're done loading
void kGame::MarkActorPersistentBit | ( | const int | actorIndex, |
const bool | clear = false, | ||
const int | hubID = -1, | ||
const int | mapNum = 0 ) |
an invalid hub or map uses current maps persistent data.
uint kGame::MenuButtons | ( | void | ) | const |
bool kGame::MusicIsPaused | ( | ) |
bool kGame::MusicIsPlaying | ( | ) |
void kGame::MusicPitch | ( | const float | pitch | ) |
kStr kGame::MusicSong | ( | ) |
void kGame::OverrideFogType | ( | const int | value | ) |
0=none, 1=force Radial, 2=force Plane
void kGame::OverridePerPolyCollision | ( | const int | value | ) |
0=none, 1=force disable, 2=force enable
void kGame::OverrideSkyHeight | ( | const float | height | ) |
Set to 0 to stop overriding.
void kGame::PauseMusic | ( | ) |
kStr kGame::PlayerName | ( | ) |
Returns "Player" if could not get name.
void kGame::PlayMovie | ( | const kStr &in | filename, |
const bool | skippable = true ) |
Only .ogv files (replaces/adds .ogv extension to filename). Can not read from kpfs.
void kGame::PlayMusic | ( | const kStr &in | path, |
const bool | loop ) |
void kGame::PlaySound | ( | const kStr &in | path | ) |
void kGame::PlaySoundID | ( | const int | soundID | ) |
int kGame::PlayTactile | ( | const kStr &in | path, |
int | channel, | ||
int | pos ) |
Start controller vibration from tactile sound file. Returns a handle.
path | the path to the .bnvib file |
channel | kexVibrationPlayer::channel_e |
pos | kexVibrationPlayer::position_e |
void kGame::Print | ( | const kStr &in | text, |
const int | ticks = 120 ) |
Print a message to the HUD on the next line.
text | |
ticks | number of ticks message will be visible. 60 ticks = 1 second. |
void kGame::PrintHelp | ( | const kStr &in | text, |
const bool | endGame = false ) |
void kGame::PrintLine | ( | const kStr &in | text, |
const int | lineNumber, | ||
const int | ticks = 120 ) |
Print a message to the HUD.
text | |
lineNumber | must be in range 0..7 |
ticks | number of ticks message will be visible. 60 ticks = 1 second. |
int kGame::PurgeUnusedModels | ( | ) |
Returns number of models freed.
bool kGame::RemovePic | ( | const int | id | ) |
bool kGame::RemoveText | ( | const int | id | ) |
void kGame::RemoveTimer | ( | ) |
void kGame::Restart | ( | ) |
void kGame::ResumeMusic | ( | ) |
void kGame::RunWalkPulse | ( | ) |
Shows the RunWalk graphic on the HUD.
void kGame::SaveMenu | ( | ) |
Opens the save game menu. Should always check if(PlayLoop.CanOpenSaveMenu())
void kGame::SaveModFile | ( | const kStr &in | filename | ) |
make sure to call GameModFileData.Empty() before adding key/values to save
void kGame::SetArmorFlash | ( | ) |
Shows the armor damage screen flash.
void kGame::SetCursorHotPos | ( | int | x, |
int | y ) |
change the mouses cursors click point (default is 0, 0)
void kGame::SetDamageFlash | ( | ) |
Shows the damage screen flash.
void kGame::SetDifficulty | ( | const int | value | ) |
EnumDifficulty.
void kGame::SetExtraZFar | ( | const float | zfar | ) |
affects actors, ai, particles, fog and underwater. (works normally unlike the cvar r_zfarextent)
void kGame::SetGameSpeed | ( | const float | speed, |
const float | blendSpeed ) |
Sets the current GameSpeed. kPuppet and kPlayerWeapon are not effected by GameSpeed.
speed | 0..1 |
blendSpeed | must be >= 1.0. This is the time it takes to lerp from current speed to the new speed. (lerp time = 1.0 / blendSpeed) |
bool kGame::SetHubKey | ( | const uint | hubID, |
int | key ) |
void kGame::SetLifeForcePic | ( | const kStr &in | imagePath | ) |
void kGame::SetLivesPic | ( | const kStr &in | imagePath | ) |
void kGame::SetModBindings | ( | const bool | show = true | ) |
Shows custom mod bindings in menu Bindings > Actions.
void kGame::SetNoModSelect | ( | const bool | bToggle = true | ) |
Disable the mod select menu when selecting new game for workshop mods only. (seta g_nomodselect "1")
bool kGame::SetPicAngle | ( | const int | id, |
const float | angle ) |
in rads
bool kGame::SetPicColor | ( | const int | id, |
const int | r = 255, | ||
const int | g = 255, | ||
const int | b = 255, | ||
const int | a = 255 ) |
bool kGame::SetPicEdge | ( | const int | id, |
const int | edge ) |
edge 1=left side 2=right side (for convenience. You can set to 0 and offset x position with GetHUDOffset() as well)
void kGame::SetPickupFlash | ( | ) |
Shows the pickup screen flash.
bool kGame::SetPicOrigin | ( | const int | id, |
const float | x, | ||
const float | y ) |
bool kGame::SetPicTex | ( | const int | id, |
const kStr &in | path ) |
bool kGame::SetPicUV | ( | const int | id, |
const float | s1 = 0.0f, | ||
const float | t1 = 0.0f, | ||
const float | s2 = 1.0f, | ||
const float | t2 = 1.0f ) |
bool kGame::SetPicWH | ( | const int | id, |
const float | w, | ||
const float | h ) |
void kGame::SetPreventOpenPauseMenu | ( | const bool | value | ) |
bool kGame::SetTextColor | ( | const int | id, |
const int | r = 255, | ||
const int | g = 255, | ||
const int | b = 255, | ||
const int | a = 255 ) |
bool kGame::SetTextColors | ( | const int | id, |
const int | r = 255, | ||
const int | g = 255, | ||
const int | b = 255, | ||
const int | a = 255, | ||
const int | r2 = 255, | ||
const int | g2 = 255, | ||
const int | b2 = 255, | ||
const int | a2 = 255 ) |
bool kGame::SetTextMsg | ( | const int | id, |
const kStr &in | text ) |
bool kGame::SetTextOrigin | ( | const int | id, |
const float | x, | ||
const float | y ) |
bool kGame::SetTextProps | ( | const int | id, |
const float | scale, | ||
const int | font = 0, | ||
const int | edge = 0, | ||
const bool | center = false, | ||
const bool | shadow = false ) |
Set the text scale, font, edge, center, shadow.
font | EnumGameFontType |
edge | 1=left side 2=right side (for convenience. You can set to 0 and offset x position with GetHUDOffset() as well) |
bool kGame::SetWeaponWheelPic | ( | const int | weapon, |
const kStr &in | imagePath ) |
void kGame::SetWorldSunAmbientColor | ( | const float | r, |
const float | g, | ||
const float | b ) |
void kGame::SetWorldSunDirection | ( | const float | x, |
const float | y, | ||
const float | z ) |
void kGame::SetWorldSunLightColor | ( | const float | r, |
const float | g, | ||
const float | b ) |
const float kGame::ShakeIntensity | ( | ) |
void kGame::ShowDummyMenu | ( | void | ) |
Actors OnMenuTick fucntion will now be processed. Call ClearDummyMenu to close the dummy menu.
void kGame::ShowMainMenu | ( | const bool | mouseCenter = true | ) |
void kGame::ShowPauseMenu | ( | ) |
Should always check if(PlayLoop.CanOpenPauseMenu())
void kGame::SpawnFx | ( | const kStr &in | fxPath, |
kActor@ | source, | ||
const kVec3 &in | origin, | ||
const float | yaw, | ||
const float | pitch ) |
void kGame::SpawnFx | ( | const kStr &in | fxPath, |
kActor@ | source, | ||
const kVec3 &in | origin, | ||
const kQuat &in | rotation ) |
void kGame::SpawnFx | ( | const kStr &in | fxPath, |
kActor@ | source, | ||
const kVec3 &in | velocity, | ||
const kVec3 &in | origin, | ||
const kQuat &in | rotation ) |
void kGame::SpawnFx | ( | const kStr &in | fxPath, |
kPuppet@ | source, | ||
const kVec3 &in | origin, | ||
const float | yaw, | ||
const float | pitch ) |
void kGame::SpawnFx | ( | const kStr &in | fxPath, |
kPuppet@ | source, | ||
const kVec3 &in | origin, | ||
const kQuat &in | rotation ) |
void kGame::SpawnFx | ( | const kStr &in | fxPath, |
kPuppet@ | source, | ||
const kVec3 &in | velocity, | ||
const kVec3 &in | origin, | ||
const kQuat &in | rotation ) |
bool kGame::SphereInView | ( | const kVec3 &in | origin, |
const float | radius ) |
void kGame::StartTimer | ( | ) |
void kGame::StopAllTactile | ( | ) |
void kGame::StopMusic | ( | ) |
void kGame::StopSounds | ( | ) |
void kGame::StopTactile | ( | int | vibHandle | ) |
void kGame::StopTimer | ( | ) |
void kGame::ToggleCursor | ( | bool | b = false | ) |
const float kGame::ViewZFar | ( | ) |
void kGame::WeaponWheelPulse | ( | ) |
Shows the WeaponWheel on the HUD.