Cog Files


Thing Reference

Things can be a lot of stuff in JK, player,pickups,actors,etc. These are the verbs that work with them.

jkClearFlags
jkGetFlags
jkSetFlags
AddThingVel
AttachThingtosurf
AttachThingtoThing
AttachThingtoThingex
CaptureThing
ClearExplosionFlags
ClearItemFlags
ClearParticleFlags
ClearPhysicsFlags
ClearThingAttachFlags
ClearThingFlags
ClearTypeFlags
ClearWeaponFlags
CreateThing
CreateThingatPos
CreateThingatPosnr
CreateThingnr
DamageThing
DestroyThing
DetachThing
GetCollideType
GetCurFrame
GetExplosionFlags
GetGoalFrame
GetItemFlags
GetParticleFlags
GetParticleGrowthSpeed
GetParticleSize
GetParticleTimeOutRate
GetPhysicsFlags
GetThingAttachFlags
GetThingCaptureCog
GetThingClassCog
GetThingCollideSize
GetThingCurGeoMode
GetThingCurLightMode
GetThingCurTexMode
GetThingFireOffset
GetThingFlags
GetThingGeoMode
GetThinglight
GetThingLightMode
GetThingLVec
GetThingMass
GetThingModel
GetThingMoveSize
GetThingParent
GetThingPos
GetThingRespawn
GetThingRotVel
GetThingRVec
GetThingSector
GetThingSignature
GetThingTemplate
GetThingTexMode
GetThingThrust
GetThingType
GetThingUserData
GetThingUVec
GetThingVel
GetTypeFlags
GetWeaponFlags
IsThingCrouching
IsThingMoving
IsThingVisible
JumpToFrame
MoveToFrame
PathMovePause
PathMoveResume
ReleaseThing
RotatePivot
SetCollideType
SetExplosionFlags
SetItemFlags
SetParticleFlags
SetParticleGrowthSpeed
SetParticleSize
SetParticleTimeOutRate
SetPhysicsFlags
SetThingAttachFlags
SetThingCaptureCog
SetThingClassCog
SetThingCollideSize
SetThingCurGeoMode
SetThingCurLightMode
SetThingCurTexMode
SetThingFireOffset
SetThingFlags
SetThingGeoMode
SetThingHealth
SetThingLight
SetThingLightMode
SetThingLook
SetThingMass
SetThingModel
SetThingMoveSize
SetThingPos
SetThingPulse
SetThingRotVel
SetThingTexMode
SetThingThrust
SetThingTimer
SetThingType
SetThingUserData
SetThingVel
SetTypeFlags
SetWeaponFlags
SkipToFrame
StopThing
TeleportThing
WaitForStop


jkClearFlags() Control

Clears the specified jk flags. JK Flags

Use: jkClearFlags(thing,flags);


jkGetFlags() Info

Gets the jk flags. JK Flags

Use: flags = jkGetFlags(thing); returns set flags


jkSetFlags() Control

Sets the specified jk flags. JK Flags

Use: jkSetFlags(thing,flags);


AddThingVel()

?

? not used


AttachThingtosurf()

?

? not used


AttachThingtoThing() Control

Attaches a thing to a thing.

Use: AttachThingtoThing(thing1,thing2);


AttachThingtoThingEx() Control

Attaches thing to thing with an optional flag. Attach Flags

Use: AttachThingtoThingEx(thing1,thing2,flag);


CaptureThing() Control

Redirects created thing messages to calling cog.

Use: CaptureThing(thing); Used in conjunction with ReleaseThing


ClearExplosionFlags()

Clears the specified explosion flags.

? not used


ClearItemFlags() Control

Clears the specified item Flags. Item Flags

Use: ClearItemFlags(flag); not used ,not sure


ClearParticleFlags()

?

? Not used


ClearPhysicsFlags() Control

Clears specified physics flags. Physics Flags

Use: ClearPhysicsFlags(thing,flags);


ClearThingAttachFlags() Control

Clears specified attach flags. Attach Flags

Use: ClearThingAttachFlags(thing,flags);


ClearThingFlags() Control

Clears specified Thing Flags Thing Flags

Use: ClearThingFlags(thing,flags);


ClearTypeFlags()

?

? Not used


ClearWeaponFlags() Control

Clears specified weapon flags. Weapon Flags

Use: ClearWeaponFlags(thing,flag);


CreateThing() Control

Creates a thing.

Use: CreateThing(thing template,thing position);


CreateThingatPos() Control

Create a thing at specified position

Use: CreateThingatPos(thing template,sector,thing position,pyr); pyr = pitch ,roll,yaw (vector)


CreateThingatPosnr() Control

Create a thing at specified position

Use: CreateThingatPosNr(thing template,sector,thing position,pyr); pyr = pitch ,roll,yaw (vector)


CreateThingnr() Control

Create thing.

Use: CreateThingnr(thing template,?)


DamageThing() Control

Damages a thing.

Use: damage = DamageThing(thing,flex damage,flag,damage causething); returns amount of damage taken


DestroyThing() Control

Removes a thing from game.

Use: DestroyThing(thing);


DetachThing() Control

Detach a thing from a surface or another thing.

Use: DetachThing(Thing);


GetCollideType() Info

Gets the Collide type flags . Collide Type Flags

Use: type = GetCollideType(thing); returns int ,not used in cogs


GetCurFrame() Info

Gets the current Frame of a moving thing.

Use: frame = GetCurFrame(thing); returns int


GetExplosionFlags()

?

? not used


GetGoalFrame()

?

?


GetItemFlags() Control

Gets the item Flags. Item Flags

Use: GetItemFlags(thing);


GetParticleFlags() Info

Gets the thing particle flags

Use: Int = GetParticleFlags(thing); returns int ,Not used in cogs


GetParticleGrowthSpeed() Info

Gets the particle thing growth speed.

Use: flex = GetParticleGrowthSpeed(thing); returns flex ,not used in cogs , not sure


GetParticleSize()

?

? Not used in cogs


GetParticleTimeOutRate()

?

? Not used in cogs


GetPhysicsFlags() Control

Gets thing physics flags. Physics Flags

Use: flag = GetPhysicsFlags(thing); returns int


GetThingAttachFlags()

Gets thing attach flags. Attach Flags

Use: flag = GetThingAttachFlags(thing); returns int


GetThingCaptureCog()

?

? Not used


GetThingClassCog() Info

Gets the cog of thing

Use: cog = GetThingClassCog(thing);


GetThingCollideSize()

?

? Not used


GetThingCurGeoMode() Info

Gets the thing current geometry mode . Geomerty Mode Flags

Use: Flags = GetThingCurGeoMode(thing); returns int


GetThingCurLightMode() Info

?

? Not used.


GetThingCurTexMode()

?

? not used


GetThingFireOffset()

?

? not used


GetThingFlags() Info

Gets Thing Flags Thing Flags

Use: flag = GetThingFlags(thing); returns int representing flags


GetThingGeoMode() Info

Gets the thing geometry mode . Geomerty Mode Flags

Use: Flags = GetThingCurGeoMode(thing); returns int


GetThinglight() Info

Gets the thing light value.

Use: light = GetThinglight(thing);


GetThingLightMode()

?

? not used


GetThingLVec() Info

Gets the vector thing is looking at.

Use: vector = GetThingLVec(thing); returns vector


GetThingMass() Info

Gets the Mass of a thing.

Use: mass = GetThingMass(thing); returns flex


GetThingModel() Info

Gets the thing 3do.

Use: Looks = GetThingModel(thing); returns a model


GetThingMoveSize()

?

? Not used in cogs


GetThingParent() Info

Gets the parent thing of a thing

Use: thing = GetThingParent(thing);returns a thing


GetThingPos() Info

Gets the Position of a thing

Use: vector = GetThingPos(thing); returns a vector


GetThingRespawn () Info

?

? Not used in cogs


GetThingRotVel() Info

?

? Not used in cogs


GetThingRVec() Info

?

? Not used in cogs


GetThingSector() Info

Gets the thing sector.

Use: sector = GetThingSector(thing); returns sector reference


GetThingSignature() Info

Gets the signature of thing (unique thing number)

Use: Int = GetThingSignature(thing); returns an int


GetThingTemplate() Info

Gets the thing template. JKL Section: TEMPLATES

Use: template = GetThingTemplate(thing); returns a template


GetThingTexMode() Info

?

? Not used in cogs


GetThingThrust() Info

Gets the thing thrust (velocity)

Use: vector = GetThingThrust(thing); returns vector


GetThingType() Info

Gets the thing type. Thing Types

Use: int = GetThingType(thing); returns int


GetThingUserData()

?

?


GetThingUVec()

Gets the thing up vector.

? Not used in cogs


GetThingVel() Info

Gets the thing velocity.

Use: vector = GetThingVel(thing); returns a vector


GetTypeFlags()

?

? Not used


GetWeaponFlags() Info

Get thing weapon flags. weapon Flags

Use: flag = GetWeaponFlags(thing); returns int


IsThingCrouching()

?

? Not used in cogs


IsThingMoving() Info

Is the thing moving .

Use: Int = IsThingMoving(Thing); retuns 0 if not moving , non 0 if moving


IsThingVisible() Info

Checks to see if thing is visible

User: int = IsThingVisible(thing); returns 0 if not visible.


JumpToFrame() Control

jumps an object to one of its frames

Use: JumptoFrame(thing,int frame,sector);


MoveToFrame() Control

moves an object to one of its frames

Use: MoveToFrame(thing,int frame,flex speed);


PathMovePause()

?

?


PathMoveResume()

?

?


ReleaseThing()

Releases thing from use (the calling cog is no longer called). Used in conjunction with CaptureThing();

Use: ReleaseThing(ThingRef);


RotatePivot()

Rotates the thing specified by RotThing in a time (in seconds) given in RotTime. The center of rotation is specified by the X/Y/Z part of the frame with number RotFrame of the thing. The PCH/YAW/ROL part of that frame defines direction and angle of rotation. A negative value in RotTime inverses the direction of rotation.

Use: RotatePivot(thing RotThing, int RotFrame, flex RotTime);


SetCollideType()

Sets the specified Collide type flags . Collide Type Flags

Use: GetCollideType(thing,flag);


SetExplosionFlags()

?

? not used


SetItemFlags() Control

Sets the specified item Flags. Item Flags

Use: SetItemFlags(thing,flag); not used ,not sure


SetParticleFlags() Control

?

? Not used in cogs


SetParticleGrowthSpeed() Control

Sets the particle Growth speed .

Use: SetParticleGrowthSpeed(thing,flex);


SetParticleSize()

?

? not used in cogs


SetParticleTimeOutRate()

?

? Not used in cogs


SetPhysicsFlags() Control

Sets specified physics flags. Physics Flags

Use: SetPhysicsFlags(thing,flags);


SetThingAttachFlags() Control

Sets specified attach flags. Attach Flags

Use: SetThingAttachFlags(thing,flags);


SetThingCaptureCog()

?

?


SetThingClassCog()

?

?


SetThingCollideSize()

?

? Not used


SetThingCurGeoMode() Control

Sets the thing current geometry mode . Geometry Mode Flags

Use: SetThingCurGeoMode(thing,mode);


SetThingCurLightMode()

?

? Not used


SetThingCurTexMode()

?

? NOt used


SetThingFireOffset() Control

Sets a fire offset for a thing.

Use: SetThingfireOffset(thing,vector);


SetThingFlags() Control

Sets specified Thing Flags Thing Flags

Use: SetThingFlags(thing,flags);


SetThingGeoMode() Control

Sets the specified thing geometry mode flags. Geometry Mode Flags

Use: SetThingGeoMode(thing,flag);


SetThingHealth() Control

Sets the things health.

Use: SetThingHealth(thing,Int); Player max=100


SetThingLight() Control

Sets a thing light value.

Use: SetThingLight(thing,int);


SetThingLightMode()

?

? not used


SetThingLook() Control

Sets the look vector of a thing.

Use: SetThingLook(thing,vector);


SetThingMass() Control

Sets the thing Mass.

Use: SetThingMass(thing,flex);


SetThingModel() Control

Set Thing model.

Use: SetThingModel(thing,model);


SetThingMoveSize()

?

? Not used in cogs


SetThingPos() Control

Sets the things position

Use: SetThingPos(thing,vector);


SetThingPulse()

?

?


SetThingRotVel() Control

Sets thing rotation velocity

Use: SetThingRotVel(thing,vector);


SetThingTexMode() Control

?

? NOt Used


SetThingThrust()

?

? Not Used


SetThingTimer()

?

?


SetThingType()

?

? NOt Used


SetThingUserData()

Sets a things User Data (health)

use: SetThingUserData(thing, intHealth);


SetThingVel() Control

Sets a things velocity

Use: SetThingVel(thing,vector);


SetTypeFlags()

?

? Not Used


SetWeaponFlags() Control

Sets specified weapon flags. Weapon Flags

Use: SetWeaponFlags(thing,flag);


SkipToFrame() Control

Skips an object to one of its frames

Use: SkipToFrame(thing,int frame,speed int);


StopThing() Control

Stops a thing movement.

Use: StopThing(thing);


TeleportThing() Control

teleports a thing to another things location

Use: TeleportThing(thing,thing);


WaitForStop() Control

Waits for a thing to stop before continuing

Use: WaitForStop(thing);