[SRB2K] Can't get a Custom Object to Walk Back and Forth

Hey guys!!

I really didn't want to be That Person who Finally joins a forum mainly for Help, but here I am.

Don't judge me on this, because it's become a fun project to learn new things, but I basically made an Among Us SKELD map about a year ago for SRB2K.
Throughout this track, I wanted to have a Crewmate to basically patrol Back and Forth, either by something turning it around, or by it hitting a wall.
(Eventually I'm going to give it a Death State if you hit it where it's a Dead body on the floor and you can slip on it, but I want to get this sorted first if possible)


srb2kart_Cmtdf3kvfI.gif


At the moment, this is its current state. It walks at a constant speed, animated, but I just can't find a way to get it to Turn itself Around. If you're interested in how the OBJTCFG looks for it, this is how it is at the moment:
1655732785624.png

1655732824134.png

Initially I tried looking through as many Linedefs and Actions as I could to try and find any that has the sort of Behaviour I'm looking for, but I just couldn't really find much besides A_MoveAbsolute for the walking, and that was about it. I don't want them to chase anybody either. I even tried looking into Targets and Tracers to see if they could help too, but there's really not much clear documentation about how to use them or if it'd even help, so I hit a pretty quick dead-end there.

The other Linedef I tried using was Linedef Type 425, where I was hoping that, when executed, would change the Object's State from Walking Up, to a separate Loop of states I made for it to Walk Down (bit of a Hack solution but I couldn't really find much else). Unfortunately I don't think I could find anything where an Object would activate the state change as it walked into a certain sector that wasn't a Player or Pushable object. When the object was a pushable, the Player would get stuck on them and spin out infinitely. (I'd rather not them be able to be pushed, but I'd still like for them to activate linedef triggers)
srb2kart_tFLSqS5wZC.gif

srb2kart_6ATaChXzFl.gif


After that, I played through base SRB2 to see if there were any enemies that had similar behaviour and ran into the Egg Guards!
srb2win_TDCQrwFVJc.gif

This is exactly the kind of behaviour I was looking for, so I looked into its Object Type and Actions to see if there was anything I could use. Namely, A_GuardChase.
Unfortunately, as you can see on the page, I'm fairly sure this behaviour was added into V2.2 of SRB2, whereas SRB2K uses V2.1. I tried placing one into my Track and sure enough, it just chased after me instead.

I was even considering using A_RotateSpikeBall to make them at least just Walk around in a circle if anything, but again I didn't quite understand how Targets worked, and was unsure if the Crewmate's angle would even rotate as it would run around, or if it would always just face a single direction.

I was maybe considering even just doing it in Lua myself, but I've still been learning the basics of that in my own time over the last couple of months, and I'm not hugely confident in how I'd achieve this or if whatever I make would even work (im not much of a programmer, the logic gets a bit much).

I've been trying to do this for a better part of a week or so now, so I'd be incredibly grateful if anybody could give me any advice, some suggestions as to what I could use, or even just "yea nah ur probs gonna have to use lua lmao rip"

Thanks :) ❤️🖤🤍
 

Attachments

  • 1655737092900.png
    1655737092900.png
    62.9 KB · Views: 73
  • 1655737100270.png
    1655737100270.png
    32 KB · Views: 77
Last edited:

Who is viewing this thread (Total: 1, Members: 0, Guests: 1)

Back
Top