how to add enemy
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
Enemies and other non-player-controlled characters are done with an entity called 'Pawn'.
From the docs:
From the docs:
The Pawn entity is used to make scriptable friendly nonplayer characters. They work in conjunction with the ScriptPoint entity, which provides paths for the Pawn to travel on.
The fields for the Pawn entity are:
Angle - direction pawn will face when spawned
ChangeMaterial - Name of section containing material change info.
ConvOrder - name of conversation run at the start of a conversation
ConvScriptName - name of script file used for conversations
HideFromRadar - If true then does not show on radar
PawnType - name of the pawn type as defined in Pawn.ini
ScriptName - name of the script file used by this pawn
SpawnOrder - name of the Script Order run at spawn time
SpawnPoint - name of a ScriptPoint associated with this pawn
SpawnTrigger - trigger name used to spawn this entity
szEntityName - Name of this entity
Pain is only psychological.
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
you define it in pawn.ini
add a new entry something like this.
[Virgil]
actorname = Virgil_red.act
actorrotation = -90 180 0
actorscale = 1
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = true
boundingboxanimation = Idle
shadowsize = 30
and in the Pawn type in the entity field you put the name you define with in the [ ] in this case you would put [Virgil]
add a new entry something like this.
[Virgil]
actorname = Virgil_red.act
actorrotation = -90 180 0
actorscale = 1
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = true
boundingboxanimation = Idle
shadowsize = 30
and in the Pawn type in the entity field you put the name you define with in the [ ] in this case you would put [Virgil]
Jonas
Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better. - John Carmack
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA