Advertisement
BehemothProgrammer

Turok 2 Script API

Jun 30th, 2017
493
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 39.40 KB | None | 0 0
  1. //---kexEnemyAIComponent modes---
  2. //0 = Wait For Trigger
  3. //1 = Start Delay Think
  4. //2 = Start
  5. //3 = move slow forward
  6. //4 = move forward
  7. //5 = Move Turn 180
  8. //6 = Flee
  9. //7 = Flee Turn 180
  10. //8 = Evade Left
  11. //9 = Evade Right
  12. //10 = Idle (The main think mode)
  13. //11 = Interactive idle
  14. //12 = Alert
  15. //13 = take cover
  16. //14 = melee/combat attacks
  17. //15 = leap attacks
  18. //16 = dart attacks
  19. //17 = weapon attacks
  20. //18 = projectile attacks
  21. //19 = Combo
  22. //20 = Combo End attacks
  23. //21 = Pickup Throw Object
  24. //22 = Drop Object
  25. //23 = Teleport Out (start teleport)
  26. //24 = Teleport In (end teleport)
  27. //25 = Teleport Chase (tick teleport)
  28. //26 = Cloak Activate
  29. //27 = Regenerate
  30. //28 = Puff Up
  31. //29 = Reaction Explosion
  32. //30 = Reaction FallDown (Tranqulized anim start)
  33. //31 = Reaction GetUp (Tranqulized anim wake up and feign death wake up)
  34. //32 = Reaction Blinded
  35. //33 = Reaction Shocked
  36. //34 = Reaction Bore (goes to 50 Head Blown Off Death)
  37. //35 = Reaction Bore Clunk
  38. //36 = Wounded Generic
  39. //37 = Wounded Left Arm
  40. //38 = Wounded Right Arm
  41. //39 = Ground To Air
  42. //40 = Ground To Underwater
  43. //41 = Air To Ground
  44. //42 = Air To Underwater
  45. //43 = Underwater To Ground
  46. //44 = Underwater To Air
  47. //45 = Feign Death (fall over anim to 31 Reaction GetUp)
  48. //46 = Death
  49. //47 = Extreme Death Part 1
  50. //48 = Extreme Death
  51. //49 = PFM Death
  52. //50 = Head Blown Off Death (also used by bore)
  53. //51 = Left Arm Blown Off Death
  54. //52 = Right Arm Blown Off Death
  55. //53 = Body Hole Death
  56. //54 = Death Melt
  57. //55 = Nuke Frozen (does fire effect and changes the actors color but does not explode)
  58.  
  59. //---kexGeneratorComponent modes---
  60. // 0 = waiting
  61. // 1 = produce object
  62.  
  63. //---kexPlatformComponent mods---
  64. // 0 = waiting to start
  65. // 1 = start
  66. // 2 = reached dest
  67. // 3 = returning
  68.  
  69. //---kexThrowableComponent modes---
  70. // 0 = idle on ground
  71. // 1 = pickup
  72. // 2 = flying (needs to be set normally by enemyai or will crash game)
  73.  
  74. //---kexPuppet/Player modes---
  75. // 0 = idle
  76. // 1 = forward
  77. // 2 = backward
  78. // 3 = side left
  79. // 4 = side right
  80. // 5 = jumping
  81. // 6 = ground land
  82. // 7 = crouch
  83. // 8 = crouch forward
  84. // 9 = crouch backward
  85. // 10 = ground death anim
  86. // 11 = explode death anim
  87. // 12 = water death anim
  88. // 13 = water death anim idle loop
  89. // 14 = ground death anim idle loop
  90. // 15 = lava death anim
  91. // 16 = quick sand death anim
  92. // 17 = attack anim
  93. // 18 = idle climb
  94. // 19 = move climb
  95. // 20 = falling death
  96.  
  97.  
  98. //------------------------------------------------------------------------------------------------------------------------
  99. | Globals
  100. //------------------------------------------------------------------------------------------------------------------------
  101. const bool IsMultiplayer(void) //in a multiplayer match online or offline
  102. void DoPlayerWarp(const int playerID, const int warpTID, const int mapID = -1, const bool playWarpAnimation = false)
  103.         //Example: DoPlayerWarp(0, 17401, kLevel_BlindOneBoss, true);
  104. void SpawnShake(const kVec3& in directionPower, const kVec3& in origin, const float radius, bool sineWaveShake)
  105.     //SpawnShake(kVec3(0, 0, fShake), self.Owner().Actor().Origin(), 10000, true);
  106. void DefineMode(const kStr& in tableName, const uint32 modeID, const kStr& in setupHeader, const kStr& in tickHeader, const EnumClipFlags clipFlags, const uint32 animID, const kStr& in animHeader, const float animSpeed, const float animBlendSpeed, const uint32 endOffset, const uint32 modeFlags);
  107. //void DefineMode(const kStr& in, const uint32, const kStr& in, const kStr& in, const uint32, const uint32, const kStr& in, const float, const float, const uint32, const uint32)
  108.     //Example: DefineMode("ActionObjectModeTable", ACTIONOBJECT_MODE_TRIGGER,  "void MODE_TriggerSetup(void)", "void MODE_TriggerTick(void)",  CF_STATIC, 0, "int MODE_TriggerAnim(void)", 0, 0, 0, MF_NOROOTMOTION);
  109. const float GAME_DELTA_TIME = 0.016667
  110. const float GAME_SCALE = 10.240000
  111. const float GAME_FRAME_TIME = 0.250000
  112. const float GAME_FRAME_UNIT = 4.000000
  113. const float GAME_SECONDS = 0.066667 (1 / 15th of a second)
  114.  
  115. //------------------------------------------------------------------------------------------------------------------------
  116. | kNetwork Network
  117. //------------------------------------------------------------------------------------------------------------------------
  118. bool IsNetgame(void)
  119. kActor@ GetNetActor(int16 netID)
  120. kParticle@ GetNetParticle(int16 netID)
  121. bool IsServer(void)
  122. bool IsClient(void)
  123. void TransmitToAll(void) //from server to clients. Call after NetSend writes
  124.  
  125. //------------------------------------------------------------------------------------------------------------------------
  126. | NetRecv ///should only be called for client players (Network.IsNetgame() && Network.IsClient()) and read in the same order as was writen
  127. //------------------------------------------------------------------------------------------------------------------------
  128. int16 ReadInt16(void) //call in sent func
  129. int32 ReadInt32(void) //call in sent func
  130.  
  131. //------------------------------------------------------------------------------------------------------------------------
  132. | NetSend //only do these calls for the server player (Network.IsNetgame() && Network.IsServer())
  133. //------------------------------------------------------------------------------------------------------------------------
  134. void Clear(void); //call before WriteScriptHeader
  135. void WriteScriptHeader(const kStr&in funcHeader) //call after Clear (only clients will recieve the ScriptHeader)
  136.     //Example: NetSend::WriteScriptHeader("void NetworkRecvSpawnBoreController(void)");
  137. void WriteInt16(int16) //call after WriteScriptHeader
  138. void WriteInt32(int32) //call after WriteScriptHeader
  139.  
  140. //------------------------------------------------------------------------------------------------------------------------
  141. | kSys Sys
  142. //------------------------------------------------------------------------------------------------------------------------
  143. void Print(const kStr &in message)
  144. void Warning(const kStr &in message)
  145. int VideoWidth(void)
  146. int VideoHeight(void)
  147. int Mouse_X(void)
  148. int Mouse_Y(void)
  149. const bool GetCvarValue(const kStr &in name, kStr &out result) //returns true if found cVar name
  150.  
  151. //------------------------------------------------------------------------------------------------------------------------
  152. | Event Functions to ScriptObject
  153. //------------------------------------------------------------------------------------------------------------------------
  154. void OnBeginLevel(void) //never gets called?
  155. void OnTick(void)
  156. void OnEndLevel(void) //never gets called?
  157. void OnSpawn(void)
  158. void OnPreDamage(kDamageInfo& in dmgInfo) //called before OnDamage and OnDeath
  159. void OnDamage(kDamageInfo& in dmgInfo)
  160.     //called after OnDeath and OnPreDamage.
  161.     //Health is reduced after this is called which means after an OnDeath call the remaining Health will always be negative of the damage taken.
  162.     //This is never called if an actor of the same Type() ID damages another actor of the same Type() ID. But PreDamage is still called.
  163. void OnLevelLoad(kDictMem@ pDict) //called when actor is placed on the map in the editor and the map is loaded. Not called when Loading a save game.
  164. void OnDeath(kDamageInfo& in dmgInfo) //called after OnPreDamage and before OnDamage.
  165. void OnTouch(kActor@ pInstigator)
  166. void OnTrigger(kActor@ pInstigator, const int msg)
  167. void UserEvent(const float x, const float y, const float z, const float f1, const float f2, const float f3, const float f4)
  168. void OnCollide(kActor@ pCollider)
  169. void OnSerialize(kDict& out dict)
  170. void OnDeserialize(kDict& in dict)
  171.  
  172. //------------------------------------------------------------------------------------------------------------------------
  173. | Execution Order of Event Startup Functions:
  174. //------------------------------------------------------------------------------------------------------------------------
  175. .ctor
  176. OnLevelLoad     <-- when actor was placed in editor. Not called on Deserialize. Not called for Player actor.
  177. OnDeserialize   <-- if loaded a saved game
  178. OnSpawn         <-- Only called for actors loaded from map and the player(called twice for player in MP because of bug)
  179. OnTick
  180.  
  181. //------------------------------------------------------------------------------------------------------------------------
  182. | Event Functions to ScriptObject (kWeapon)
  183. //------------------------------------------------------------------------------------------------------------------------
  184. void OnBeginFire()
  185. void OnFire()
  186. void OnEndFire()
  187. void OnLower()
  188. void OnRaise()
  189. void OnHoldster()
  190. void OnFiredParticleFromAnim(kParticle@ particle)
  191.  
  192. //------------------------------------------------------------------------------------------------------------------------
  193. | kDamageInfo
  194. //------------------------------------------------------------------------------------------------------------------------
  195. float hits //damage
  196. kParticle@ particle
  197. kActor@ inflictor
  198. kActor@ source
  199. kActor@ target
  200. uint boneFlags
  201. int boneID
  202. uint flags //EnumDamageFlags
  203. float radius
  204. bool opEquals(const ?&in)
  205. const bool opEquals(const ref &in)
  206.  
  207. //------------------------------------------------------------------------------------------------------------------------
  208. | kActorIterator
  209. //------------------------------------------------------------------------------------------------------------------------
  210. kActor@ GetNext(void)
  211.     //Example to iterate through all actors in the map:
  212.         //kActorIterator cIterator;
  213.         //kActor@ pActor;
  214.         //while(!((@pActor = cIterator.GetNext()) is null))
  215.         //{
  216.             //do something with pActor
  217.         //}
  218.  
  219. //------------------------------------------------------------------------------------------------------------------------
  220. | kAnimTrackComponent
  221. //------------------------------------------------------------------------------------------------------------------------
  222. kActor @Owner(void)
  223. void Toggle(const bool isVisible)
  224. const int NumFrames(void)
  225. const int CurrentFrame(void)
  226. void Set(const int animID, float animSpeed, int animStateFlags)
  227. void Blend(const int animID, float animSpeed, float blendSpeed, int animStateFlags)
  228. bool CheckAnimID(const int animID) //returns true if animID exists in the actors animations
  229. bool IsPlaying(const int animID)
  230. const float TrackTime(void)
  231. const float PlayTime(void)
  232. void Resume(void)
  233. void Pause(void)
  234. void Stop(void)
  235. const int PlayingID(void)
  236. const const bool CycleCompleted(void)
  237. const bool Looping(void)
  238. const bool Blending(void)
  239. const bool Stopped(void)
  240. uint &MovementClipFlags(void)
  241. int &Flags(void) //EnumAnimStateFlags
  242. void SetLastFrame(const bool execActions = false) //if execActions is true, runs all key frame actions that are event types UnBlock and Block only.
  243. void ChangeSpeed(const float speed)
  244. const uint AnimCount(void)
  245.  
  246. //------------------------------------------------------------------------------------------------------------------------
  247. | kRenderMeshComponent
  248. //------------------------------------------------------------------------------------------------------------------------
  249. void ToggleHotPoint(const int fxType, const bool showFx)
  250.     //fx types:
  251.     //1 = on fire (needs to be called ontick for continuous caught on fire effect)
  252.     //3 = death blood (normally is set automatically when dying and turns off when death animation is complete)
  253.     //6 = bore head blood gushing
  254. void SetAttachedMeshVisibility(const uint meshID, const bool visible)
  255. void SwapOutMesh(const int meshID)
  256. int& AltTexture(void) //set to -1 = first texture, 0 = second ...
  257. uint8& Flags(void) //EnumRenderMeshComponentFlags
  258. kVec3& HeadTrackPos(void)
  259. bool& CanFlinch(void)
  260. uint32& FxFlags(void)
  261. void SetScale(const int nodeID, const kVec3& in scale)
  262. void SetRotationOffset(const int nodeID, const float angle, const float xMul, const float yMul, const float zMul)
  263. //Example:
  264.     //self.RenderMeshComponent().SetRotationOffset(m_gunNode, self.Pitch(), 1, 0, 0);
  265.     //self.RenderMeshComponent().SetRotationOffset(1, Math::Deg2Rad(m_spinAngle), 0, 1, 0);
  266.  
  267. //------------------------------------------------------------------------------------------------------------------------
  268. | kWorldComponent
  269. //------------------------------------------------------------------------------------------------------------------------
  270. float &WallRadius(void)
  271. float &Radius(void)
  272. int16 &Flags(void) //EnumWorldComponentFlags
  273. float &DeadHeight(void)
  274. float &HeightOffset(void)
  275. float &Height(void)
  276. float &TouchRadius(void)
  277. void SetNearestPosition(const kVec3&in origin) //sets this actor to the best possible position and updates region
  278. void SetRegion(const int regionIndex, const bool callDelegates = true) //If true, then it will invoke the OnEnterRegion and OnExitRegion delegate callbacks if the regionIndex is not in the same area
  279. bool HasCollision(void) //returns true if flags WCF_NONSOLID is off and radius is > 0
  280. void LinkArea(void) //Links owner object to a new area node (used for actor-actor collision)
  281. const bool FindRegionAtOrigin(const kVec3&in origin, const bool callDelegates = true) //Will attempt to find a region in which given coordinates are contained inside. Returns false if no region was found
  282. const int RegionIndex(void) //Returns the index of the current region
  283. const int16 GetNearPositionAndRegionIndex(const kVec3&in pos, kVec3&out posResult, const uint enumClipFlags = CF_NEARREGIONTEST) //returns the regionIndex.
  284. float& FloorHeight(void)
  285. kActor@ Owner()
  286. void HitScan(kClipInfo&out clipInfo, const kVec3&in origin, const kVec3&in targetOrigin, const uint EnumClipFlags, const float fScale = 0)
  287.  
  288. //------------------------------------------------------------------------------------------------------------------------
  289. | kModeStateComponent
  290. //------------------------------------------------------------------------------------------------------------------------
  291. void ForgetAnimState(void) //forget its current anim. Will allow any animation to override, including the one that's being played already.
  292. int32& PrevMode(void)
  293. const int32 Mode(void)
  294. float& ModeTime(void) //Time this mode has been ticking since the current mode was setup. (15.0f = 1 second)
  295. bool SetMode(const int modeID, const bool restart = false) //If restart is true the setup callback for the mode will be called
  296. void AssignModeTable(const kStr&in modeTableName) //Assign a Mode Table that was created with DefineMode
  297.  
  298. //------------------------------------------------------------------------------------------------------------------------
  299. | kMovementComponent
  300. //------------------------------------------------------------------------------------------------------------------------
  301. float& AirFriction(void)
  302. float& Friction(void)
  303. float& Mass(void)
  304. kVec3& Velocity(void)
  305. uint& Flags(void) //EnumMovementComponentFlags
  306. float& WaterGravity(void)
  307. float& Gravity(void)
  308. float& WaterFriction(void)
  309. uint& ClipFlags(void) //EnumClipFlags
  310.  
  311. //------------------------------------------------------------------------------------------------------------------------
  312. | kEnemyAIComponent
  313. //------------------------------------------------------------------------------------------------------------------------
  314. const uint32 CommonFlags(void) //EnumEnemyAICommonFlags
  315. uint32& SpawnFlags(void) //EnumEnemyAIGeneralFlags
  316. const float GetAvoidanceAngle(const kVec3&in lookAtLocation, const float radius)
  317. void Turn(const float maxSpeed, const float angle)
  318. const bool HasOverrideTarget(void) //returns true if a different actor(enemy or player) becomes a higher priority target (from taking damage from this override target)
  319. void GetMovementInfo(void)
  320. kAITargetInfo& SightTarget(void) //target to attack
  321. kAITargetInfo& PathTarget(void) //target to move to
  322. void SetNoUpdateTarget(const bool ignorePlayerPath, const bool ignorePlayerSight) //SetNoUpdateTarget(const bool bPathInfo, const bool bSightInfo);
  323.     //if ignorePlayerPath is true ignores pathing to player (goes to default behaviour - go back and stand at spawn position and if has path(set in editor with pathpoints) then start the path over again
  324.     //if ignorePlayerSight is true ignores sight/attacking to player (goes to default behaviour - can attack other targets that are set with SetTarget() or the OverrideTarget that gets set internally. OverrideTarget takes priority.)
  325. void GetTargetInfo(const bool pathInfo, const bool sightInfo)
  326.     //if pathInfo is true PathTarget() will return updated info
  327.     //if sightInfo is true SightTarget() will return updated info
  328.  
  329. //------------------------------------------------------------------------------------------------------------------------
  330. | kAITargetInfo
  331. //------------------------------------------------------------------------------------------------------------------------
  332. void Reset(void) //clears all data in this kAITargetInfo
  333. kActor@ Target(void)
  334. void SetTarget(kActor@)
  335. int m_eType //EnumEnemyAITargetTypes
  336. float m_fDist
  337. kVec3 m_vDeltaTargetPos
  338. kVec3 m_vTargetPos
  339. float m_fDeltaAngle
  340. float m_fDistXY
  341.  
  342. //------------------------------------------------------------------------------------------------------------------------
  343. | kClipInfo
  344. //------------------------------------------------------------------------------------------------------------------------
  345. float fraction //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.)
  346. int contactRegion
  347. int impactType
  348. kVec3 vInterceptVector //Returns the vector that intersected the collided geometry
  349. kVec3 vContactNormal //Returns the normalized vector of the collided surface
  350. uint clipResult //EnumClipFlags - specifies the type of intersection
  351. bool bHitWater
  352. int16 wBoneType
  353. int16 wBoneID
  354. kWorldComponent@ pContactCollider //handle pointer to colliders WorldComponent (null if none was collided)
  355.  
  356. //------------------------------------------------------------------------------------------------------------------------
  357. | Enums
  358. //------------------------------------------------------------------------------------------------------------------------
  359. EnumDamageFlags
  360. DF_NORMAL = 1 << 0
  361. DF_VIOLENT = 1 << 1
  362. DF_EXPLOSIVE = 1 << 2
  363. DF_EXTREME = 1 << 3
  364. DF_LAVA = 1 << 4
  365. DF_DROWN = 1 << 5
  366. DF_SEVER = 1 << 6
  367. DF_FALLDEATH = 1 << 7
  368. DF_HAZARD = 1 << 8
  369.  
  370. EnumPlayerFlags
  371. PF_NOCLIP = 1 << 0
  372. PF_FLY = 1 << 1
  373. PF_DEAD = 1 << 2
  374. PF_GOD = 1 << 3
  375. PF_JUMPING = 1 << 4
  376. PF_HASJUMPED = 1 << 5
  377. PF_INWARPAREA = 1 << 6
  378. PF_CLIMBTHRUST = 1 << 7
  379. PF_NOAIRFRICTION = 1 << 8
  380. PF_CRAWLING = 1 << 9
  381. //PF_FALLINGDEATHPIT = 1 << 10
  382. //PF_FLOATCAM = 1 << 11 (not defined)
  383. //PF_CLIMBTILTWOBBLE = 1 << 12 (not defined)
  384. //PF_LERPTOSURFACE = 1 << 13 ((not defined) - is swimming above the water like (T1 INBETWEEN)
  385. //PF_OXYGENOUT = 1 << 14
  386. //PF_LOCKWEAPON = 1 << 15 (not defined - can't change weapon) //PF_RIDINGSOMETHING
  387. //PF_SHOCKED = 1 < 16
  388. //PF_ISSCARY = 1 << 17
  389. //PF_HIDEWEAPON = 1 << 18 (not defined - Hides the weapon model) //PF_INDEATHCINEMATIC
  390. //PF_SPECTATING = 1 << 19 (not defined)
  391. //PF_NOWEAPONSPICKUPS = 1 << 20
  392. //PF_NOWEAPON = 1 << 21 (not defined - hides weapon and disables weapon switching and firing)
  393. //PF_DEMIGOD = 1 << 22 (not defined - When damaged health will not go below 1 - can still die by death pits)
  394.  
  395. EnumAnimStateFlags
  396. ANF_BLEND = 1 << 0
  397. ANF_LOOP = 1 << 1
  398. ANF_STOPPED = 1 << 2
  399. ANF_NOINTERRUPT = 1 << 3
  400. ANF_ROOTMOTION = 1 << 4
  401. ANF_PAUSED = 1 << 5
  402. ANF_CYCLECOMPLETED = 1 << 6
  403. ANF_LINEARBLEND = 1 << 7
  404. ANF_NOACCUMULATION = 1 << 8
  405.  
  406. EnumActorFlags
  407. AF_NODAMAGE = 1 << 0 // cannot receive damage
  408. AF_HIDDEN = 1 << 1 // does not render and may not perform collision checks
  409. AF_DEAD = 1 << 2 // set when health is <= 0 and OnDeath has been called
  410. AF_TRIGGERED = 1 << 3 // set when activated by something. mainly used to avoid self-recursion
  411. //AF_POSTLEVELSPAWN = 1 << 4 // set if actor has been spawned during a play session. used to do special initialization for components
  412. AF_ALLOWTRACKING = 1 << 5 // can be tracked by weapon trackers
  413. AF_NOINFLICTDAMAGE = 1 << 6 // same as AF_NODAMAGE except it is cleared every tick if set. used for special case events
  414. //AF_SELECTED = 1 << 7 // object is selected in editor
  415. AF_CASTSHADOW = 1 << 8 // cast shadow
  416. AF_NOGENERATE = 1 << 9 // cannot generate actors via Actor Factory
  417. //AF_DIFFICULTY_EASY = 1 << 10 // appears on easy difficulty
  418. //AF_DIFFICULTY_NORMAL = 1 << 11 // appears on normal difficulty
  419. //AF_DIFFICULTY_HARD = 1 << 12 // appears on hard difficulty
  420. //AF_DIFFICULTY_HARDCORE = 1 << 13 // appears on hardcore diffuclty
  421. AF_IMPORTANT = 1 << 14 // special-case. highlights/appears on player's hud (objective points, interactables, etc)
  422. AF_DESERIALIZED = 1 << 15 // set when being loaded from a save game. cleared on the next tick call
  423. AF_FULLSHADOWRESOLUTION = 1 << 16 // forces the shadow map at the highest possible resolution
  424. AF_HIDEINCINEMATICS = 1 << 17 // don't draw if a cinematic is playing
  425. AF_EVENTSPAWNED = 1 << 18 // spawned via special action event
  426. AF_HASTRIGGERLISTENER = 1 << 19
  427. AF_HASRESETRLISTENER = 1 << 20
  428. AF_HASSHOTLISTENER = 1 << 21
  429. AF_HASDEATHLISTENER = 1 << 22
  430. AF_HASCOLLIDELISTENER = 1 << 23
  431.  
  432. EnumClipFlags
  433. CF_CLIPEDGES = 1 << 0 // clip movement against edges that don't link to regions
  434. CF_IGNOREBLOCKERS = 1 << 1 // don't clip edges belonging to blocking regions
  435. CF_DROPOFF = 1 << 2 // allows passing through platforms or ledges
  436. CF_NOENTERWATER = 1 << 3 // block all edges that links to a water region
  437. CF_NOEXITWATER = 1 << 4 // block all edges that links to a non-water region
  438. CF_NOCLIPSTATICS = 1 << 5 // don't collide with static models
  439. CF_NOCLIPACTORS = 1 << 6 // don't collide with dynamic objects/actors
  440. CF_ALLOWCLIMB = 1 << 7 // collide with regions flagged as climbable
  441. CF_ALLOWCRAWL = 1 << 8 // collide with regions flagged as crawlable
  442. CF_COLLIDECORPSES = 1 << 9 // clip against actors flagged as dead
  443. CF_NOBACKFACECULLING = 1 << 10 // trace both front and back sides of a surface (hitscan only)
  444. CF_COLLIDEWATER = 1 << 11 // clip movement against the water surface
  445. CF_USEWALLRADIUS = 1 << 12 // clip and project movement away from walls based on wall radius
  446. CF_GREASESLIDEOBJECTS = 1 << 13 // always keep movement projected away from collided objects
  447. CF_ALLOWRESTRICTEDAREAS = 1 << 14 // don't collide with edges belonging to a restricted region
  448. CF_CHECKLINKEDBRIDGES = 1 << 15 // do extensive checks against overlapping bridge regions
  449. CF_POLYCOLLISION = 1 << 16 // clip movement against all model polygons of an object (hitscan only)
  450. CF_TRACKGROUND = 1 << 17 // keep movement vector parallel with the ground
  451. CF_WALKWALLS = 1 << 18 // allow entering wall regions by walking into it
  452. CF_TESTONLY = 1 << 19 // simple test case. does one iteration and restores moving object's status when done
  453. CF_COLLIDECEILING = 1 << 20 // clip against ceiling regions
  454. CF_COLLIDEFLOOR = 1 << 21 // clip against floor regions
  455. CF_COLLIDEJOINTS = 1 << 22 // clip against render mesh bones (hitscan only)
  456. CF_CANLANDONOBJECTS = 1 << 23 // prevents ejecting collider away from object
  457. CF_NOEXITRESTRICTEDAREAS = 1 << 24 // clips against non-restricted regions
  458. CF_ALLOWPLAYERRESTRICTED = 1 << 25 // don't collide with edges linked to player blocking regions
  459. CF_NOEXITPLAYERRESTRICTED = 1 << 26 // clip against non-player blocking regions
  460. CF_NOENTERLAVA = 1 << 27 // clip against edges linked to lava regions
  461. CF_NOEXITLAVA = 1 << 28 // clip against edges linked to non-lava regions
  462. CF_NOENTERSWAMP = 1 << 29 // clip against edges linked to swamp regions
  463. CF_NOEXITSWAMP = 1 << 30 // clip against edges linked to non-swamp regions
  464. CF_EXPANDJOINTNODES = 1 << 31 // expand joint bounding boxes for head, body, arm and legs
  465. CF_DEAD_CHARACTER = CF_CLIPEDGES | CF_DROPOFF | CF_COLLIDECORPSES | CF_USEWALLRADIUS | CF_CHECKLINKEDBRIDGES | CF_TRACKGROUND | CF_COLLIDECEILING | CF_ALLOWPLAYERRESTRICTED //34771461
  466. CF_CHARACTER_UNDERWATER = CF_CLIPEDGES | CF_DROPOFF | CF_USEWALLRADIUS | CF_CHECKLINKEDBRIDGES | CF_TRACKGROUND | CF_COLLIDECEILING | CF_ALLOWPLAYERRESTRICTED | CF_NOENTERSWAMP //705859589
  467. CF_CHARACTER_FLYING = CF_CLIPEDGES | CF_DROPOFF | CF_NOENTERWATER | CF_USEWALLRADIUS | CF_CHECKLINKEDBRIDGES | CF_TRACKGROUND | CF_COLLIDECEILING | CF_ALLOWPLAYERRESTRICTED | CF_NOENTERSWAMP //705859597
  468. CF_CHARACTER = CF_CLIPEDGES | CF_NOENTERWATER | CF_USEWALLRADIUS | CF_CHECKLINKEDBRIDGES | CF_TRACKGROUND | CF_ALLOWPLAYERRESTRICTED | CF_NOENTERSWAMP //704811017
  469. CF_RAYCAST = CF_CLIPEDGES | CF_DROPOFF | CF_ALLOWCRAWL | CF_ALLOWRESTRICTEDAREAS | CF_CHECKLINKEDBRIDGES | CF_WALKWALLS | CF_TESTONLY | CF_ALLOWPLAYERRESTRICTED  //34390277
  470. CF_STATIC = CF_CLIPEDGES | CF_DROPOFF | CF_NOCLIPSTATICS | CF_NOCLIPACTORS | CF_ALLOWCRAWL | CF_ALLOWRESTRICTEDAREAS | CF_ALLOWPLAYERRESTRICTED  //33571173
  471. CF_NEARREGIONTEST = CF_CLIPEDGES | CF_IGNOREBLOCKERS | CF_DROPOFF | CF_NOCLIPSTATICS | CF_NOCLIPACTORS | CF_ALLOWRESTRICTEDAREAS | CF_CHECKLINKEDBRIDGES | CF_WALKWALLS | CF_TESTONLY | CF_ALLOWPLAYERRESTRICTED   //34390119
  472. CF_PARTICLE = CF_CLIPEDGES | CF_IGNOREBLOCKERS | CF_DROPOFF | CF_ALLOWCRAWL | CF_COLLIDECORPSES | CF_COLLIDEWATER | CF_ALLOWRESTRICTEDAREAS | CF_CHECKLINKEDBRIDGES | CF_COLLIDECEILING | CF_COLLIDEFLOOR | CF_ALLOWPLAYERRESTRICTED  //36752135
  473. CF_SIMPLE_OBJECT = CF_CLIPEDGES | CF_DROPOFF | CF_NOCLIPACTORS | CF_CHECKLINKEDBRIDGES | CF_COLLIDECEILING | CF_COLLIDEFLOOR | CF_NOENTERLAVA | CF_NOENTERSWAMP  //674267205
  474.  
  475. EnumModeFlags
  476. MF_INVINCIBLE = 1 << 0
  477. MF_HEADTRACK = 1 << 1
  478. MF_CLEARMOVEMENT = 1 << 2
  479. MF_NO_BLEND = 1 << 3
  480. MF_IDLE = 1 << 4
  481. MF_CLEARLOOPSOUNDS = 1 << 5
  482. MF_NOACCUMULATION = 1 << 6
  483. MF_NOROOTMOTION = 1 << 7
  484. MF_SCRIPT = 1 << 8
  485.  
  486. EnumRenderMeshComponentFlags
  487. RMCF_RENDER_AS_WEAPON = 1 << 0
  488. RMCF_CLOAKED = 1 << 1
  489. RMCF_HEADTRACK = 1 << 2
  490. RMCF_TINYMODE = 1 << 3
  491. RMCF_WAGGLE = 1 << 4
  492. RMCF_SHOCKED = 1 << 5
  493. RMCF_STICKMODE = 1 << 6
  494. RMCF_NOEXPANDJOINTS = 1 << 7
  495.  
  496. EnumWorldComponentFlags
  497. WCF_NONSOLID = 1 << 0
  498. WCF_INVOKE_COLLIDE_CALLBACK = 1 << 1
  499. WCF_ON_PLATFORM = 1 << 2
  500. WCF_NO_CLAMP_TO_FLOOR = 1 << 3
  501. WCF_ON_WATER = 1 << 4
  502. WCF_UNDER_WATER = 1 << 5
  503. WCF_ABOVE_WATER = 1 << 6
  504. WCF_IN_SHALLOW_WATER = 1 << 7
  505. WCF_IN_ANTIGRAVITY = 1 << 8
  506. WCF_AT_CLIMBING_SURFACE = 1 << 9
  507. WCF_ON_CROUCH_ENTEREXIT = 1 << 10
  508. WCF_ON_CROUCH = 1 << 11
  509. WCF_JUST_ENTERED_DEATH_REGION = 1 << 12
  510. WCF_TRACK_GROUND = 1 << 13
  511. WCF_WALK_WALLS = 1 << 14 //(not defined)
  512. WCF_ENTERED_FALL_DEATH_REGION = 1 << 15 //(not defined)
  513.  
  514. EnumEnemyAICommonFlags (not defined)
  515. //EAICF_LEADER = 1 << 0
  516. //EAICF_FOLLOWER = 1 << 1
  517. //EAICF_PASS_ON_LEADERSHIP = 1 << 2
  518. //EAICF_FREE_FOLLOWERS = 1 << 3
  519. //EAICF_USE_LEASH = 1 << 4
  520. //EAICF_RESPAWN = 1 << 5
  521. //EAICF_TELEPORT = 1 << 6
  522. //EAICF_CAN_BE_BLINDED = 1 << 7
  523. //EAICF_CAN_BE_SHOCKED = 1 << 8
  524. //EAICF_CAN_BE_TRANQUALIZED = 1 << 9
  525. //EAICF_CAN_BE_BORED = 1 << 10
  526. //EAICF_LINK_TRIGGERED = 1 << 11
  527. //EAICF_INVISIBLE = 1 << 12
  528. //EAICF_CAN_BE_BORE_TRACKED = 1 << 13
  529. //EAICF_FACE_START_ON_LEASH = 1 << 14
  530. //EAICF_RESTRICTVISION = 1 << 15
  531. //EAICF_VANISH_ON_DEATH = 1 << 16
  532. //EAICF_FEIGN_DEATH = 1 << 17
  533. //EAICF_HURT_BY_SUNFIRE = 1 << 18
  534. //EAICF_NO_FLINCHING = 1 << 19
  535. //EAICF_CAN_CLOAK = 1 << 20
  536. //EAICF_AUTO_TRIGGER = 1 << 21
  537.  
  538. EnumEnemyAIGeneralFlags
  539. EAIGF_CLIMBUP = 1 << 0
  540. EAIGF_DROPOFF = 1 << 1
  541. EAIGF_ENTERWATER = 1 << 2
  542. EAIGF_EXITWATER = 1 << 3
  543. EAIGF_ENTERLAVA = 1 << 4
  544. EAIGF_EXITLAVA = 1 << 5
  545. EAIGF_PICKUP_ON_GROUND = 1 << 6
  546. EAIGF_PICKUP_ON_AIR = 1 << 7
  547. EAIGF_PICKUP_ON_WATER = 1 << 8
  548. EAIGF_ENTERRESTRICTED = 1 << 9
  549. EAIGF_EXITRESTRICTED = 1 << 10
  550. EAIGF_ENTERSWAMP = 1 << 11
  551. EAIGF_EXITSWAMP = 1 << 12
  552. EAIGF_ENTERCROUCH = 1 << 13
  553. EAIGF_EXITCROUCH = 1 << 14
  554. EAIGF_ATTACK_LANDED = 1 << 15
  555. EAIGF_STUN_LOCKED = 1 << 16
  556. EAIGF_NO_UPDATE_SIGHT_TARGET = 1 << 17 //(not defined)
  557. EAIGF_NO_UPDATE_PATH_TARGET  = 1 << 18 //(not defined)
  558. EAIGF_NO_FACE_TARGET =  = 1 << 19 //(not defined)
  559.  
  560. EnumMovementComponentFlags
  561. MCF_NO_GRAVITY = 1 << 0
  562. MCF_FALLING = 1 << 1
  563. MCF_ALLOW_SLIDING = 1 << 2
  564. MCF_SLIDING = 1 << 3
  565. MCF_UNDERWATER = 1 << 4
  566. MCF_DISABLE_AIR_FRICTION_UNTIL_LAND = 1 << 5
  567. MCF_PROCESS_MOVEMENT = 1 << 6
  568.  
  569. ParticleFlags (undefined 0,1 flags?)
  570. FXF_HIT_GROUND = 1 << 0 // Unused
  571. FXF_HIT_WALL = 1 << 1 // Unused
  572. FXF_PERMANENT = 1 << 2
  573. FXF_NOCOLLISION = 1 << 3
  574. FXF_ONE_FRAME_ONLY = 1 << 4
  575. FXF_NO_INBETWEENS = 1 << 5
  576. FXF_STICK_CHAR = 1 << 6
  577. FXF_STICK_STATIC = 1 << 7
  578. FXF_NO_SOUND = 1 << 8
  579. FXF_ATTACH_TO_PLAYER = 1 << 9
  580. FXF_BLOOD = 1 << 10
  581. FXF_UNDERWATER = 1 << 11
  582. FXF_BECAME_PICKUP = 1 << 12
  583. FXF_ALTERNATE_BLOOD = 1 << 13
  584. FXF_DREW_BLOOD = 1 << 14
  585. FXF_DREW_BLOOD_GREEN = 1 << 15
  586. FXF_PASSON = FXF_NO_SOUND | FXF_UNDERWATER //2304
  587.  
  588. EnumPlayerButtons
  589. BC_ATTACK = 1 << 0
  590. BC_JUMP = 1 << 1
  591. BC_FORWARD = 1 << 2
  592. BC_BACKWARD = 1 << 3
  593. BC_STRAFELEFT = 1 << 4
  594. BC_STRAFERIGHT = 1 << 5
  595. //BC_CROUCH = 1 << 6 (Not defined for some reason)
  596. BC_ALTFIRE = 1 << 7
  597. BC_SCOPEZOOMIN = 1 << 8
  598. BC_SCOPEZOOMOUT = 1 << 9
  599. //BC_WEAPONWHEEL1 = 1 << 10 //(Not defined)
  600. //BC_WEAPONWHEEL2 = 1 << 11 //(Not defined)
  601.  
  602. EnumEnemyAITargetTypes
  603. EAITT_ATTACKER = 0
  604. EAITT_FLEE = 1
  605. EAITT_LEADER = 2
  606. EAITT_LEASH = 3
  607. EAITT_PATH = 4
  608. EAITT_OBJECT = 5
  609. EAITT_DEATH = 6
  610. EAITT_COVER = 7
  611.  
  612. EnumDifficulty
  613. DIFFICULTY_EASY = 0
  614. DIFFICULTY_NORMAL = 1
  615. DIFFICULTY_HARD = 2
  616. DIFFICULTY_HARDCORE = 3
  617.  
  618. EnumPlaneSide (unused?)
  619. PSIDE_ON = 0
  620. PSIDE_BACK = 0
  621. PSIDE_FRONT = 0
  622.  
  623. //------------------------------------------------------------------------------------------------------------------------
  624. | kDict, kDictMem
  625. //------------------------------------------------------------------------------------------------------------------------
  626. const bool HasKey(const kStr &in key) //kDict only
  627. void Add(const kStr &in key, const kStr &in value) //kDict only
  628. void SetValue(const kStr &in key, const kStr &in value) //kDict only
  629. void Empty(void) //removes all keys/values //kDict only
  630. bool GetFloat(const kStr &in key, float &out floatResult, const float defaultValue = 0) //returns true if successful
  631. bool GetVector(const kStr &in key, kVec3 &out vectorResult) //returns true if successful
  632. bool GetString(const kStr &in key, kStr &out stringResult) //returns true if successful
  633. bool GetBool(const kStr &in key, bool &out boolResult, const bool defaultValue = false) //returns true if successful
  634. bool GetInt(const kStr &in key, int &out intResult, const int defaultValue = 0) //returns true if successful
  635.  
  636. //------------------------------------------------------------------------------------------------------------------------
  637. | kDefManager
  638. //------------------------------------------------------------------------------------------------------------------------
  639. const uint EntryCount(void)
  640. kDictMem @GetEntry(const kStr &in key)
  641.     //Returns the def data from the key name or null if key not found
  642. void LoadFile(const kStr &in localFilePath, bool = false)
  643.     //Example: LoadFile("Defs/MyDef.txt");
  644. void LoadFilesInDirectory(const kStr &in localDirectoryPath, const kStr &in fileExtension, bool = false)
  645.     //Loads all files in the directory and it's sub directories
  646.     //Example: LoadFilesInDirectory("Defs/MyDefs/", "txt");
  647.  
  648. //------------------------------------------------------------------------------------------------------------------------
  649. | kIndexDefManager
  650. //------------------------------------------------------------------------------------------------------------------------
  651. const uint EntryCount(void)
  652. int FindHighestIndex(void) //returns the 0 if no entries
  653. kDictMem @GetEntry(const int index)
  654.     //Returns the def data using an index value or null if key not found
  655. void LoadFile(const kStr &in localFilePath, bool = false)
  656. void LoadFilesInDirectory(const kStr &in localDirectoryPath, const kStr &in fileExtension, bool = false)
  657.     //Loads all files in the directory and it's sub directories
  658.     //Example: LoadFilesInDirectory("Defs/MyDefs/", "txt");
  659.  
  660. //------------------------------------------------------------------------------------------------------------------------
  661. | kSelectionListFloat
  662. //------------------------------------------------------------------------------------------------------------------------
  663. kSelectionListFloat &opAssign(const kSelectionListFloat &in)
  664. const uint GetNumEntries(void)
  665. int& Select(const bool)
  666. void AddItem(int, const int)
  667.  
  668. //------------------------------------------------------------------------------------------------------------------------
  669. | kSelectionListInt
  670. //------------------------------------------------------------------------------------------------------------------------
  671. kSelectionListInt &opAssign(const kSelectionListInt &in)
  672. const uint GetNumEntries(void)
  673. int& Select(const bool)
  674. void AddItem(int, const int)
  675.  
  676. //------------------------------------------------------------------------------------------------------------------------
  677. | kHud Hud (barIDs range from 0 to 1)
  678. //------------------------------------------------------------------------------------------------------------------------
  679. void DisableBar(const uint8 barID)
  680. void UpdateBar(const uint8 barID, const uint32 value)
  681. void SetBar(const uint8 barID, const uint8 red, const uint8 green, const uint8 blue, const uint8 alpha, const uint32 value) //alpha does nothing
  682. void AddMessage(const int localizedTextID, const int visibleTime = 120) //visibleTime: (In frames) most likely to be 60 = 1 second
  683. void AddMessage(const kStr&in message, const int visibleTime = 120)
  684.  
  685. //------------------------------------------------------------------------------------------------------------------------
  686. | kGame Game
  687. //------------------------------------------------------------------------------------------------------------------------
  688. const int16 ActiveMapID(void)
  689. void PlayMusic(const int musicID)
  690. void PlayVoice(const int voiceID)
  691.  
  692. //------------------------------------------------------------------------------------------------------------------------
  693. | kCinemaPlayer CinemaPlayer
  694. //------------------------------------------------------------------------------------------------------------------------
  695. void StartCinema(const kStr&in cinemaScriptPath)
  696. void StopCinema(void)
  697. const bool PathTrackPlaying(void)
  698. const bool Playing(void)
  699. const bool Enabled(void)
  700.  
  701. //------------------------------------------------------------------------------------------------------------------------
  702. | kEvent Event
  703. //------------------------------------------------------------------------------------------------------------------------
  704. void RunAction(kActor@ source, kActor@ target, const int actionID, const kVec3&in origin, const float arg1 = 0, const float arg2 = 0, const float arg3 = 0, const float arg4 = 0, const float arg5 = 0, const float arg6 = 0, const float arg7 = 0, const float arg8 = 0)
  705.     //Example from door script: Event.RunAction(self, null, ACTION_UNBLOCK, Math::vecZero);
  706.     //Example of user event/script: Event.RunAction(self, null, ACTION_USER, Math::vecZero, 1, 2, 3, 4);
  707.  
  708. //------------------------------------------------------------------------------------------------------------------------
  709. | kActorFactory ActorFactory
  710. //------------------------------------------------------------------------------------------------------------------------
  711. kActor@ Spawn(const int32 actorID, const kVec3& in origin, const float yaw, const float pitch, const float roll, const bool = true, const int16 regionIndex = -1)
  712.  
  713. //------------------------------------------------------------------------------------------------------------------------
  714. | kParticleFactory ParticleFactory
  715. //------------------------------------------------------------------------------------------------------------------------
  716. kParticle@ Spawn(const int particleID, kActor@ actor, const kVec3&in localPos, const kQuat&in rotation, const kVec3&in)
  717. kParticle@ Spawn(const kStr&in particleName, kActor@ owner, const kQuat&in rotation, const kVec3&in pos)
  718. kParticle@ Spawn(const int particleID, kActor@ owner, const kQuat&in rotation, const kVec3&in pos)
  719.  
  720. //------------------------------------------------------------------------------------------------------------------------
  721. | kWorld World
  722. //------------------------------------------------------------------------------------------------------------------------
  723. void SetGlobalAmbience(const int soundID) //sets the ambience sound effect ID
  724.  
  725. //------------------------------------------------------------------------------------------------------------------------
  726. | kPuppet
  727. //------------------------------------------------------------------------------------------------------------------------
  728. kPlayer &PlayerOwner(void)
  729. uint &PlayerFlags(void)
  730.  
  731. //------------------------------------------------------------------------------------------------------------------------
  732. | kParticle
  733. //------------------------------------------------------------------------------------------------------------------------
  734. kActor &Owner(void)
  735. kVec3 &Direction(void)
  736. const bool IsSticking(void)
  737. void Kill(void)
  738. const float LifeFrames(void)
  739. kVec3 &Velocity(void)
  740. int16 &NetID(void)
  741. const bool IsStale(void)
  742. const int ParticleType(void)
  743.  
  744. //------------------------------------------------------------------------------------------------------------------------
  745. | kWeapon : kActor
  746. //------------------------------------------------------------------------------------------------------------------------
  747. kPlayer &Owner(void)
  748. void LockControls(const bool lock)
  749. const bool ScopeReady(void)
  750. kParticle @FireProjectile(const kStr &in particlePath, const kVec3 &in localOrigin)
  751.  
  752. //------------------------------------------------------------------------------------------------------------------------
  753. | kPlayer LocalPlayer
  754. //------------------------------------------------------------------------------------------------------------------------
  755. kPlayerInventory @Inventory(void)
  756. kWeapon @WeaponActor(void)
  757. kPuppet @Actor(void)
  758. const uint16 ButtonHeldTime(const int buttonID) //returns the number of frames the button has been held down
  759. //Button IDs:
  760.     //0 = fire
  761.     //1 = jump
  762.     //2 = Forward
  763.     //3 = Backward
  764.     //4 = STRAFELEFT
  765.     //5 = STRAFERIGHT
  766.     //6 = CROUCH
  767.     //7 = AltFire (Always returns 0)
  768.     //8 = BC_SCOPEZOOMIN
  769.     //9 = BC_SCOPEZOOMOUT
  770. const uint16 Buttons(void)
  771. const int GetAltAmmo(const int weaponID)
  772. const int GetAmmo(const int weaponID)
  773. void ConsumeAltAmmo(const int amount) //reduces alt ammo by <amount> for the current equipped weapon
  774. void ConsumeAmmo(const int amount) //reduces ammo by <amount> for the current equipped weapon
  775. const int CurrentWeaponID(void)
  776. bool GiveWeapon(const int weaponID, const int ammoAmount)
  777. const bool HasWeapon(const int weaponID)
  778. const bool HasAltAmmo(const int weaponID)
  779. const bool HasAmmo(const int weaponID)
  780.  
  781. //------------------------------------------------------------------------------------------------------------------------
  782. | kActor
  783. //------------------------------------------------------------------------------------------------------------------------
  784. kVec3 &Origin(void)
  785. kAngle &Yaw(void)
  786. kAngle &Pitch(void)
  787. kAngle &Roll(void)
  788. kParticle @CastToParticle(void)
  789. kActor @CastToActor(void)
  790. bool InstanceOf(const kStr &in actorDefName)
  791. kVec3 &Scale(void)
  792. kActor @GetTarget(void) //CastToParticle to return a kParticle
  793. void SetTarget(kParticle@)
  794. void SetTarget(kActor@)
  795. kPuppet @CastToPuppet(void)
  796. int16 &NetID(void)
  797. float GetDeltaFromPoint(const kVec3&in point) //returns deltaAngle
  798. kVec3 LocalVectorToWorldSpace(const kVec3&in localVector)
  799. void Remove(void)
  800. int &TriggerMessageID(void)
  801. int &TriggerData(void)
  802. void Trigger(kActor@ triggerer) //Calls OnTrigger with the passed in actor use null if no actor
  803. int32 &TID(void) //Tag ID
  804. int &Type(void) //Actor ID
  805. float &Health(void)
  806. void PlaySound(const int soundID)
  807. void PlaySound(const kStr &in soundPath)
  808. uint32 &Flags(void) //EnumActorFlags
  809. void StopLoopingSounds(void)
  810. void StopSound(void)
  811. void PlayLoopingSound(const int soundID)
  812. void PlayLoopingSound(const kStr &in soundPath)
  813. void Mark(const bool isPersistent) //MarkPersistentBit
  814. const bool IsMarked(void)
  815. void SignalOff(void)
  816. void SignalOn(void)
  817. void AddToGallery(void) //enables viewing of the actor in the gallery? (by the actors def name?)
  818. void GenerateActors(const uint actorFlags, const uint flagSet) //flagset is 0 or 1
  819. kDictMem @Definition(void)
  820. const int GameTicks(void)
  821. const bool Deserialized(void)
  822. void RunFxEvent(const kStr &in fxEventName)
  823.     //Example: RunFxEvent("Blink").
  824. void EnableComponent(const kStr &in, const bool)
  825. void AddComponent(const kStr &in, const bool)
  826. const bool HasComponent(const kStr &in)
  827. kAnimTrackComponent @AnimTrackComponent(void)
  828. kWorldComponent @WorldComponent(void)
  829. kEnemyAIComponent @EnemyAIComponent(void)
  830. kMovementComponent @MovementComponent(void)
  831. kModeStateComponent @ModeStateComponent(void)
  832. kRenderMeshComponent @RenderMeshComponent(void)
  833. void InflictDamage(kDamageInfo &in dmgInfo)
  834. const bool IsStale(void)
  835.  
  836. //------------------------------------------------------------------------------------------------------------------------
  837. | kPlayerInventory
  838. //------------------------------------------------------------------------------------------------------------------------
  839. const int GetCount(const int itemID) //returns the amount of these items that are in the inventory
  840. const bool HasBeenPickedUpBefore(const int itemID) //returns true when you have at least one of this item in your inventory
  841. const int Take(const int itemID)
  842. const bool Give(const int itemID)
  843. void Reset(void) //clears all inventory items
  844.  
  845. //------------------------------------------------------------------------------------------------------------------------
  846. | Math
  847. //------------------------------------------------------------------------------------------------------------------------
  848. float Tan(float)
  849. float Cos(float)
  850. float Sin(float)
  851. float Sqrt(float)
  852. float ACos(float)
  853. float Fabs(float)
  854. float ATan2(float, float)
  855. float Log(float)
  856. float Floor(float)
  857. float Ceil(float)
  858. int Abs(int)
  859. float InvSqrt(float)
  860. float Rad2Deg(float rads)
  861. float Deg2Rad(float degs)
  862. float Pow(float, float)
  863. uint8 RandByte(void) //0..255
  864. int Rand(void) //0..32767
  865. int SysRand(void) //0..32767
  866. float RandFloat(void) //0..1
  867. float RandCFloat(void) //-1..1
  868. int RandMax(const int) //exclusive
  869. float RandRange(const float, const float)
  870. float IncMax(const float, const float, const float)
  871. float Accelerate(const float, const float, const float)
  872. float NLerp(const float, const float, const float)
  873. float Lerp(float start, const float end, const float time)
  874. void Clamp(float &out, const float, const float)
  875. float HermiteBlend(const float, const float, const float)
  876. float SmoothStep(const float, const float, const float)
  877. float CosArc(const float)
  878. float CosTween(const float)
  879. kVec3 vecZero
  880. float pi
  881. float Max(const float, const float)
  882. float Min(const float, const float)
  883.  
  884. //------------------------------------------------------------------------------------------------------------------------
  885. | kQuat (Same as Turok1)
  886. //------------------------------------------------------------------------------------------------------------------------
  887. void Constructor(float x, float y, float z, float w)
  888. void Constructor(float w, kVec3 &in)
  889. void Constructor(const kQuat &in)
  890. kQuat opMul(const kQuat &in)
  891. kQuat opSub(const kQuat &in)
  892. kQuat opAdd(const kQuat &in)
  893. kQuat &Normalize(void)
  894. const kVec3 &opMulAssign(const kQuat &in)
  895. kVec3 opMul(const kQuat &in)
  896. kQuat &opAssign(const kQuat &in)
  897. float w
  898.  
  899. //------------------------------------------------------------------------------------------------------------------------
  900. | kAngle (Same as Turok1)
  901. //------------------------------------------------------------------------------------------------------------------------
  902. void Constructor(float)
  903. void Constructor(const kAngle &in)
  904. kQuat ToQuat(void)
  905. const float w
  906. float Interpolate(const float, const float)
  907. float Diff(const kAngle &in)
  908. float Diff(const float)
  909. kAngle &opSubAssign(const float)
  910. kAngle opSub(const float)
  911. const kAngle &opAddAssign(const float)
  912. kAngle opAdd(const float)
  913. const kAngle &opSubAssign(kAngle &in)
  914. kAngle opSub(const kAngle &in)
  915. kAngle &opAddAssign(const kAngle &in)
  916. kAngle opAdd(const kAngle &in)
  917. float opImplConv(void)
  918. kAngle opNeg(void)
  919. kAngle &opAssign(const kAngle &in)
  920. kAngle &opAssign(const float)
  921.  
  922. //------------------------------------------------------------------------------------------------------------------------
  923. | kPlane
  924. //------------------------------------------------------------------------------------------------------------------------
  925. void Constructor(const kVec3&in, const kVec3&in)
  926. void Constructor(const kVec3&in, const kVec3&in, const kVec3&in)
  927. void Constructor(const float, const float, const float, const float)
  928. const float Dot(const kPlane&in)
  929. const float Dot(const kVec3&in)
  930. const kVec3 &Normal(void)
  931. const int PointOnSide(const kVec3&in)
  932. const bool IsFacing(const float)
  933. const float ToYaw(void)
  934. const float Distance(const kVec3&in)
  935.  
  936. //------------------------------------------------------------------------------------------------------------------------
  937. | kVec3
  938. //------------------------------------------------------------------------------------------------------------------------
  939. void Constructor(const kVec3 &in)
  940. void Constructor(float, float, float)
  941. kQuat ToQuaternion(void)
  942. kVec3 &Normalize(void)
  943. float UnitSq(void)
  944. float Unit(void)
  945. float Dot(const kVec3 &in)
  946. kVec3 Cross(const kVec3 &in)
  947. float ToYaw(void)
  948. kStr ToString(void)
  949. float DistanceSq(const kVec3 &in)
  950. const float Distance(const kVec3 &in)
  951. const kVec3 Lerp(const kVec3 &in, const float)
  952. const void Set(const float, const float, const float)
  953. void Clear(void)
  954. float ToPitch(void)
  955. kVec3 &Randomize(const float)
  956. kVec3 &Reflect(const kVec3 &in, const float)
  957. kVec3 &Project(const kVec3 &in, const float)
  958. kVec3 &Lerp(const kVec3 &in, const float)
  959. kVec3 &opAddAssign(const kVec3 &in)
  960. kVec3 opAdd(const kVec3 &in)
  961. kVec3 &QuadraticCurve(const kVec3 &in, const float, const kVec3 &in, const kVec3 &in)
  962. kVec3 &CubicCurve(const kVec3 &in, const float, const kVec3 &in)
  963. kVec3 opMul(const kVec3 &in)
  964. kVec3 &opSubAssign(const kVec3 &in)
  965. kVec3 opSub(const kVec3 &in)
  966. kVec3 opNeg(void)
  967. kVec3 opDiv(const kVec3 &in)
  968. kVec3 &opMulAssign(const float)
  969. kVec3 &opMulAssign(const kVec3 &in)
  970. kVec3 opMul(const float val)
  971. float opIndex(uint)
  972. kVec3 &opAssign(const kVec3 &in)
  973. kVec3 &opDivAssign(const kVec3 &in)
  974. kVec3 opDiv(const float val)
  975. float z
  976. float y
  977. float x
  978. float opIndex(uint)
  979.  
  980. //------------------------------------------------------------------------------------------------------------------------
  981. | kStr
  982. //------------------------------------------------------------------------------------------------------------------------
  983. void Constructor(const kStr &in)
  984. int IndexOf(const kStr &in)
  985. uint Hash(void)
  986. int Atoi(void)
  987. float Atof(void)
  988. kStr &ToUpper(void)
  989. kStr &ToLower(void)
  990. int8 opIndex(const int)
  991. kStr &opAssign(const kStr &in)
  992. kStr opAdd(const kStr &in)
  993. kStr opAdd(bool)
  994. kStr opAdd(int)
  995. kStr opAdd(float)
  996. kStr &opAddAssign(const kStr &in)
  997. kStr &opAddAssign(bool)
  998.  
  999. //------------------------------------------------------------------------------------------------------------------------
  1000. | AngelScript Arrays
  1001. | http://www.angelcode.com/angelscript/sdk/docs/manual/doc_datatypes_arrays.html
  1002. //------------------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement