Cog Files


Actor Reference


Actor cog script commands can be broken into two groups those that "Control" something and those that get "Information" as described below.

AiClearMode
AiFlee
AiGetMode
AiGetMovePos
AiJump
AiSetClass
AiSetFireTarget
AiSetLookFrame
AiSetLookPos
AiSetMode
AiSetMoveFrame
AiSetMovePos
AiSetMoveSpeed
AiSetMoveThing
ClearActorFlags
GetActorFlags
GetActorWeapon
GetHeadLightIntensity
GetThingHealth
HealThing
IsAiTargetInSight
SetActorExtraSpeed
SetActorFlags
SetActorWeapon
SetHeadLightIntensity


AiClearMode() Control

Clears the Ai mode flags Ai Mode Flags

Use: AiClearMode(thingref,flags int);


AiFlee() Control

Tells ai to flee from a specific location

Use: AiFlee(thing ref,vector position);


AiGetMode() Info

Gets the current ai mode flags for a thing Ai Mode Flags

Use: Int=AiGetMode(thing ref); returns int


AiGetMovePos() Info

Gets the current move position from thing

Use: vector=AiGetMovePos(thing ref); returns vector


AiJump() Control

?

?


AiSetClass() Control

Sets a thing's AI file

Use: AiSetClass(ThingRef, AIref);


AiSetFireTarget() Control

Sets the firing target for an ai

Use: AiSetFireTarget(thingref,Target thingref);


AiSetLookFrame() Control

Sets the look target frame for a thing

Use: AiSetLookFrame(thing ref,frame int);


AiSetLookPos() Control

Sets look target position for a thing

Use: AiSetLookPos(thing ref,vector);


AiSetMode() Control

Set ai mode flags Ai Mode Flags

Use: AiSetMode(thing ref,int);


AiSetMoveFrame() Control

Sets the thing move frame

Use: AiSetMoveFrame(thing ref,frame int);


AiSetMovePos() Control

Sets thing move position

Use: AiSetMovePos(thing ref,vector);


AiSetMoveSpeed() Control

Sets thing move speed

Use: AiSetMoveSpeed(thing ref,flex); 1.5,2.0 = run , 1.0 = walk


AiSetMoveThing() Control

Sets the ai move to a thing

Use: AiSetMoveThing(thing ref, chase thing);


ClearActorFlags() Control

Clears the specified actor flags of a thing. Actor Flags

Use: ClearActorFlags(thing,flag); Does not modify flags not specified.


GetActorFlags() Info

Retrieves the actor flags of a thing. Actor Flags

Use: Flags = GetActorFlags(thing); Returns an Integer representing the flag(s)


GetActorWeapon() Info

Retrieves the actors weapon .

Use: HasWeapon = GetActorWeapon(thing,bin); Returns "-1" if actor has no weapon.


GetHeadLightIntensity() Info

Retrieves the Fieldlight intensity

Use: Light = GetHeadLightIntensity(Thing); Returns an Integer representing Light Intensity


GetThingHealth() Info

Retrieves the thing health.

Use: Health = GetThingHealth(Thing); Returns a flex representing thing health


HealThing()

Heals a thing health.

Use: HealThing(thing,flex);


IsAiTargetInSight() Info

?

?


SetActorExtraSpeed() Control

Sets the extra speed of actor.

Use: SetActorExtraSpeed(thing,flex);


SetActorFlags() Control

Sets the actor flags of a thing. Actor Flags

Use: SetActorFlags(thing,flag); Only sets the specified flags.


SetActorWeapon() Control

It`s used to remove a weapon from an actor not a player. Not sure if it can be used to give a weapon .

Use: SetActorWeapon(thing, bin, template); bin must be 1 (actors only have 1 bin) ,template = -1 removes the weapon template.


SetHeadLightIntensity()

Sets the Fieldlight intensity

Use: SetHeadLightIntensity(Thing,flex); not used in cogs,so assuming params will be this.