Hello!
I am new to RF and its scripting language. What scripting knowledge I have is in flash and actionscripting. I have created an enemey pawn and am using the genericmelee script. Problem is the only weapon that will kill my pawn is the gernade launcher. No other weapons seem to affect the pawn. Is there some place that I must define what weapons will damage the pawn?
pawn death
- QuestOfDreams
- Site Admin
- Posts: 1525
- Joined: Sun Jul 03, 2005 11:12 pm
- Location: Austria
- Contact:
In this script the pawn uses health as its health attribute. The attribute that is damaged by a weapon is set in the weapon.ini file (located in the install folder). Most of the weapons have this attribute set to enemy_health (since the player's health attribute is also health he could damage himself otherwise). Either change health to enemy_health in the pawn script or the attribute in the weapon.ini file from enemy_health to health.
- creekmonkey
- Posts: 116
- Joined: Tue Oct 23, 2007 2:55 pm
Maybe you changed the damage attribute too see below how it should be.
{
//Script for Ben
// Perfect AI
// by Peter Coleman
// Modified by Bernard Parkin 2006
// monster will melee if close enough
// Changes to ai-run and Check-Any-Attack
TRIGGER_NAME [wsword] //Add name of the trigger for attribute
COORDX [0] // For storing X position of THIS pawn at death
COORDY [0] // For storing Y position of THIS pawn at death
COORDZ [0] // For storing Z position of THIS pawn at death
MAXPOINTS [27] //Number of Scriptpoints in level for THIS pawn
SCALE [1] // scale of actor
GROUP [soldier] // name of monster group
BOXWIDTH [25] // width and depth of bounding box
HOSTILEPLAYER [true] // hostile to player
HOSTILEDIFFERENT [false] // hostile to different Pawn group
HOSTILESAME [false] // hostile to same Pawn group
HEALTHATTRIBUTE [enemy_health] // name of health attribute HEALTH [50] // initial amount of health
SIGHTDIST [200] // max distance monster can see at idle
ALERTSIGHTDIST [150] // max distance monster can see when alert
FOV [160] // field of view in degrees
ATTACKFOV [360] // attacking field of view
YAWSPEED [360] // speed of rotation in deg/sec
DAMAGEATTRIBUTE [health] // attribute damaged by attack ALERTTRIGGER [AlertG] // name of alert trigger
- creekmonkey
- Posts: 116
- Joined: Tue Oct 23, 2007 2:55 pm