Sure @J_C and thanks in advance !
Here is the lua script:
function ai_civilian_init(e)
ai_soldier_state[e] = "idle"
ModulateSpeed(e,1.0)
end
function ai_civilian_main(e)
PlayerDist = GetPlayerDistance(e)
EntObjNo = g_Entity[e]['obj']
if PlayerDist < 600 and ai_soldier_state[e] == "idle" and g_Entity[e]['plrvisible'] == 1 then
ai_soldier_state[e] = "detected"
end
if PlayerDist < 600 and ai_soldier_state[e] ~= "idle" then
RotateToPlayer(e)
if PlayerDist < 100 then
if ai_soldier_state[e]~="patrol" then
if GetAnimationFrame(e)<2981 or GetAnimationFrame(e)>3034 then
AIEntityStop(EntObjNo)
ai_soldier_state[e] = "patrol"
CharacterControlLimbo(e)
SetAnimationFrames(2981,3034)
PlayAnimation(e)
end
end
if ai_soldier_state[e]=="patrol" then
if GetAnimationFrame(e)>3010 and GetAnimationFrame(e)<3015 then
HurtPlayer(e,5)
end
if GetAnimationFrame(e)>3032 then
ai_soldier_state[e] = "roam"
SetAnimationFrames(2552,2603)
PlayAnimation(e)
end
end
else
if ai_soldier_state[e]~="roam" then
ai_soldier_state[e] = "roam"
CharacterControlUnarmed(e)
SetCharacterToRun(e)
end
AIEntityGoToPosition(EntObjNo,g_PlayerPosX,g_PlayerPosZ)
end
end
--PromptLocal(e,"Dist=" .. PlayerDist .. " State=" .. ai_soldier_state[e] .. " Vis=" .. g_Entity[e]['plrvisible'])
end
and here is the FPE:
;Saved by FPSCR Object Importer v1.000
;header
desc = Nurse
;visualinfo
textured = nurse_d2.dds
effect = effectbank\reloaded\entity_basic.fx
castshadow = 0
transparency = 0
;orientation
model = Nurse-ok.x
offx = 0
offy = 0
offz = 0
rotx = 0
roty = 0
rotz = 0
scale = 100
collisionmode = 0
defaultstatic = 0
materialindex = 0
;physics shapes
physicscount = 2
physics0 = "0,30.4070472717,69.7355651855,12.5960474014,0,0,0,0,0,0"
physics1 = "0,30.4070472717,69.7355651855,12.5960474014,0,0,0,0,0,0"
;identity details
ischaracter = 1
hasweapon =
isobjective = 0
cantakeweapon = 0
;statistics
strength = 100
explodable = 0
debrisshape = 0
;ai
aiinit = appear.lua
aimain = ai_neutral.lua
aidestroy = disappear.lua
;spawn
spawnmax = 0
spawndelay = 0
spawnqty = 0
;anim
animmax = 0
anim0 = 415,464
playanimineditor = 1
the x , dds and bmp files it's in the attachments:
Smile today, tomorrow could be worse
http://bestradiolarry.ro/fpsarea
"The best forum, game software, operating system or web platform, it's that software which can give you most of the options and speed, not just amazing graphics."