Page 1 of 1

pawn death

Posted: Tue Oct 23, 2007 3:01 pm
by creekmonkey
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?

Posted: Wed Oct 24, 2007 9:19 pm
by QuestOfDreams
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.

Posted: Thu Oct 25, 2007 3:12 am
by creekmonkey
Thanks QOD!
That did the trick!

Posted: Thu Oct 25, 2007 11:48 pm
by creekmonkey
Well I thought it did the trick.
Ater I changed the attribute from health to enemy_health I am able to kill the pawn. But the pawn can not kill me?

Posted: Fri Oct 26, 2007 11:52 am
by bernie
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

Posted: Fri Oct 26, 2007 1:38 pm
by creekmonkey
Thanks Bernie, that was it, I had actually already found the problem after hours of trial and error.