Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Level Editor Properties
- --For Grunts Only--
- Projectile Attack 1 = Shaman Throw Fast Fireball
- Projectile Attack 2 = Pistol Fire
- Projectile Attack 3 = Machinegun Fire
- Projectile Attack 4 = ??? Nothing
- Projectile Attack 5 = Machinegun Fire/plasma fire(alternate moves)
- Projectile Attack 6 = Pipe Blow
- Projectile Attack 7 = Grenade Throw
- Projectile Attack 8 = ??? Some melee attack
- Projectile Attack 9 = chest hadoken
- Projectile Attack 10 = Shaman Lightning Hands in Air
- Drop Item Masks
- 1: Explosive shells
- 2: Grenade
- 3: Medium Health
- 4: Full Health
- 5: Ultra Health
- 6: Small Health
- 7: Large Health
- 8: Minigun ammo
- 9: Mortal Wound
- 10: 4 Rockets
- 11: Shotgun Shells
- 12: Energy Cell
- 13: Large Energy Cell
- 14: Clip
- GruntVariants
- GV_GENERIC = 0,
- GV_GENERIC_AXE = 1,
- GV_GENERIC_CLUB = 2,
- GV_COMMANDER_SPEAR = 3,
- GV_COMMANDER_RIFLE1 = 4,
- GV_COMMANDER_RIFLE2 = 5,
- GV_COMMANDER_RIFLE3 = 6,
- GV_GENERIC_RIFLE = 7,
- GV_COMMANDER_RIFLE4 = 8,
- GV_POACHER_KNIFE = 9,
- GV_POACHER_PISTOL1 = 10,
- GV_POACHER_PISTOL2 = 11,
- GV_POACHER_RIFLE = 12,
- GV_POACHER_SHOTGUN = 13,
- GV_WARRIOR_BONE = 14,
- GV_WARRIOR_DART = 15,
- GV_WARRIOR_SPEAR = 16,
- GV_SHAMAN = 17,
- GV_CYBORG_PULSE_RIFLE = 18,
- GV_CYBORG_KNIFE = 19,
- GV_CYBORG_SPEAR = 20,
- GV_DEMON_AXE = 21,
- GV_DEMON_SPEAR = 22,
- GV_DEMON_HANDS = 23,
- GV_DEMON_LORD = 24,
- GV_GENERIC_HANGING = 25,
- $0 = "music/track01.ogg" //jungle
- $1 = "music/track07.ogg" //Catacombs
- $2 = "music/track08.ogg" //Caves
- $3 = "music/track04.ogg" //Boss Battle
- $4 = "music/track13.ogg" //final confrontation
- $5 = "music/track14.ogg" //Campaigner
- $6 = "music/track02.ogg" //the Hub
- $7 = "music/track09.ogg" //tree top village
- $8 = "music/track11.ogg" //the lost land
- $9 = "music/track12.ogg" //cyborg T-Rex
- $11 = "music/track10.ogg" //Lost Land Caves
- $13 = "music/track03.ogg" //ancient city
- $14 = "music/track05.ogg" //The Ruins
- $100 = "music/track06.ogg" // underwater theme
- //------------------------------------------------------------------------------------------------------------------------
- | Execution Order of ScriptObject Events:
- //------------------------------------------------------------------------------------------------------------------------
- .ctor <-- (actor properties from def are assigned here and Origin, Yaw and SectorIndex are set here)
- ---
- OnSpawn
- OnBeginLevel <--- (ALL actor properties from map are not setup until this point)
- OnRestore
- *Map Script 0 <--- (Called on PlayLoop tick 0)
- OnPostBeginLevel
- (*Note: Any spawned actor created after each of these events will not be called for that spawned actor.
- If spawned before/during then it will/might be called.)
- ---
- OnSleep
- OnWake
- OnTouch
- OnCollide
- OnTick <--- called only when awake
- ---
- OnActivate <--- called immediately after World.TriggerActorsByTID and when player enters event sector area only if AF_ACTIVATED is Off
- ---
- OnDeath <--- called only when actor dies. The actors Target TID is automatically used to trigger actors at this point.
- OnDamage <--- always called when damaged even after death
- ---
- OnEndLevel <--- Can not call any map scripts at this point
- ScriptObject
- void OnSpawn() - Required for all ScriptObject
- void OnBeginLevel()
- void OnRestore()
- void OnPostBeginLevel()
- void OnSleep()
- void OnWake()
- void OnTouch(kActor @theActorThatTouchedMe) //called even if alseep
- void OnCollide(kCModel@) //called even if alseep
- void OnTick() - Required for all ScriptObject
- void OnActivate()
- void OnDeactivate() //Never used
- void OnDeath(kActor @killer, kDictMem @damageDef) //called only when actor dies
- void OnDamage(kActor @instigator, kDictMem @damageDef, const int damage) //always called even after death
- void OnEndLevel()
- ScriptObjectWeapon
- void OnBeginFire()
- void OnFire()
- void OnEndFire()
- void OnLower()
- void OnRaise()
- void OnHoldster()
- ScriptObjectPlayer
- void OnPickup(kActor @pickup)
- void OnArmorDamage(kActor @instigator, kDictMem @damageDef, const int damage)
- void OnEnterWater()
- kAnimState
- void Blend(const int animID, float speed, float blend, int AnimStateFlags)
- void Set(const int animID, float speed, int AnimStateFlags)
- const int CurrentFrame(void)
- const int NumFrames(void)
- const float PlayTime(void)
- const float TrackTime(void)
- bool IsPlaying(const int animID)
- bool CheckAnimID(const int animID) - checks if animID exists
- const int PlayingID(void)
- void Stop(void)
- void Pause(void)
- void Resume(void)
- const bool Stopped(void)
- const bool Blending(void)
- const bool Looping(void)
- const bool CycleCompleted(void)
- void ChangeSpeed(const float speed)
- void SetLastFrame(const bool execActions = false) //if execActions is true, runs all key frame actions in the animation
- kRenderModel
- void SetModel(const kStr &in modelPath, const kStr &in modelAnimPath)
- void SetRotationOffset(const int nodeIndex, const float rads, const float x, const float y, const float z)
- void SetRotationOffset(const int nodeIndex, const kQuat &in rotation)
- void SetTexture(const int section, const int textureID)
- void SetVisibility(const int node, const bool visible)
- void HideSection(const int node, const int section, const bool hide)
- void AddTrailEffect(const kStr &in trailName, const int nodeIndex)
- void RemoveTrailEffect(void) //removes all trail effects
- const int GetNumAttachedTrails(void)
- kVec3 &Offset(void)
- kScriptObject
- ref &obj;
- kActor, kPuppet, kWeapon, kAI
- const bool IsStale() - Is the object removed
- kAngle &Yaw()
- kAngle &Pitch()
- kAngle &Roll()
- kVec3 &Origin()
- kVec3 &Scale()
- kVec3 &PrevOrigin()
- void SetTarget(kActor@)
- kActor @GetTarget(void)
- void SetSector(const uint sectorIndex)
- void Remove(void)
- kVec3 &Velocity(void)
- kVec3 &Movement(void)
- kQuat &Rotation(void)
- int16 &Health(void)
- int &Type(void)
- int &ImpactType(void)
- int &ModelVariation(void)
- uint &Flags(void)
- const uint SpawnFlags1(void)
- const uint SpawnFlags2(void)
- const uint SpawnFlags3(void)
- const int TID(void)
- float &Radius(void)
- float &Height(void)
- float &StepHeight(void)
- float &WallRadius(void)
- float &Gravity(void)
- float &Friction(void)
- float &AnimSpeed(void)
- float &BounceDamp(void)
- float &FloorHeight(void)
- float &CeilingHeight(void)
- const int SectorIndex(void)
- const int AreaID(void)
- bool InstanceOf(const kStr &in className)
- void PlaySound(const kStr &in soundPath)
- void PlaySoundWithLookupID(const int soundID)
- void StopSound(void)
- void StopLoopingSounds(void)
- const int GameTicks(void)
- kAnimState &AnimState(void)
- kRenderModel @RenderModel(void)
- const bool InWater(void)
- bool CheckPosition(const kVec3 &in location) //checks if the actor can move to this location
- bool CheckPosition(const float angle, const float distance) //call CheckPosition(kVec3 location) with location being: Actor.Origin() + (angle*distance*actor.Radius())
- float GetTurnYaw(const kVec3 &in lookAtLocation)
- float GetAvoidanceAngle(const kVec3 &in lookAtLocation, const float distance)
- const float GetWaterHeight(void)
- const bool CanSee(kActor@ actor, const uint excludeClipFlags = 0) //excludeClipFlags to ignore/disable
- uint &ClipFlags(void)
- kDictMem @Definition(void)
- bool OnGround(void)
- const int GetWaterLevel(void)
- kActor @CastToActor(void)
- kAI @CastToAI(void)
- void SpawnProjectile(const kStr &in fxPath, const kVec3 &in location, const kVec3 &in targetLocation, const float maxAngle)
- void MeleeObject(const kStr &in damageType, const kVec3 &in offset, const float radius)
- void SpawnFx(const kStr &in fxPath, const kVec3 &in position)
- void SpawnFx(const kStr &in fxPath, const kVec3 &in position, const kQuat &in rotation)
- kVec3 GetTransformedVector(const kVec3 &in vector)
- float DistanceToPoint(const kVec3 &in point) //calls DistanceToPoint(x,y,z)
- float DistanceToPoint(const float x, const float y, const float z) //actors point is in the center
- void InflictGenericDamage(kActor@ inflictor, const int damage)
- void InteractActorsAtPosition(const kVec3 &in pos, const kStr &in callbackFunc, const float arg1 = 0, const float arg2 = 0, const float arg3 = 0, const float arg4 = 0)
- kScriptObject @ScriptObject(void)
- void MoveToPosition(const float x, const float y)
- bool RandomDecision(const int randomBit)
- void SetPosition(const kVec3 &in position)
- const int16 SpawnParams(const int paramID)
- //(0) Target ID -32768..32767
- //(1) Trigger Anim 0..255
- //(2) Health -32768..32767
- //(3) Max Regenerations -32768..32767
- //(4) Attach Chance 0..255
- //(5) Texture -128..127
- //(6) Params 2 -128..127
- //(7) Params 1 -128..127
- const float GetCeilingHeight(void)
- const float GetFloorHeight(void)
- void RunFxEvent(const kStr &in fxEventName)
- const int GetSectorIndexAtLocation(const kVec3 &in position, uint excludeClipFlags = 0)
- void MarkPersistentBit(const bool clear)
- const bool IsPersistentMarked(void)
- void SetHeadTrackTarget(kActor@ actor)
- kVec3 TransformToOwnerPosition(void)
- kVec3 TransformToOwnerPosition(const kVec3 &in vector)
- void FireProjectile(const kStr &in fxPath, const float x, const float y, const float z, const bool adjustToPerspective = false)
- const bool CanSee(kPuppet@ puppet, const uint excludeClipFlags = 0)
- float &ViewHeight(void)
- float &RecoilPitch(void)
- const float LandingViewOffset(void)
- uint &PlayerFlags(void)
- void QuietNoiseAlert(void)
- void LoudNoiseAlert(void)
- kAI
- uint &AIFlags(void)
- EnumAnimStateFlags
- ANF_BLEND = 1
- ANF_LOOP = 2
- ANF_STOPPED = 4
- ANF_NOINTERRUPT = 8
- ANF_ROOTMOTION = 16
- ANF_PAUSED = 32
- ANF_CYCLECOMPLETED = 64
- ANF_LINEARBLEND = 128
- EnumActorFlags
- AF_SOLID = (1 << 0) // can be collided
- AF_DORMANT = (1 << 1) // if on then is asleep (won't be updated onTick) else is awake
- AF_SNAPTOFLOOR = (1 << 2) // adjust z-axis to floor on spawn
- AF_CLIMBWALLS = (1 << 3) // allows entering of wall sectors
- AF_WOUNDEDMORTALLY = (1 << 4) // special case for spawning special items
- AF_CASTSHADOW = (1 << 5) //
- AF_TRIGGERSTUFF = (1 << 6) // allow triggering of event sectors
- AF_HIDDEN = (1 << 7) // don't draw but continue updating. can't be collided
- AF_ACTIVATED = (1 << 8) // was triggered
- AF_DISABLED = (1 << 9) // don't update animations
- AF_ENTEREDAREAEVENT = (1 << 10) // just entered a trigger sector
- AF_REMOVEONCOMPLETION = (1 << 11) // remove after finishing a special animation
- AF_NOBLOOD = (1 << 12) //
- AF_AVOIDWATER = (1 << 13) // clip against edges linking to water sectors
- AF_FLOATINWATERONDEATH = (1 << 14) // rise to the surface while dead
- AF_DEAD = (1 << 15) // actor is dead
- AF_STATIONARY = (1 << 16) // sniper
- AF_ALIGNTOFLOOR = (1 << 17) // rotate along slopes
- AF_NODRAW = (1 << 18) //
- AF_NONSHOOTABLE = (1 << 19) //
- AF_FULLVOLUME = (1 << 20) // all sounds coming from this actor will be heard at full volume
- AF_CANBETOUCHED = (1 << 21) // allow invoking the OnTouch callback
- AF_IGNORESOUNDEVENTS = (1 << 22)
- AF_TRIGGERANIMATION = (1 << 23) // play special animation on trigger/spawn
- AF_HOLDTRIGGERANIM = (1 << 24) // pause special animation until triggered (is also invincible)
- AF_TRIGGERNAIMDELAY = (1 << 25) // delay a bit before starting special animation
- AF_STAYINWATER = (1 << 26) // can't exit water sectors
- AF_ALWAYSACTIVE = (1 << 27) // never sleep or go dormant
- AF_COLLIDEDWITHWALL = (1 << 28) // collided with an edge. cleared at every OnTick call
- AF_INVINCIBLE = (1 << 29) //OnDamage and OnDeath are never called
- AF_ALLOWTINYENEMYCHEAT = (1 << 30)
- AF_NOMOVEMENT = (1 << 31) // will not do collision movement
- EnumPlayerFlags
- PF_NOCLIP = 1
- PF_FLY = 2
- PF_DEAD = 4
- PF_GOD = 8
- PF_JUMPING = 16
- PF_HASJUMPED = 32
- PF_INWARPAREA = 64
- PF_CLIMBTHRUST = 128
- PF_NOAIRFRICTION = 256
- PF_CRAWLING = 512
- PF_PREVENTDEATHCAM = 1024
- PF_FIREDPROJECTILE = 2048
- PF_DEATHPITFALL = 4096
- EnumAIFlags
- AIF_ATTACKING = (1 << 0), //Already defined // playing an attacking animation
- AIF_WASSOLID = (1 << 1), //Already defined
- AIF_FIRSTATTACK = (1 << 2),
- AIF_HEARDLOUDNOISE = (1 << 3),
- AIF_BLOWNAWAY = (1 << 4), //Already defined // being blown away by explosion
- AIF_GOBACKTOLEASH = (1 << 5),
- AIF_RESURRECT = (1 << 6),
- AIF_FEIGNDEATH = (1 << 7),
- AIF_REGENERATE = (1 << 8),
- AIF_SEETARGET = (1 << 9),
- AIF_NOCHASE = (1 << 10), //Already defined // disable chase logic
- AIF_REGENERATEANIM = (1 << 11),
- AIF_NOTHINK = (1 << 12), //Already defined // don't run ai logic
- AIF_RUNNING = (1 << 13), //Already defined // Is playing running animation
- AIF_GETATTENTION = (1 << 14),
- AIF_REGENANIMDELAY = (1 << 15),
- AIF_HEARDQUIETNOISE = (1 << 16),
- AIF_AWAYFROMLEASH = (1 << 17),
- AIF_TELEPORTAWAY = (1 << 18), // playing teleport out animation
- AIF_TELEPORTMOVESLOW = (1 << 19), // chasing while underground
- AIF_TELEPORTING = (1 << 20), //Already defined // in teleport state. ignore all chase logic
- AIF_TELEPORTIN = (1 << 21), // playing teleport in animation
- AIF_WAITFORCYCLE = (1 << 22), // prevent other animations from interrupting until the current one finishes
- AIF_DAMAGEPANIC = (1 << 23) // become aggressive when target is outside it's active threshold (good for forcing AI to attack their target)
- EnumImpactType
- IT_DEFAULT
- IT_WATER
- IT_METAL
- IT_STONE
- IT_FLESH_HUMAN
- IT_FLESH_CREATURE
- IT_FLESH_UNDEAD //AKA IT_FLESH_WATER
- IT_LAVA
- IT_SLIME
- IT_FORCEFIELD
- kDict
- void Add(const kStr &in, const kStr &in)
- void Empty(void)
- void SetValue(const kStr &in, const kStr &in)
- const bool HasKey(const kStr &in)
- bool GetFloat(const kStr &in, float &out, const float defaultValue = 0)
- bool GetInt(const kStr &in, int &out, const int defaultValue = 0)
- bool GetBool(const kStr &in, bool &out, const bool defaultValue = false)
- bool GetString(const kStr &in, kStr &out)
- bool GetVector(const kStr &in, kVec3 &out)
- kDictMem
- bool GetFloat(const kStr &in, float &out, const float defaultValue = 0)
- bool GetInt(const kStr &in, int &out, const int defaultValue = 0)
- bool GetBool(const kStr &in, bool &out, const bool defaultValue = false)
- bool GetString(const kStr &in, kStr &out)
- bool GetVector(const kStr &in, kVec3 &out)
- kSelectionListInt
- void AddItem(int item, const int weight)
- int& Select(const bool useSystemRand = false)
- void Reset(void)
- const uint GetNumEntries(void)
- &opAssign(const kSelectionListInt &in otherSelectionListInt)
- kSelectionListFloat
- &opAssign(const kSelectionListFloat &in otherSelectionListFloat)
- GameVariables
- void GetInt(const kStr &in, int &out, int defaultValue = 0);
- void GetFloat(const kStr &in, float &out, float defaultValue = 0.0f);
- void GetBool(const kStr &in, bool &out, bool defaultValue = false);
- void GetVector(const kStr &in, kVec3 &out);
- void SetValue(const kStr &in, const kStr &in);
- Game
- void StartTimer(void)
- void StopTimer(void)
- void RemoveTimer(void)
- void CallDelayedMapScript(const kStr &in funcName, kActor @instigator, const float delay)
- void CallDelayedMapScript(const int scriptID, kActor @instigator, const float delay)
- void HaltMapScript(const int scriptID)
- void PlayMusic(const kStr &in path, const bool loop)
- void StopMusic(void)
- void Restart(void)
- void PrintLine(const kStr &in text, const int lineNumber, const int visibleFrameTime = 120)
- void PrintHelp(const kStr &in localizedKey, const bool endGame = false)
- void ChangeMap(const kStr &in path)
- void ShowMainMenu(void)
- const int GetMapNumberFromName(const kStr &in mapName)
- const int GetCurrentMapID(void)
- const int GetDifficulty(void) //calls gameVariables.GetInt("g_difficulty")
- bool GetHubKeyInfo(const uint hubID, int &out nKeys, int &out remainingKeys, int &out keyBits)
- 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)
- ActorFactory
- kActor@ Spawn(const int actorID, const float x, const float y, const float z, const float yaw, const int sector = -1)
- kActor@ Spawn(const kStr &in actorName, const float x, const float y, const float z, const float yaw, const int sector = -1)
- PlayLoop
- const int Ticks(void)
- const void TagActorForBossBar(kActor@ actor)
- void RemoveBossActor(void)
- void CheckKeys(void)
- void StartWarp(kActor@, const int tagID, const int mapID)
- void StartFreeWarp(kActor@, const kVec3 &in origin, const float yaw, const int sectorID, const int mapID)
- void HandlePlayerDeath(const bool loseLife = true)
- Player
- const uint16 Buttons(void)
- const kPuppet @Actor(void)
- void ConsumeAmmo(const int ammo)
- const int GetAmmo(const int weaponID)
- const int GetAltAmmo(const int weaponID)
- const bool HasAmmo(const int weaponID)
- const bool HasAltAmmo(const int weaponID)
- const bool HasAltAmmo(void)
- const bool HasWeapon(const int weaponID)
- const int CurrentWeapon(void)
- const bool GiveWeapon(const int weaponID, const int ammo) // returns true if gave ammo else returns false because already has full primary ammo
- void Lock(void)
- void Unlock(void)
- int16 &Armor(void)
- void Victory(const int warpActorID = -1, const int mapID = -1)
- const bool Locked(void)
- const kPlayer &Owner(void)
- Global Constants
- const float GAME_DELTA_TIME
- const float GAME_SCALE
- const float GAME_FRAME_TIME
- const float GAME_FRAME_UNIT
- const float GAME_SECONDS
- Camera
- void StartCinematic(const uint EnumCameraFlags = 12)
- void StopCinematic(void)
- const int CinematicState(void)
- //0 = not in cinema
- //1 = fading out from player to start cinema
- //2 = fading in cinema
- //3 = playing cinema
- //4 = fading out cinema
- //5 = Fading in from cinema to player
- //6 = Resumng Game to player
- const void SetLookAtActor(kActor@ actor)
- void ClearLookAtActor(void)
- void SetRotateEyeVector(const kVec3 &in vector)
- void SetFinalView(const int view) //view must be un range 0..2
- void SetRotationTrack(const int trackID, const float startAngle, const float destAngle, const float startDistance, const float destDistance,
- const float startHeight = 0, const float destHeight = 0, const float startLookHeight = 0, const float destLookHeight = 0)
- void SetPositionTrack(const int trackID, const kVec3 &in startMovePoint, const kVec3 &in endMovePoint, const kVec3 &in startLookPoint, const kVec3 &in endLookPoint)
- void TweenPositionTrack(const int trackID, const float time)
- void TweenRotationTrack(const int trackID, const kVec3 &in, const float time)
- void AutoPlayPositionTrack(const int trackID, const float time, const int EnumCameraLerpType)
- void AutoPlayRotationTrack(const int trackID, const float time, const int EnumCameraLerpType)
- void AutoPlayBlendTrack(const int trackID, const int blendTrack1ID, const int blendTrack2ID, const float time, const int EnumCameraLerpType)
- void SetEyeView(const kVec3 &in position)
- void SetFocusView(const kVec3 &in position)
- void ZoomEyeViewToPosition(const kVec3 &in position, const float speed)
- void ZoomFocusViewToPosition(const kVec3 &in position, const float speed)
- kVec3 GetEyeView(void)
- kVec3 GetFocusView(void)
- void ClearFinalView(void)
- void ClearViewTracks(void)
- const bool UserInterrupted(void)
- const bool Active(void)
- const bool ViewingFromCamera(void)
- const kVec3 &Tremor(void)
- kVec3 origin
- kAngle yaw
- kAngle pitch
- kAngle roll
- float fov
- float lookZOffset
- World
- kActor @GetActorByTID(const int tagID, const int typeFilter = -1) //if typeFilter is -1 checks any type otherwise only returns the actor of that type
- const bool TriggerActorsByTID(kActor@ typeFilter, const int tagID)
- void ChangeAreaFlag(const int areaID, const uint EnumAreaFlags, const bool active) //DO NOT USE
- void FloodFillAreaFlags(const int sectorIndex, const uint areaFlags, const bool active) //DO NOT USE
- void FloodFillAreaFlags(const kVec3 &in origin, const uint areaFlags, const bool active) //use this or
- void FloodMatchingAreaFlags(const int sectorIndex, const uint areaFlags, const bool active) //use this
- const uint GetAreaFlags(const int areaID)
- const void ChangeAreaWaterHeight(const int areaID, const float height)
- const int16 GetAreaArg(const int areaID, const int arg)
- const void ChangeAreaArg(const int areaID, const int arg, const int16 value)
- // though args can be used for anything, they are typically used in this fashion:
- //
- // 0: warp ID
- // 1: warp level ID or trigger sound ID
- // 2: checkpoint ID
- // 3: tag ID
- // 4: floor damage hit points
- // 5: floor damage rate
- void ChangeSectorHeight(const int sector, const float height)
- kCModel
- kVec3 &InterceptVector(void) - Returns the vector that intersected the collided geometry
- kVec3 &ContactNormal(void) - Returns the normalized vector of the collided surface
- const float &Fraction(void) - returns the 0.0 - 1.0 range of the point of intersection from start to end trace. (If fraction is == 1.0 then no intersection occured.)
- const uint ClipResult(void) - specifies the type of intersection (flags)
- kActor @ContactActor(void) - handle pointer to actor that was collided (null if none was collided)
- The kCModel(CModel) global stores collision results when certain actor methods are called. Those methods are as follows:
- GetSectorIndexAtLocation
- const bool CanSee(kActor@, const uint = 0)
- MoveToPosition
- SpawnProjectile
- bool CheckPosition(const kVec3 &in)
- enum ClipResultFlags
- CRF_NOCOLLISION = 0,
- CRF_FLOOR = (1<<0), // made contact with a floor
- CRF_CEILING = (1<<1), // made contact with a ceiling
- CRF_WALL = (1<<2), // made contact with an edge (sector edge that isn't linked to another sector)
- CRF_OBJECT = (1<<3), // made contact with an actor
- CRF_MESH = (1<<4), // made contact with a static object
- CRF_ADJUST = (1<<5), // z-axis was adjusted (ceiling or floor)
- CRF_WALLRADIUS = (1<<6) // made contact with an edge during the wall radius collision test
- EnumPlayerButtons
- BC_ATTACK
- BC_JUMP
- BC_FORWARD
- BC_BACKWARD
- BC_STRAFELEFT
- BC_STRAFERIGHT
- BC_WEAPONRIGHT
- BC_WEAPONLEFT
- BC_MAPZOOMIN
- BC_MAPZOOMOUT
- EnumDifficulty
- DIFFICULTY_EASY
- DIFFICULTY_NORMAL
- DIFFICULTY_HARD
- DIFFICULTY_HARDCORE
- EnumClipFlags
- CF_CLIPEDGES = (1 << 0) // clip movement against edges that don't link to sectors
- CF_IGNOREBLOCKERS = (1 << 1) // don't clip edges belonging to blocking sectors
- CF_DROPOFF = (1 << 2) // allows passing through platforms or ledges
- CF_NOENTERWATER = (1 << 3) // block all edges that links to a water sector
- CF_NOEXITWATER = (1 << 4) // block all edges that links to a non-water sector
- CF_NOCLIPSTATICS = (1 << 5) // don't collide with static models
- CF_NOCLIPACTORS = (1 << 6) // don't collide with dynamic objects/actors
- CF_WALKWALLS = (1 << 7) // don't restrict movement to steep slopes
- CF_COLLIDEFLOORS = (1 << 8) // project and clip movement against non-flat floors
- CF_HITSCAN = (1 << 9) // performs a single-pass trace. useful for hitscans
- CF_ALLOWCLIMB = (1 << 10) // collide with sectors flagged as climbable
- CF_ALLOWCRAWL = (1 << 11) // collide with sectors flagged as crawlable
- CF_NOSTEPDOWN = (1 << 12) // don't clamp z-axis when walking down slopes
- CF_NOSLOPESTEP = (1 << 13) // don't project z-axis movement along slopes
- CF_COLLIDEHEIGHT = (1 << 14) // clip against ceilings
- CF_COLLIDECORPSES = (1 << 15) // clip against actors flagged as dead
- CF_NOEXITWALLS = (1 << 16) // clip all edges, regardless if they link to another sector or not
- CF_NOCOLLIDEFUNC = (1 << 17) // don't invoke the OnCollide callback on the moving object
- CF_NOFLOORADJUST = (1 << 18) // don't keep z-axis above floor plane
- CF_NOCEILINGADJUST = (1 << 19) // don't keep z-axis below ceiling plane
- CF_COLLIDEWATER = (1 << 20) // clip movement against the water surface
- CF_USEWALLRADIUS = (1 << 21) // clip and project movement away from walls based on wall radius
- CF_NOCLIPTARGETACTORS = (1 << 22) // don't clip actors that are targeted by moving object
- CF_COLLIDETRIGGERS = (1 << 23) // block edges belonging to a trigger
- CF_STANDONOBJECTS = (1 << 24) // allow vertical clipping of objects
- CF_GREASESLIDEOBJECTS = (1 << 25) // always keep movement projected away from collided objects
- CF_ALLOWRESTRICTEDAREAS = (1 << 26) // don't collide with edges belonging to a restricted sector
- CF_COLLIDECLIFFS = (1 << 27) // collide with non-walkable floors
- CF_CHECKLINKEDBRIDGES = (1 << 28) // do extensive checks against overlapping bridge sectors
- CF_POLYCOLLISION = (1 << 29) // clip movement against all model polygons of an object
- EnumWaterLevel
- WLT_INVALID - Not in water area
- WLT_OVER - in water area and over the water height
- WLT_BETWEEN - in water area and floating above the water
- WLT_UNDER - in water area and under the water height
- EnumCameraLerpType
- CMLT_NONE
- CMLT_LINEAR
- CMLT_LINEARLOOP
- CMLT_COSINE
- CMLT_COSINE_POW
- EnumCameraFlags
- CMF_NO_INITIAL_FADEOUT = 1 << 0
- CMF_NO_LETTERBOX = 1 << 1
- CMF_LOCK_PLAYER = 1 << 2
- CMF_UNLOCK_PLAYER_ON_FINISH = 1 << 3
- CMF_INITIAL_FADEIN = 1 << 4
- CMF_SHOW_CREDITS = 1 << 5
- CMF_CHANGE_MAP_AFTER_FADE = 1 << 6
- CMF_SHOW_HIDDEN_OBJECTS = 1 << 7
- uint EnumAreaFlags
- AAF_WATER = 1 << 0
- AAF_BLOCK = 1 << 1
- AAF_TOGGLE = 1 << 2
- AAF_CLIFF = 1 << 3
- AAF_CLIMB = 1 << 4
- AAF_ONESIDED = 1 << 5 //Bridge
- AAF_CEILING = 1 << 6
- AAF_CRAWL = 1 << 7
- AAF_ENTERCRAWL = 1 << 8
- AAF_HIDDEN = 1 << 9
- AAF_ENTERED = 1 << 10 //Not shown in Editor
- AAF_SECRET = 1 << 11 //not defined
- AAF_RESTRICTED = 1 << 12
- AAF_SLOPETEST = 1 << 13
- AAF_DEATHPIT = 1 << 14
- AAF_MAPPED = 1 << 15
- AAF_EVENT = 1 << 16
- AAF_REPEATABLE = 1 << 17
- AAF_TELEPORT = 1 << 18
- AAF_DAMAGE = 1 << 19
- AAF_DRAWSKY = 1 << 20
- AAF_TELEPORTAIR = 1 << 21
- AAF_LAVA = 1 << 22
- AAF_EVENTSOUND = 1 << 23
- AAF_ANTIGRAVITY = 1 << 24
- AAF_LADDER = 1 << 25
- AAF_CHECKPOINT = 1 << 26
- AAF_SAVEGAME = 1 << 27
- AAF_WARPRETURN = 1 << 28
- AAF_SHALLOWWATER = 1 << 29
- AAF_DRAWSUN = 1 << 30
- AAF_STOREWARPRETURN = uint(1 << 31) //not defined. Make it const uint instead of an enum which is always an int. Can also use 2147483648 or 0x80000000
- Math
- float Sin(float)
- float Cos(float)
- float Tan(float)
- float ATan2(float, float)
- float Fabs(float)
- float ACos(float)
- float Sqrt(float)
- int Abs(int)
- float Ceil(float)
- float Floor(float)
- float Log(float)
- float Pow(float, float)
- float Deg2Rad(float)
- float Rad2Deg(float)
- float InvSqrt(float)
- float IncMax(const float val, const float inc, const float dest) //returns val + inc and never goes above or below dest value
- int SysRand(void)
- int Rand(void)
- uint8 RandByte(void)
- int RandMax(const int) //exculsive
- float NLerp(const float, const float, const float)
- float RandFloat(void)
- float RandCFloat(void)
- float RandRange(const float, const float)
- void Clamp(float &out, const float, const float)
- float Lerp(float start, const float end, const float time)
- float CosTween(const float)
- float CosArc(const float)
- float pi
- kVec3 vecZero
- kVec3
- void Contructor(float x, float y, float z)
- void Contructor(const kVec3 &in)
- kVec3 &Normalize(void)
- kVec3 Cross(const kVec3 &in)
- const float Dot(const kVec3 &in)
- const float Unit(void)
- const float UnitSq(void)
- const float Distance(const kVec3 &in)
- const float DistanceSq(const kVec3 &in)
- const kStr ToString(void)
- float ToYaw(void)
- float ToPitch(void)
- void Clear(void)
- void Set(const float, const float, const float)
- kVec3 Lerp(const kVec3 &in, const float)
- const kVec3 &Lerp(const kVec3 &in, const float)
- kVec3 &Randomize(const float)
- kVec3 &CubicCurve(const kVec3 &in end, const float time, const kVec3 &in point)
- kVec3 &QuadraticCurve(const kVec3 &in end, const float time, const kVec3 &in point1, const kVec3 &in point2)
- kVec3 opAdd(const kVec3 &in)
- kVec3 &opAddAssign(const kVec3 &in)
- kVec3 opNeg(void)
- kVec3 opSub(const kVec3 &in)
- kVec3 &opSubAssign(const kVec3 &in)
- kVec3 opMul(const kVec3 &in)
- kVec3 opMul(const float val)
- kVec3 &opMulAssign(const kVec3 &in)
- kVec3 &opMulAssign(const float)
- kVec3 opDiv(const kVec3 &in)
- kVec3 opDiv(const float val)
- kVec3 &opDivAssign(const kVec3 &in)
- kVec3 &opAssign(const kVec3 &in)
- float opIndex(uint)
- const float opIndex(uint)
- float x
- float y
- float z
- kQuat
- void Contructor(float x, float y, float z, float w)
- void Contructor(float w, kVec3 &in)
- void Contructor(const kQuat &in)
- kQuat &Normalize(void)
- kQuat opAdd(const kQuat &in)
- kQuat opSub(const kQuat &in)
- kQuat opMul(const kQuat &in)
- kQuat &opAssign(const kQuat &in)
- kVec3 opMul(const kQuat &in)
- kVec3 &opMulAssign(const kQuat &in)
- kQuat ToQuaternion(void)
- float w
- kQuat ToQuat(void)
- kAngle
- void Contructor(float)
- void Contructor(const kAngle &in)
- float Diff(const float)
- float Diff(const kAngle &in)
- float Interpolate(const float, const float)
- kAngle opAdd(const float)
- const kAngle &opAddAssign(const float)
- kAngle opSub(const float)
- const kAngle &opSubAssign(const float)
- kAngle opAdd(const kAngle &in)
- const kAngle &opAddAssign(const kAngle &in)
- kAngle opSub(const kAngle &in)
- const kAngle &opSubAssign(kAngle &in)
- kAngle &opAssign(const float)
- kAngle &opAssign(const kAngle &in)
- kAngle opNeg(void)
- const float opImplConv(void)
- kStr
- void Contructor(const kStr &in str)
- const int IndexOf(const kStr &in pattern)
- const uint Hash(void)
- int Atoi(void)
- float Atof(void)
- kStr &ToUpper(void)
- kStr &ToLower(void)
- int8 opIndex(const int)
- bool opEquals(const kStr& in)
- kStr &opAssign(const kStr &in)
- kStr opAdd(bool)
- kStr opAdd(int)
- kStr opAdd(float)
- kStr opAdd(const kStr &in)
- kStr &opAddAssign(const kStr &in)
- kStr &opAddAssign(bool)
- Sys
- void Print(const kStr &in message)
- void Warning(const kStr &in message)
- int VideoWidth(void)
- int VideoHeight(void)
- int Mouse_X(void)
- int Mouse_Y(void)
- const bool GetCvarValue(const kStr &in cvarName, kStr &out result)
Add Comment
Please, Sign In to add comment