Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Numerics;
- using System.Threading.Tasks;
- public class SDZ_MurfyAOJ: Perso
- {
- public byte DsgVar_0;
- public Text[] DsgVar_1;
- public int[] DsgVar_2;
- public int DsgVar_3;
- public Text DsgVar_4;
- public int DsgVar_5;
- public int DsgVar_6;
- public WayPoint DsgVar_7;
- public WayPoint DsgVar_8;
- public int DsgVar_9;
- public float DsgVar_10;
- public byte DsgVar_11;
- public byte DsgVar_12;
- public Vector3[] DsgVar_13;
- public byte DsgVar_14;
- public Vector3[] DsgVar_15;
- public byte DsgVar_16;
- public Vector3[] DsgVar_17;
- public Perso DsgVar_18;
- public int DsgVar_19;
- public WayPoint DsgVar_20;
- public int DsgVar_21;
- public Vector3 DsgVar_22;
- public Vector3 DsgVar_23;
- public Vector3 DsgVar_24;
- public Vector3 DsgVar_25;
- public Vector3 DsgVar_26;
- public Vector3 DsgVar_27;
- public Vector3 DsgVar_28;
- public float DsgVar_29;
- public int DsgVar_30;
- public Perso DsgVar_31;
- public int DsgVar_32;
- public bool DsgVar_33;
- public byte DsgVar_34;
- public int DsgVar_35;
- public int DsgVar_36;
- public int DsgVar_37;
- public Vector3 DsgVar_38;
- public Vector3 DsgVar_39;
- public Vector3 DsgVar_40;
- public Vector3 DsgVar_41;
- private async Task SDZ_AOJ_0_Init()
- {
- if (((DsgVar_19 != 0) && ACT_GetBooleanInArray(((GlobalActorModel)Refs.Perso["global"]).DsgVar_42, DsgVar_19)))
- {
- DsgVar_33 = 0;
- }
- DsgVar_41 = new Vector3(4f,80f,0f);
- DsgVar_22 = Position;
- if (DsgVar_33)
- {
- DsgVar_34 = 1;
- DsgVar_40 = new Vector3(140f,843f,16f);
- DsgVar_38 = new Vector3(14f,80.6f,0f);
- DsgVar_39 = new Vector3(94f,92.4f,0f);
- Proc_ChangeMyComportAndMyReflex(SDZ_AOJ_1_Attente, SDZ_AOJ_3_NoReflex);
- }
- else
- {
- DsgVar_40 = new Vector3(140f,(870-(27*(DsgVar_5-1))),16);
- DsgVar_38 = new Vector3(14f,(86-(2.7f*DsgVar_5)),0);
- DsgVar_39 = new Vector3(94f,(87+(2.7f*DsgVar_5)),0);
- Proc_ChangeMyComportAndMyReflex(SDZ_AOJ_5_Resume, SDZ_AOJ_3_NoReflex);
- }
- }
- private async Task SDZ_AOJ_1_Attente()
- {
- if (globalRandomizer%16==0 && (Cond_IsValidObject(DsgVar_18)))
- {
- if (!(((Refs.AIModel["SDZ_MurfyAOJ"])(DsgVar_18)).DsgVar_33))
- {
- DsgVar_33 = 0;
- DsgVar_18 = Nobody;
- Proc_ChangeMyComport(SDZ_AOJ_0_Init);
- }
- }
- DsgVar_18 = Nobody;
- if (globalRandomizer%4==0 && (((Func_DistanceToPerso(((YLT_RaymanModel)Refs.Perso["Rayman"])) < DsgVar_3) && ((YLT_RaymanModel)Refs.Perso["Rayman"]).Cond_CollideWithGround())))
- {
- ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_16 = 0;
- ((YAM_GenMenuMap)Refs.Perso["YAM_GenMenuMap_I1"]).Proc_ChangeOneCustomBit(29, 1);
- ((GlobalActorModel)Refs.Perso["global"]).DsgVar_21 = 0;
- ((GlobalActorModel)Refs.Perso["global"]).DsgVar_15 = 1;
- if (Cond_IsCustomBitSet(29))
- {
- if ((DsgVar_11 == 1))
- {
- if (fn_p_stNullVector(fn_p_stGetCollision(((YLT_RaymanModel)Refs.Perso["Rayman"]).Position, new Vector3(-3.5f,-0.2f,2.5f), 0)))
- {
- DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+new Vector3(-1f,1f,0f));
- DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+new Vector3(-3.5f,-0.2f,2.5f));
- }
- else
- {
- DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+new Vector3(1f,1f,0f));
- DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+new Vector3(3.5f,-0.2f,2.5f));
- }
- }
- else
- {
- if ((DsgVar_11 == 2))
- {
- if ((fn_p_stGetCollision(((YLT_RaymanModel)Refs.Perso["Rayman"]).Position, new Vector3(3.5f,-0.2f,2.5f), 0) == new Vector3(0f,0f,0f)))
- {
- DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+new Vector3(1f,1f,0f));
- DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+new Vector3(3.5f,-0.2f,2.5f));
- }
- else
- {
- DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+new Vector3(-1f,1f,0f));
- DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+new Vector3(-3.5f,-0.2f,2.5f));
- }
- }
- else
- {
- DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+DsgVar_13[Func_RandomInt(0, (DsgVar_12-1))]);
- DsgVar_36 = Func_RandomInt(0, (DsgVar_14-1));
- Proc_Loop(DsgVar_14);
- if ((fn_p_stGetCollision(((YLT_RaymanModel)Refs.Perso["Rayman"]).Position, DsgVar_15[DsgVar_36], 0) == new Vector3(0f,0f,0f)))
- {
- Proc_Break(0);
- }
- DsgVar_36++;
- if ((DsgVar_36 == DsgVar_14))
- {
- DsgVar_36 = 0;
- }
- Proc_EndLoop();
- DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+DsgVar_15[DsgVar_36]);
- }
- }
- }
- else
- {
- if ((DsgVar_11 == 1))
- {
- if ((fn_p_stGetCollision(((YLT_RaymanModel)Refs.Perso["Rayman"]).Position, ((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(-3.5f,-0.2f,2.5f)), 0) == new Vector3(0f,0f,0f)))
- {
- DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(-1f,1f,0f)));
- DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(-3.5f,-0.2f,2.5f)));
- }
- else
- {
- DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(1f,1f,0f)));
- DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(3.5f,-0.2f,2.5f)));
- }
- }
- else
- {
- if ((DsgVar_11 == 2))
- {
- if ((fn_p_stGetCollision(((YLT_RaymanModel)Refs.Perso["Rayman"]).Position, ((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(3.5f,-0.2f,2.5f)), 0) == new Vector3(0f,0f,0f)))
- {
- DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(1f,1f,0f)));
- DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(3.5f,-0.2f,2.5f)));
- }
- else
- {
- DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(-1f,1f,0f)));
- DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(-3.5f,-0.2f,2.5f)));
- }
- }
- else
- {
- DsgVar_24 = (((StdCam)Refs.Perso["StdCamer"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(DsgVar_13[Func_RandomInt(0, (DsgVar_12-1))]));
- DsgVar_36 = Func_RandomInt(0, (DsgVar_14-1));
- Proc_Loop(DsgVar_14);
- if ((fn_p_stGetCollision(((YLT_RaymanModel)Refs.Perso["Rayman"]).Position, ((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(DsgVar_15[DsgVar_36]), 0) == new Vector3(0f,0f,0f)))
- {
- Proc_Break(0);
- }
- DsgVar_36++;
- if ((DsgVar_36 == DsgVar_14))
- {
- DsgVar_36 = 0;
- }
- Proc_EndLoop();
- DsgVar_25 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(DsgVar_15[DsgVar_36]));
- }
- }
- }
- DsgVar_26 = (Func_Normalize((DsgVar_25-DsgVar_24))*DsgVar_10);
- DsgVar_27 = ((StdCam)Refs.Perso["StdCamer"]).Position;
- Proc_FixePositionPerso(this, DsgVar_24);
- Proc_SetFullPersoOrientation((((YLT_RaymanModel)Refs.Perso["Rayman"]).Position-Position), new Vector3(0f,0f,1f), 0);
- Proc_ChangeAction(Refs.Action["0x0001b445"]);
- SOUND_SendSoundRequest(Refs.SoundEvent["0x078f9440"]);
- Proc_ChangeMyComportAndMyReflex(SDZ_AOJ_2_Approche, SDZ_AOJ_1_JeCommenceAFilmer);
- }
- }
- private async Task SDZ_AOJ_2_Approche()
- {
- DsgVar_23 = (DsgVar_25-((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
- DsgVar_23.Z = 0;
- DsgVar_29 = VEC_AngleVector(((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_GetPersoSighting(), DsgVar_23, 0);
- if ((Func_AbsoluteValue(DsgVar_29) > 1f))
- {
- if ((Func_AbsoluteValue(DsgVar_29) > ((2f*Func_GetDeltaTime())/20)))
- {
- if ((DsgVar_29 < 0f))
- {
- ((YLT_RaymanModel)Refs.Perso["Rayman"]).Proc_RotatePersoAroundZ(((-1.9f*Func_GetDeltaTime())/20));
- }
- else
- {
- ((YLT_RaymanModel)Refs.Perso["Rayman"]).Proc_RotatePersoAroundZ(((1.9f*Func_GetDeltaTime())/20));
- }
- }
- else
- {
- ((YLT_RaymanModel)Refs.Perso["Rayman"]).Proc_RotatePersoAroundZ(DsgVar_29);
- }
- }
- if ((VEC_GetVectorNorm((Position-DsgVar_25)) < 0.25f))
- {
- Proc_FixePositionPerso(this, DsgVar_25);
- Proc_ChangePersoAnySighting((((YLT_RaymanModel)Refs.Perso["Rayman"]).Position-Position));
- if ((DsgVar_11 == 1))
- {
- DsgVar_27 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_AbsoluteVector(new Vector3(-2f,2f,0.1f)));
- }
- else
- {
- if ((DsgVar_11 == 2))
- {
- DsgVar_27 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_AbsoluteVector(new Vector3(2f,2f,0.1f)));
- }
- else
- {
- await Macro_3();
- }
- }
- DsgVar_36 = Func_GetTime();
- DsgVar_28 = Position;
- DsgVar_32 = 1;
- DsgVar_23 = (DsgVar_25-((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
- DsgVar_23.Z = 0;
- DsgVar_29 = VEC_AngleVector(((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_GetPersoSighting(), DsgVar_23, 0);
- if ((DsgVar_29 > 1f))
- {
- Proc_FactorAnimationFrameRate(1);
- Proc_ChangeMyComport(SDZ_AOJ_9_Tourne);
- }
- DsgVar_21 = 254;
- await Macro_0();
- await Macro_2();
- Proc_FactorAnimationFrameRate(1);
- Proc_ChangeMyComportAndMyReflex(SDZ_AOJ_3_Parle, SDZ_AOJ_2_JeFilme);
- }
- DsgVar_24 = (DsgVar_24+((DsgVar_26*Func_GetDeltaTime())/1000));
- Proc_FixePositionPerso(this, DsgVar_24);
- ACT_ChangeActorSighting((((YLT_RaymanModel)Refs.Perso["Rayman"]).Position-Position));
- if (globalRandomizer%4==0 && (1))
- {
- SetAGO(9, Position, new Vector3(0f,0f,0f), Refs.GameMaterial["0x0013ce88"], 4f);
- }
- }
- private async Task SDZ_AOJ_3_Parle()
- {
- await Macro_1();
- if (Cond_PressedBut(NodeButton))
- {
- if (Cond_IsValidObject(DsgVar_31))
- {
- fn_p_stKillPersoAndClearVariableProcedure1(DsgVar_31);
- }
- DsgVar_31 = Nobody;
- DsgVar_32 = 0;
- }
- DsgVar_30 = TEXT_DisplayText(DsgVar_31, ((CHG_TexteMenu)Refs.Perso["ALW_TexteMenu"]), DsgVar_40, Refs.Text["0x0000011e"], DsgVar_32);
- if ((DsgVar_30 == 1))
- {
- if (Cond_IsValidWayPoint(DsgVar_7))
- {
- DsgVar_27 = fn_p_stGetWpAbsolutePosition(DsgVar_7);
- }
- if (Cond_IsValidWayPoint(DsgVar_7))
- {
- DsgVar_28 = fn_p_stGetWpAbsolutePosition(DsgVar_8);
- }
- }
- else
- {
- if (((DsgVar_30 == 9) || (DsgVar_32 == 0)))
- {
- DsgVar_30 = TEXT_DisplayText(DsgVar_18, ((CHG_TexteMenu)Refs.Perso["ALW_TexteMenu"]), ((DsgVar_39*10)+new Vector3(-30f,-30f,12f)), NodeString, DsgVar_32);
- Proc_FactorAnimationFrameRate(1);
- Proc_ChangeMyComport(SDZ_AOJ_A_ParleAttendBouton);
- }
- }
- }
- private async Task SDZ_AOJ_4_Sortie()
- {
- DsgVar_25 = (((StdCam)Refs.Perso["StdCamer"]).Position+((StdCam)Refs.Perso["StdCamer"]).Func_AbsoluteVector(new Vector3(1f,1f,0f)));
- DsgVar_26 = (Func_Normalize((DsgVar_25-DsgVar_24))*DsgVar_10);
- if ((Cond_IsCustomBitSet(12) || (VEC_GetVectorNorm((Position-DsgVar_25)) < 0.1f)))
- {
- ((StdCam)Refs.Perso["StdCamer"]).DsgVar_0 = 0;
- ((StdCam)Refs.Perso["StdCamer"]).DsgVar_2 = 0;
- ((StdCam)Refs.Perso["StdCamer"]).ACT_SetNoColWithMap(0);
- ((YAM_GenMenuMap)Refs.Perso["YAM_GenMenuMap_I1"]).Proc_ChangeOneCustomBit(29, 0);
- ((GlobalActorModel)Refs.Perso["global"]).DsgVar_21 = 1;
- DsgVar_33 = 0;
- Proc_ChangeOneCustomBit(14, 1);
- Proc_ChangeOneCustomBit(20, 1);
- DsgVar_21 = 0;
- SOUND_SendSoundRequest(Refs.SoundEvent["0x078f9460"]);
- if ((DsgVar_19 != 0))
- {
- ACT_SetBooleanInArray(((GlobalActorModel)Refs.Perso["global"]).DsgVar_42, DsgVar_19, 1);
- }
- fn_p_stKillPersoAndClearVariableProcedure1(this);
- }
- DsgVar_24 = (DsgVar_24+((DsgVar_26*Func_GetDeltaTime())/1000));
- Proc_FixePositionPerso(this, DsgVar_24);
- Proc_SetFullPersoOrientation((DsgVar_25-Position), new Vector3(0f,0f,1f), 0);
- if (globalRandomizer%4==0 && (1))
- {
- SetAGO(9, Position, new Vector3(0f,0f,0f), Refs.GameMaterial["0x0013ce88"], 4f);
- }
- }
- private async Task SDZ_AOJ_5_Resume()
- {
- if (globalRandomizer%16==0 && (((((GlobalActorModel)Refs.Perso["global"]).DsgVar_60 == 0) && ((Func_DistanceToPerso(((YLT_RaymanModel)Refs.Perso["Rayman"])) < DsgVar_6) && ((YLT_RaymanModel)Refs.Perso["Rayman"]).Cond_CollideWithGround()))))
- {
- ((YAM_GenMenuMap)Refs.Perso["YAM_GenMenuMap_I1"]).Proc_ChangeOneCustomBit(29, 1);
- DsgVar_21 = 0;
- DsgVar_32 = 0;
- DsgVar_31 = Nobody;
- DsgVar_30 = TEXT_DisplayText(DsgVar_31, ((CHG_TexteMenu)Refs.Perso["ALW_TexteMenu"]), DsgVar_40, DsgVar_4, DsgVar_32);
- DsgVar_31.Proc_TransparentDisplay(1);
- DsgVar_31.Proc_SetTransparency(DsgVar_21);
- Proc_ChangeMyComport(SDZ_AOJ_6_Resume_FadeIn);
- }
- }
- private async Task SDZ_AOJ_6_Resume_FadeIn()
- {
- Proc_FixePositionPerso(this, ((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
- DsgVar_21 += (2*Func_GetDeltaTime());
- if ((DsgVar_21 < 255f))
- {
- DsgVar_31.Proc_SetTransparency(DsgVar_21);
- await Macro_0();
- await Macro_1();
- }
- else
- {
- DsgVar_21 = 254;
- DsgVar_31.Proc_SetTransparency(DsgVar_21);
- await Macro_0();
- await Macro_1();
- Proc_FactorAnimationFrameRate(1);
- Proc_ChangeMyComport(SDZ_AOJ_7_Resume_Attente);
- }
- }
- private async Task SDZ_AOJ_7_Resume_Attente()
- {
- if (((DsgVar_19 != 0) && ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_10))
- {
- if ((Cond_JustPressedBut(NodeButton) && (((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_9 == 0)))
- {
- ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_8 = 11;
- Proc_ChangeComport(((YLT_RaymanModel)Refs.Perso["Rayman"]), YLT_Reinit);
- Proc_ChangeComportReflex(((YLT_RaymanModel)Refs.Perso["Rayman"]), YLT_ReinitReflexe);
- DsgVar_36 = Func_GetTime();
- }
- if ((((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_9 == 9))
- {
- if (Cond_JustReleasedBut(NodeButton))
- {
- ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_8 = 0;
- Proc_ChangeComport(((YLT_RaymanModel)Refs.Perso["Rayman"]), YLT_Reinit);
- Proc_ChangeComportReflex(((YLT_RaymanModel)Refs.Perso["Rayman"]), YLT_ReinitReflexe);
- DsgVar_36 = 0;
- }
- if (((DsgVar_36 != 0) && Cond_IsTimeElapsed(DsgVar_36,1500)))
- {
- ACT_SetBooleanInArray(((GlobalActorModel)Refs.Perso["global"]).DsgVar_42, DsgVar_19, 0);
- DsgVar_33 = 1;
- ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_8 = 0;
- Proc_ChangeComport(((YLT_RaymanModel)Refs.Perso["Rayman"]), YLT_Reinit);
- Proc_ChangeComportReflex(((YLT_RaymanModel)Refs.Perso["Rayman"]), YLT_ReinitReflexe);
- Proc_FactorAnimationFrameRate(1);
- Proc_ChangeMyComport(SDZ_AOJ_8_Resume_FadeOut);
- }
- }
- if (globalRandomizer%16==0 && (1))
- {
- if (Cond_IsValidWayPoint(DsgVar_20))
- {
- SetAGO(9, fn_p_stGetWpAbsolutePosition(DsgVar_20), new Vector3(0f,0f,0f), Refs.GameMaterial["0x0013ce88"], 4f);
- }
- else
- {
- SetAGO(9, DsgVar_22, new Vector3(0f,0f,0f), Refs.GameMaterial["0x0013ce88"], 4f);
- }
- }
- }
- if (globalRandomizer%4==0 && ((Cond_IsInComport(((YLT_RaymanModel)Refs.Perso["Rayman"]),BNT_FadeDeLaMort) || ((((GlobalActorModel)Refs.Perso["global"]).DsgVar_60 > 0f) || ((VEC_GetVectorNorm((DsgVar_22-((YLT_RaymanModel)Refs.Perso["Rayman"]).Position)) > DsgVar_6) && (DsgVar_36 == 0))))))
- {
- ((YAM_GenMenuMap)Refs.Perso["YAM_GenMenuMap_I1"]).Proc_ChangeOneCustomBit(29, 0);
- Proc_FactorAnimationFrameRate(1);
- Proc_ChangeMyComport(SDZ_AOJ_8_Resume_FadeOut);
- }
- Proc_FixePositionPerso(this, ((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
- if (Cond_IsValidObject(DsgVar_31))
- {
- await Macro_1();
- }
- }
- private async Task SDZ_AOJ_8_Resume_FadeOut()
- {
- Proc_FixePositionPerso(this, ((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
- DsgVar_21 -= (2*Func_GetDeltaTime());
- if ((DsgVar_21 > 0f))
- {
- DsgVar_31.Proc_SetTransparency(DsgVar_21);
- await Macro_0();
- await Macro_1();
- }
- else
- {
- DsgVar_21 = 0;
- await Macro_0();
- if (Cond_IsValidObject(DsgVar_31))
- {
- fn_p_stKillPersoAndClearVariableProcedure1(DsgVar_31);
- }
- DsgVar_31 = Nobody;
- ((YAM_GenMenuMap)Refs.Perso["YAM_GenMenuMap_I1"]).Proc_ChangeOneCustomBit(29, 0);
- fn_p_stKillPersoAndClearVariableProcedure1(this);
- }
- }
- private async Task SDZ_AOJ_9_Tourne()
- {
- DsgVar_23 = (DsgVar_25-((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
- DsgVar_23.Z = 0;
- DsgVar_29 = VEC_AngleVector(((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_GetPersoSighting(), DsgVar_23, 0);
- if ((Func_AbsoluteValue(DsgVar_29) > 1f))
- {
- if ((Func_AbsoluteValue(DsgVar_29) > ((2f*Func_GetDeltaTime())/20)))
- {
- if ((DsgVar_29 < 0f))
- {
- ((YLT_RaymanModel)Refs.Perso["Rayman"]).Proc_RotatePersoAroundZ(((-1.9f*Func_GetDeltaTime())/20));
- }
- else
- {
- ((YLT_RaymanModel)Refs.Perso["Rayman"]).Proc_RotatePersoAroundZ(((1.9f*Func_GetDeltaTime())/20));
- }
- }
- else
- {
- ((YLT_RaymanModel)Refs.Perso["Rayman"]).Proc_RotatePersoAroundZ(DsgVar_29);
- }
- }
- DsgVar_23 = (DsgVar_25-((YLT_RaymanModel)Refs.Perso["Rayman"]).Position);
- DsgVar_23.Z = 0;
- DsgVar_29 = VEC_AngleVector(((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_GetPersoSighting(), DsgVar_23, 0);
- if ((DsgVar_29 < 1f))
- {
- DsgVar_21 = 254;
- await Macro_0();
- await Macro_2();
- Proc_FactorAnimationFrameRate(1);
- Proc_ChangeMyComportAndMyReflex(SDZ_AOJ_3_Parle, SDZ_AOJ_2_JeFilme);
- }
- }
- private async Task SDZ_AOJ_A_ParleAttendBouton()
- {
- await Macro_1();
- if (Cond_JustPressedBut(NodeButton))
- {
- if (Cond_IsValidObject(DsgVar_18))
- {
- fn_p_stKillPersoAndClearVariableProcedure1(DsgVar_18);
- DsgVar_18 = Nobody;
- }
- DsgVar_34 += 1;
- if ((DsgVar_34 > DsgVar_0))
- {
- DsgVar_33 = 0;
- fn_p_stKillPersoAndClearVariableProcedure1(DsgVar_31);
- DsgVar_31 = Nobody;
- DsgVar_21 = 0;
- await Macro_0();
- SOUND_SendSoundRequest(Refs.SoundEvent["0x078dce08"]);
- await ACTION_ExecuteAction(Refs.Action["0x0001b4d9"]);
- Proc_ChangeAction(Refs.Action["0x0001b495"]);
- ((GlobalActorModel)Refs.Perso["global"]).DsgVar_15 = 0;
- ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_16 = 1;
- Proc_FactorAnimationFrameRate(1);
- Proc_ChangeMyComportAndMyReflex(SDZ_AOJ_4_Sortie, SDZ_AOJ_0_JeBulle);
- }
- else
- {
- DsgVar_32 = 1;
- await Macro_2();
- DsgVar_28 = Position;
- await Macro_3();
- fn_p_stKillPersoAndClearVariableProcedure1(DsgVar_31);
- DsgVar_31 = Nobody;
- DsgVar_36 = Func_GetTime();
- Proc_FactorAnimationFrameRate(1);
- Proc_ChangeMyComport(SDZ_AOJ_3_Parle);
- }
- }
- }
- private async Task SDZ_AOJ_0_JeBulle()
- {
- if ((((StdCam)Refs.Perso["StdCamer"]).DsgVar_6 < DsgVar_9))
- {
- ((StdCam)Refs.Perso["StdCamer"]).DsgVar_6 = DsgVar_9;
- }
- }
- private async Task SDZ_AOJ_1_JeCommenceAFilmer()
- {
- if ((((StdCam)Refs.Perso["StdCamer"]).DsgVar_6 < DsgVar_9))
- {
- ((StdCam)Refs.Perso["StdCamer"]).DsgVar_6 = DsgVar_9;
- ((StdCam)Refs.Perso["StdCamer"]).DsgVar_1 = 1;
- ((StdCam)Refs.Perso["StdCamer"]).DsgVar_0 = 1;
- ((StdCam)Refs.Perso["StdCamer"]).DsgVar_2 = 1;
- ((StdCam)Refs.Perso["StdCamer"]).DsgVar_3 = 1;
- ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_16 = 0;
- ((StdCam)Refs.Perso["StdCamer"]).Cam_ForcePosition(1, 1, DsgVar_27);
- if (Cond_IsCustomBitSet(29))
- {
- ((StdCam)Refs.Perso["StdCamer"]).Cam_ForceTarget(1, 1, Position);
- }
- else
- {
- ((StdCam)Refs.Perso["StdCamer"]).Cam_ForceTarget(1, 1, ((Position+((YLT_RaymanModel)Refs.Perso["Rayman"]).Position)/2));
- }
- }
- }
- private async Task SDZ_AOJ_2_JeFilme()
- {
- if ((((StdCam)Refs.Perso["StdCamer"]).DsgVar_6 < DsgVar_9))
- {
- ((StdCam)Refs.Perso["StdCamer"]).DsgVar_6 = DsgVar_9;
- ((StdCam)Refs.Perso["StdCamer"]).Cam_SetFlagNoAngularInertia(1, 1);
- ((StdCam)Refs.Perso["StdCamer"]).Cam_SetFlagNoLinearInertia(1, 1);
- ((StdCam)Refs.Perso["StdCamer"]).DsgVar_1 = 1;
- ((StdCam)Refs.Perso["StdCamer"]).DsgVar_0 = 1;
- ((StdCam)Refs.Perso["StdCamer"]).DsgVar_2 = 1;
- ((StdCam)Refs.Perso["StdCamer"]).DsgVar_3 = 1;
- ((YLT_RaymanModel)Refs.Perso["Rayman"]).DsgVar_16 = 0;
- ((StdCam)Refs.Perso["StdCamer"]).Cam_ForcePosition(1, 1, DsgVar_27);
- ((StdCam)Refs.Perso["StdCamer"]).Cam_ForceTarget(1, 1, DsgVar_28);
- }
- }
- private async Task Macro_0()
- {
- SetAGO(125, DsgVar_41, (DsgVar_41+new Vector3(10f,15f,DsgVar_21)), Refs.GameMaterial["0x0013d030"], 5);
- }
- private async Task Macro_1()
- {
- SetAGO(110, DsgVar_38, DsgVar_39, Refs.GameMaterial["0x00640767"], ((DsgVar_21*3)/4));
- }
- private async Task Macro_2()
- {
- if ((DsgVar_2[(DsgVar_34-1)] == 1))
- {
- SOUND_SendSoundRequest(Refs.SoundEvent["0x078f9480"]);
- SOUND_SendSoundRequest(Refs.SoundEvent["0x084bf8e8"]);
- }
- else
- {
- if (((DsgVar_2[(DsgVar_34-1)] == 2) || (DsgVar_2[(DsgVar_34-1)] == 0)))
- {
- SOUND_SendSoundRequest(Refs.SoundEvent["0x078f94a0"]);
- SOUND_SendSoundRequest(Refs.SoundEvent["0x084bf908"]);
- }
- else
- {
- if ((DsgVar_2[(DsgVar_34-1)] == 3))
- {
- SOUND_SendSoundRequest(Refs.SoundEvent["0x078f94c0"]);
- SOUND_SendSoundRequest(Refs.SoundEvent["0x084bf928"]);
- }
- }
- }
- TEXT_FormatText(DsgVar_1[(DsgVar_34-1)], NodeString, Refs.Text["0x0000011e"]);
- if ((DsgVar_2[(DsgVar_34-1)] > 0f))
- {
- DsgVar_40 = new Vector3(140f,(870-(27*(DsgVar_2[(DsgVar_34-1)]-1))),16);
- DsgVar_38 = new Vector3(14f,(86-(2.7f*DsgVar_2[(DsgVar_34-1)])),0);
- DsgVar_39 = new Vector3(94f,(87+(2.7f*DsgVar_2[(DsgVar_34-1)])),0);
- }
- }
- private async Task Macro_3()
- {
- DsgVar_36 = Func_RandomInt(0, (DsgVar_16-1));
- if ((DsgVar_36 == DsgVar_35))
- {
- DsgVar_35 = (DsgVar_35+1);
- if ((DsgVar_35 == DsgVar_16))
- {
- DsgVar_35 = 0;
- }
- }
- else
- {
- DsgVar_35 = DsgVar_36;
- }
- DsgVar_27 = (((YLT_RaymanModel)Refs.Perso["Rayman"]).Position+((YLT_RaymanModel)Refs.Perso["Rayman"]).Func_AbsoluteVector(DsgVar_17[DsgVar_35]));
- }
- }
Add Comment
Please, Sign In to add comment