Hello folks,
I am creating a custom character with limbs detection and ragdoll.
It is working almost perfect, the problem is with scripting.
I made the character using the standard FPSC Biped, it works well, the ragdoll is working perfect, the model has custom animations for impact (shoot on leg, shoot on arm,...)
This is the character`s fpe:
;header
desc = custom_model
;ai
aiinit = appearwithheadshot.fpi
aimain = people\pace10impact.fpi
aidestroy = destroy\ragdollcorpsefade.fpi
aishoot = people\chase10.fpi
soundset = male
;spawn
spawnmax = 0
spawndelay = 0
spawnqty = 0
;orientation
model = custom_model.X
offx = 0
offy = 0
offz = 0
rotx = 0
roty = 0
rotz = 0
scale = 85
fixnewy = 180
;cone of sight
coneheight = 53
coneangle = 50
;visualinfo
textured =
effect =
castshadow = 0
;decals
decalmax = 2
decal0 = red
decal1 = blood
;identity details
strength = 100
ischaracter = 1
hasweapon = ww2\colt45
isobjective = 0
cantakeweapon = 1
;bodypartslimbinfo (1=head/2=body/3+4=armslr/5+6=legslr)
limbmax = 99
limb1 = 2
limb2 = 2
limb3 = 5
limb4 = 5
limb5 = 5
limb6 = 5
limb7 = 2
limb8 = 6
limb9 = 6
limb10 = 6
limb11 = 6
limb12 = 2
limb13 = 2
limb14 = 2
limb15 = 2
limb16 = 2
limb17 = 2
limb18 = 2
limb19 = 3
limb20 = 2
limb21 = 2
limb22 = 2
limb23 = 2
limb24 = 2
limb25 = 2
limb26 = 4
limb27 = 2
limb28 = 2
limb29 = 2
limb30 = 2
limb31 = 2
limb32 = 2
limb33 = 1
limb34 = 2
limb35 = 2
limb36 = 0
;animationinfo
animmax = 200
anim0 = 190,209
anim1 = 210,234
anim2 = 235,259
anim3 = 260,279
anim4 = 280,299
anim5 = 300,318
anim6 = 319,355
anim7 = 160,189
anim8 = 330,355
anim11 = 0,19
anim12 = 20,39
anim13 = 493,522
anim14 = 40,59
anim15 = 60,79
anim16 = 523,552
anim17 = 120,139
anim18 = 140,159
anim20 = 80,99
anim21 = 100,119
anim31 = 356,380
anim32 = 381,405
anim33 = 381,405
anim34 = 381,405
anim35 = 381,405
anim36 = 406,442
anim40 = 443,462
anim41 = 463,492
anim50 = 553,572
anim51 = 573,597
anim52 = 598,622
anim53 = 623,642
anim54 = 643,662
anim55 = 663,681
anim56 = 682,731
anim57 = 160,189
anim61 = 0,19
anim62 = 20,39
anim63 = 882,911
anim64 = 40,59
anim65 = 60,79
anim66 = 912,941
anim67 = 120,139
anim68 = 140,159
anim70 = 80,99
anim71 = 100,119
anim81 = 732,756
anim82 = 757,781
anim83 = 757,781
anim84 = 757,781
anim85 = 757,781
anim86 = 782,831
anim90 = 832,851
anim91 = 852,881
anim92 = 2498,2517
anim93 = 2518,2537
anim94 = 2538,2561
anim95 = 2562,2591
anim96 = 2592,2608
anim97 = 2609,2628
anim98 = 2629,2648
anim99 = 2649,2668
Here comes the problem:
When i use this script as main script for the character:
;Artificial Intelligence Script
;Header
desc = Pace Waypoints, If See Player, Rotate And Shoot
;Triggers
;perfect pixel colision detection
;head
:shotdamagetype=1:setframe=92,incframe=92
;body
:shotdamagetype=2:setframe=95,incframe=95
;leftarm
:shotdamagetype=3:setframe=93,incframe=93
;rightarm
:shotdamagetype=4:setframe=93,incframe=93
;leftleg
:shotdamagetype=5:setframe=94,incframe=94
;rightleg
:shotdamagetype=6:setframe=94,incframe=94
;End of Script
It works perfect. If you shoot him in arms, will play the animation for arms impact.
If you shoot him in legs, will play the animation for legs impact.
But when i use those conditions (shotdamagetype) inside the pace10 script, this way:
;Artificial Intelligence Script
;Header
desc = Pace Waypoints, If See Player, Rotate And Shoot
;Triggers
;perfect pixel colision detection
;head
:shotdamagetype=1:setframe=92,incframe=92
;body
:shotdamagetype=2:setframe=95,incframe=95
;leftarm
:shotdamagetype=3:setframe=93,incframe=93
;rightarm
:shotdamagetype=4:setframe=93,incframe=93
;leftleg
:shotdamagetype=5:setframe=94,incframe=94
;rightleg
:shotdamagetype=6:setframe=94,incframe=94
:waypointstate=0:animate=2,waypointstart
:waypointstate=3:animate=2,waypointnext
:waypointstate=4:animate=2,waypointrandom
:waypointstate=5:animate=2,waypointreverse
:nearactivatable=0:settarget,activatetarget=2,animate=1,state=0
:state=0:state=1
:state=1,plrcanbeseen:settarget,state=2
:state=1,random=20:rotateheadrandom=65
:state=1,random=60:rotatetoplr
:state=1,shotdamage=10:settarget,animate=1,rotatetotarget,resethead,state=2
:state=1,noiseheard=5:settarget,rotatetotarget,rotatetoplr
:state=2:waypointstop,rotatetoplr,state=3,shootplr
:state=3:animate=1,state=1
;End of Script
The limb detection does not work. The character behaves normal, runs, strafe, shoots, however, when i shoot at any of his limbs, the custom animations don`t work, i mean, limb detection does not work.
Can anyone help me?
Thanks
007
Goldenye 007 N64