SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Editing > Editing Help

Reply
 
Thread Tools Search this Thread
Old 12-24-2019   #1
DerpyBubblez
Cassie #6004 on Discord
 
DerpyBubblez's Avatar
Default Trying to Create a State using Rotated Frames

Spoiler: Old

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.
Spoiler: Code

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 by DerpyBubblez; 12-25-2019 at 05:21 AM.
DerpyBubblez is offline   Reply With Quote
Old 12-26-2019   #2
Lach
nanananananananananananan a
Developer
 
Lach's Avatar
Default

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.
Lach is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:05 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.