FYPa abcdefgh 3 { if (Checkinventory("hopmaker", 1)); { return resolvestate("hop"); } A_Chase (); A_StartSoundIfNotSame ("bell/small" ,0); return resolvestate(null); loop; }
The jump to "hop" should only occur if one or more "hopmaker"s is had. in this checkinventory setup the jump always occurred, even before I had a system to give fyip the hopmaker. I converted it from an old setup in decorate that I also needed help with but that does now work, well enough. This is definitely checking SOMETHING since the game freaks out if the item name is invalid.
FYPa abcdefgh 3 { A_Chase (); A_spawnitemex ("groundchequer", 32, 0, 22, 0, 0, -16, 0, SXF_SETMASTER) ; A_StartSoundIfNotSame ("bell/small",0); //A_Checksolidfooting ("landing"); A_JumpIfInventory("hopmaker", 1, "hop") ; } loop;
this other way, the hop never occurs. Though I may have made the item-giver improperly. this stuff wears me out
this ground checker is launched by the monster on every frame of its walk cycle. it DOES show up, but it doesn't seem to fulfill its purpose.
class groundchequer : eepActor { Default { scale .1; Radius 4; Height 4; Speed 20; gravity 4; +ismonster +noblockmap //setting missile will make it "die" when it hits ground but that will also make it go through impassible lines //the idea is for it to explode if it hits the ground but if it falls instead, and more than 24 units below the ground, to give the fyip an item that will make it jump forward //terribly hacky but all i understand //the fyip will need to both launch this ground checker and check for the jump item on every frame. stupid nuisance } states { spawn: A___ a 1; // if this works theoretically you can have it try to jump UP if it reaches solid ground right away b___ a 1 A_Checksolidfooting ("nope"); // i do NOT want it to hop if there are simple stairs c___ a 1 A_Checksolidfooting ("nope"); //someone more competent than you ("you" being me, I write notes to myself) could automatically track how far the thing fell but such a person wouldn't need to make a separate ground checking object either d___ a 1 A_RadiusGive("hopmaker", 64, RGF_MONSTERS|RGF_NOMASTER|rgf_inclusive, 1); //meant to trigger the state change in its "master" e___ a 1; //just a placeholder stop; //these letter-named sprites were to help me know at what point the object had dropped past 24 below the ground. if this had worked I would have turned these invisible next stop; a___ d 1; stop; } }
and i "need" it as zscript because it relies on a custom function "check solid footing" that uses zscript
as part of my hacky attempt to make a creature check for elevation differences to hop into
which there is surely a less hacky way to do but I wanted to see if i could at least implement it to some degree without asking for help since I hate asking for help
nope
hop: fyij e 3 ; fyij a 3 A_SetUserVar("user_fyipground", 0); fyij a 0 a_changevelocity (0,0,random(4, 8),0,0); //they seem to want to jump backwards whether the first value is negative or positive //recoil is more consistent fyij a 0 A_Recoil (-4); fyij bc 3; falling: //fyij d 3 A_JumpIf(user_fyipground == 0, "painfalling"); jumpifuser would be used within its pain state fyij d 3 A_Checksolidfooting ("landing"); goto falling; landing: fyij e 3 A_SetUserVar("user_fyipground", 1); fyij a 3; goto see;
the hop itself works, thankfully, though gzdoom whines at me about user variables being "deprecated." I tried looking into "actor variables" and it SEEMED to be related to map editor stuff, which this isn't. is it?

thank you for looking! I have a backup "plan" that will make specific sectors prompt chosen monsters to jump If this is not able to be salvaged.