Trying to Create a State using Rotated Frames

This is kind of hard to explain. Basically, I managed to get Rosy's drill ability to work. I want this to be usable only as a lua script, so that it would be usable for Amy as well.
My conclusion is that I want to use "MLEED D1-8" or "MLEL A1-8" since those frame resemble the "CYCL" frames. The idea would be to use the rotations to replace the "CYCL" frames. I'm not sure how to do this though.


I was getting help in the #scripting channel on the Discord, but it didn't work out.
addHook("ThinkFrame", do
for player in players.iterate
if(player.mo.skin == "rosy")
if (player.mo.drill == 1)
player.mo.sprite = SPR_PLAY
//Frame 1
player.mo.sprite2 = SPR2_MLEL
player.mo.frame = 1
end
end
end
end)
This is what I came up with, for at least showing one frame, and it resulted in the error
"ERROR: HWR_ProjectSprite: invalid sprite frame 1/1 for PLAY"
I tried with, and without, "player.mo.sprite = SPR_PLAY" and had no luck.


Edit: So I was just delving into the peelout code, and I noticed that the peelout states were defined by using existing player states. This would help me define the drill states, but I still need a way to set it to a rotation angle.


I want to make a series of states using rotated frames for a character. I've ported Rosy's "drill" ability, and I want to have it working with pre-existing sprites.
To accurately recreate it, I would need to use "MLEED 1-8" or "MLELA 1-8" as those are the frames that closely resemble the frames that would be added normally.
This approach would allow it to easily be port-able to Amy.
 
Last edited:
Modify player.drawangle while the player is in the using the drill ability. I recommend setting up a single custom state that the player transitions to when activating the ability, and then using ThinkFrame to determine whether the player is in that state to perform the player.drawangle rotation.
 

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

Back
Top