Hi, thanks for spreading the news of the pack. I'm still working on updating the third person (it was done mainly by Ched80 though, so most of the credits go to him). I've made it look a lot better, here's the latest script:
(I made a fix for diagonal movement, but I seem to have lost the changes I made)
Ciao, grazie per diffondere la notizia del pacco. Sto ancora lavorando sull'aggiornamento terza persona (è stato fatto soprattutto da Ched80 però, quindi la maggior parte dei crediti vanno a lui). Ho fatto sembrare molto meglio, ecco l'ultimo script:
(Ho fatto una correzione per il movimento diagonale, ma mi sembra di aver perso le modifiche che ho fatto)
Codice:
;Artificial Intelligence Script
;Header
desc = Third Person v2
;Credit to Ched80!
;Triggers
;Variables
:State=0:DimVar=Crouch,SetVar=Crouch 0
:State=0:DimVar=PlrXAngle,SetVar=PlrXAngle $EAX
:State=0:DimVar=PlrYAngle,SetVar=PlrYAngle $EAY
:State=0:DimVar=PlrPosX,SetVar=PlrPosX 0
:State=0:DimVar=PlrPosZ,SetVar=PlrPosZ 0
:State=0:DimVar=PlrAngle,DimVar=LastAngle
:State=0:DimVar=CamDist,SetVar=CamDist -30
:State=0:DimVar=CamDistTarget,SetVar=CamDistTarget -30
:State=0:DimVar=CastBack,SetVar=CastBack -30
:State=0:DimVar=AgainstWall,SetVar=AgainstWall 0
:State=0:DimVar=CamFOVOffset,SetVar=CamFOVOffset 0
:State=0:DimVar=CamFOVOffsetTarget,SetVar=CamFOVOffsetTarget 0
:State=0:DimVar=CamYOffset,SetVar=CamYOffset 7.5
:State=0:DimVar=CamYOffsetTarget,SetVar=CamYOffsetTarget 7.5
:State=0:DimVar=Strafe,SetVar=Strafe 0
:State=0:DimVar=PPX,DimVar=PPY,DimVar=PPZ
:State=0:DimVar=CamSide,SetVar=CamSide 30
;Other
:State=0:SetBulletCol=0,JumpKey=0,PeekKey=0,CrouchKey=0,WalkKeys=0
;Camera
:State=0:PlrCamOffsetOn=1,State=1
;Main
:VarEqual=AgainstWall 0:SetVar=CamDistTarget -30
::SetVar=PPX $EPX,SetVar=PPY $EPY,SetVar=PPZ $EPZ
:VarLess=CamDist %CamDistTarget:AddVar=CamDist 0.75
:VarGreater=CamDist %CamDistTarget:SubVar=CamDist 0.75
:VarEqual=AgainstWall 0:SetVar=CastBack %CamDist,MulVar=CastBack -1.4
:VarEqual=AgainstWall 1:SetVar=AgainstWall 0
:State=1:SetVar=$EAY $CAY,SetVar=$CAY $EAY,RotateIY=0
:State=2:PlrPointAtObject=0
:State=1:SetVar=PlrPosX $EAY,SetVar=PlrPosZ $EAY,SubVar=PlrPosX %CamSide,SubVar=PlrPosZ %CamSide,Sin=PlrPosX,Cos=PlrPosZ
:RayCastBack=0 %CastBack:SetVar=AgainstWall 1
:VarEqual=AgainstWall 1:DivVar=CamDist 2,SetVar=CamDistTarget %CamDist
:State=1:MulVar=PlrPosX %CamDist,MulVar=PlrPosZ %CamDist
::PlrCamOffSetX=%PlrPosX,PlrCamOffSetY=%CamYOffset,PlrCamOffSetZ=%PlrPosZ
::SetVar=$CPX $EPX,SetVar=$CPZ $EPZ,SetVar=$EPY $CPY,SubVar=$EPY %CamYOffsetTarget
;Animations
:State=1,VarEqual=Crouch 0,keypressed=17 0,keypressed=30 0,keypressed=31 0,keypressed=32 0:Animate=1
:State=1,VarEqual=Crouch 1,keypressed=17 0,keypressed=30 0,keypressed=31 0,keypressed=32 0:Animate=31
;Walk Forward
:state=1,varequal=Crouch 0,plrnotrunning,keypressed=17 1,keypressed=30 0,keypressed=31 0,keypressed=32 0:animationnormal,animate=2,movefore=1
:state=1,varequal=Crouch 1,plrnotrunning,keypressed=17 1,keypressed=30 0,keypressed=31 0,keypressed=32 0:animationnormal,animate=32,movefore=1
;Run Forward
:state=1,varequal=Crouch 0,plrrunning,keypressed=17 1,keypressed=30 0,keypressed=31 0,keypressed=32 0:animationnormal,animate=5,movefore=5
:state=1,varequal=Crouch 1,plrrunning,keypressed=17 1,keypressed=30 0,keypressed=31 0,keypressed=32 0:animationnormal,animate=35,movefore=5
;Walk Back
:state=1,varequal=Crouch 0,plrnotrunning,keypressed=17 0,keypressed=30 0,keypressed=31 1,keypressed=32 0:setvar=CamDistTarget -20,setvar=CFOTarget 0,animationreverse,animate=2,strafe=180,rotateiy=0
:state=1,varequal=Crouch 1,plrnotrunning,keypressed=17 0,keypressed=30 0,keypressed=31 1,keypressed=32 0:setvar=CamDistTarget -20,setvar=CFOTarget 0,animationreverse,animate=32,strafe=180,rotateiy=0
;Run Back
:state=1,varequal=Crouch 0,plrrunning,keypressed=17 0,keypressed=30 0,keypressed=31 1,keypressed=32 0:setvar=CamDistTarget -10,setvar=CFOTarget 0,animationreverse,animate=5,strafe=180,rotateiy=0
:state=1,varequal=Crouch 1,plrrunning,keypressed=17 0,keypressed=30 0,keypressed=31 1,keypressed=32 0:setvar=CamDistTarget -10,setvar=CFOTarget 0,animationreverse,animate=35,strafe=180,rotateiy=0
;Strafe Left
:state=1,varequal=Crouch 0,keypressed=17 0,keypressed=30 1,keypressed=31 0,keypressed=32 0:setvar=CamDistTarget -25,setvar=CFOTarget 0,animationnormal,animate=3,strafe=-90,rotateiy=0
:state=1,varequal=Crouch 1,keypressed=17 0,keypressed=30 1,keypressed=31 0,keypressed=32 0:setvar=CamDistTarget -25,setvar=CFOTarget 0,animationnormal,animate=33,strafe=-90,rotateiy=0
;Strafe Right
:state=1,varequal=Crouch 0,keypressed=17 0,keypressed=30 0,keypressed=31 0,keypressed=32 1:setvar=CamDistTarget -25,setvar=CFOTarget 0,animationnormal,animate=4,strafe=90,rotateiy=0
:state=1,varequal=Crouch 1,keypressed=17 0,keypressed=30 0,keypressed=31 0,keypressed=32 1:setvar=CamDistTarget -25,setvar=CFOTarget 0,animationnormal,animate=34,strafe=90,rotateiy=0
;Strafe Left + Strafe Right (Bug Fix)
:state=1,varequal=Crouch 0,keypressed=17 0,keypressed=30 1,keypressed=31 0,keypressed=32 1:setvar=CamDistTarget -25,setvar=CFOTarget 0,animationnormal,animate=1,strafe=0,rotateiy=0
:state=1,varequal=Crouch 1,keypressed=17 0,keypressed=30 1,keypressed=31 0,keypressed=32 1:setvar=CamDistTarget -25,setvar=CFOTarget 0,animationnormal,animate=31,strafe=0,rotateiy=0
;Walk\Run Forward + Walk\Run Back (Bug Fix)
:state=1,varequal=Crouch 0,keypressed=17 1,keypressed=30 0,keypressed=31 1,keypressed=32 0:setvar=CamDistTarget -25,setvar=CFOTarget 0,animationnormal,animate=1,strafe=0,rotateiy=0
:state=1,varequal=Crouch 1,keypressed=17 1,keypressed=30 0,keypressed=31 1,keypressed=32 0:setvar=CamDistTarget -25,setvar=CFOTarget 0,animationnormal,animate=31,strafe=0,rotateiy=0
;Walk\Run Forward + Walk\Run Back + Strafe Left + Strafe Right (Bug Fix)
:state=1,varequal=Crouch 0,keypressed=17 1,keypressed=30 1,keypressed=31 1,keypressed=32 1:setvar=CamDistTarget -25,setvar=CFOTarget 0,animationnormal,animate=1,strafe=0,rotateiy=0
:state=1,varequal=Crouch 1,keypressed=17 1,keypressed=30 1,keypressed=31 1,keypressed=32 1:setvar=CamDistTarget -25,setvar=CFOTarget 0,animationnormal,animate=31,strafe=0,rotateiy=0
;Strafe Left + Walk Forward
:state=1,varequal=Crouch 0,plrnotrunning,keypressed=17 1,keypressed=30 1,keypressed=31 0,keypressed=32 0:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=2,movefore=1,strafe=-45
:state=1,varequal=Crouch 1,plrnotrunning,keypressed=17 1,keypressed=30 1,keypressed=31 0,keypressed=32 0:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=32,movefore=1,strafe=-45
;Strafe Left + Run Forward
:state=1,varequal=Crouch 0,plrrunning,keypressed=17 1,keypressed=30 1,keypressed=31 0,keypressed=32 0:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=5,runfore=1,strafe=-45
:state=1,varequal=Crouch 1,plrrunning,keypressed=17 1,keypressed=30 1,keypressed=31 0,keypressed=32 0:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=35,runfore=1,strafe=-45
;Strafe Right + Walk Forward
:state=1,varequal=Crouch 0,plrnotrunning,keypressed=17 1,keypressed=30 0,keypressed=31 0,keypressed=32 1:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=2,movefore=1,strafe=45
:state=1,varequal=Crouch 1,plrnotrunning,keypressed=17 1,keypressed=30 0,keypressed=31 0,keypressed=32 1:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=32,movefore=1,strafe=45
;Strafe Right + Run Forward
:state=1,varequal=Crouch 0,plrrunning,keypressed=17 1,keypressed=30 0,keypressed=31 0,keypressed=32 1:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=5,runfore=1,strafe=45
:state=1,varequal=Crouch 1,plrrunning,keypressed=17 1,keypressed=30 0,keypressed=31 0,keypressed=32 1:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=35,runfore=1,strafe=45
;Strafe Left + Walk Back
:state=1,varequal=Crouch 0,plrnotrunning,keypressed=17 0,keypressed=30 1,keypressed=31 1,keypressed=32 0:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=2,movefore=-1,strafe=45
:state=1,varequal=Crouch 1,plrnotrunning,keypressed=17 0,keypressed=30 1,keypressed=31 1,keypressed=32 0:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=32,movefore=-1,strafe=45
;Strafe Left + Run Back
:state=1,varequal=Crouch 0,plrrunning,keypressed=17 0,keypressed=30 1,keypressed=31 1,keypressed=32 0:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=5,runfore=-1,strafe=45
:state=1,varequal=Crouch 1,plrrunning,keypressed=17 0,keypressed=30 1,keypressed=31 1,keypressed=32 0:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=35,runfore=-1,strafe=45
;Strafe Right + Walk Back
:state=1,varequal=Crouch 0,plrnotrunning,keypressed=17 0,keypressed=30 0,keypressed=31 1,keypressed=32 1:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=2,movefore=-1,strafe=-45
:state=1,varequal=Crouch 1,plrnotrunning,keypressed=17 0,keypressed=30 0,keypressed=31 1,keypressed=32 1:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=32,movefore=-1,strafe=-45
;Strafe Right + Run Back
:state=1,varequal=Crouch 0,plrrunning,keypressed=17 0,keypressed=30 0,keypressed=31 1,keypressed=32 1:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=5,runfore=-1,strafe=-45
:state=1,varequal=Crouch 1,plrrunning,keypressed=17 0,keypressed=30 0,keypressed=31 1,keypressed=32 1:setvar=CamDistTarget -30,setvar=CFOTarget 0,animationnormal,animate=35,runfore=-1,strafe=-45
;End of Script