how to add enemy

Topics regarding Scripting with Reality Factory
Post Reply
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

how to add enemy

Post by darksmaster923 »

the manual doesnt say anyhting about putting them in level
Herp derp.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Enemies and other non-player-controlled characters are done with an entity called 'Pawn'.
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.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

what about the model
Herp derp.
User avatar
jonas
Posts: 779
Joined: Tue Jul 05, 2005 5:43 pm
Location: Texas, USA
Contact:

Post by jonas »

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]
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
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

how to make virgil enemy
Herp derp.
Post Reply