I can't get my actor to follow path nodes and instead he is just running around aimlessly. This code is my first attempt to make it work:
This second attempt here is trying to force the actor to work. I did the instructions on this page where it was put into a map, it's special set to Thing_SetGoal, and it's arg set to 37 which is the path node.
Code:
class Mario__ZScript : ACTOR {Default {Radius 32;Height 88;Speed 8;Mass 250;+SOLID;+INVULNERABLE;+ISMONSTER;+DROPOFF;+CANPASS;//+FRIENDLY;}int timesJumped;States {Spawn:EMPT A 1;EMPT A 1 {timesJumped = 0;ChangeTID(200);}PostSpawnLoop:EMPT BCDEFGHIJKLMNOPQRSTUVWXYZ 3;EMP2 ABCDEFGHIJKLMNOPQRSTUVWXY 3;StartJump:EMP5 ABCDE 3;EMP5 E 0 ThrustThingZ(0, 70, 0, 0);MidJump: EMP5 FGHIJKLMNOPQRSTUVWXYZ 1;EMP6 ABCDEF 1;MidAir:EMP6 F 1;EMP6 F 1 {if (Pos.Z - floorZ == 0){return resolvestate("Landing");} else {return resolvestate("MidAir");}}EMP6 GHIJKLMNOPQRSTUVWXYZ 1; // Unused framesEMP7 ABCDEFGH 1; // Unused framesLanding:EMP8 ABCDEFGHIJKLMNOP 2;EMP8 P 1 {timesJumped++;if (timesJumped >= 2){A_LookEx(0, 0.0, 0.0, 0.0, 360.0, "Run");}}GoTo PostSpawnLoop+14;Run:EMP3 A 1;EMP3 A 1 { bFRIENDLY = TRUE; }EMP3 A 1 A_ClearTarget();EMP3 A 1 Thing_SetGoal(200, 37, 0, 1);Running:EMP3 A 1;EMP3 ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 A_Chase(null, null, CHF_DONTIDLE);EMP4 A 1 A_Chase(null, null, CHF_DONTIDLE);Loop;}}
Code:
class MarioRun__ZScript : ACTOR {Default {Radius 32;Height 88;Speed 8;Mass 250;+SOLID;+INVULNERABLE;+ISMONSTER;+DROPOFF;+CANPASS;+FRIENDLY; }States {Spawn:EMP3 A 1;EMP3 ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 A_Chase(null, null, CHF_DONTIDLE);EMP4 A 1 A_Chase(null, null, CHF_DONTIDLE);Loop;}}
Statistics: Posted by SPZ1 — Sun Oct 06, 2024 3:47 pm