Saturn Ross
The Local Bird-Brain
Hey, I'm trying to get a character's Thok and Spin items to be after-images, sort-of like SkyLua, but shorter, like Peelout v4. It would be appreciated. Thanks!
//This Lua lump gives player afterimages for using some abilities.
//Give afterimages if spinning or thokking
addHook("ThinkFrame", do
for player in players.iterate
if not player.mo continue end
if (player.pflags & PF_THOKKED)
and (player.mo and player.mo.skin == "sonic")
or (player.pflags & PF_SPINNING)
and (player.mo and player.mo.skin == "sonic")
P_SpawnGhostMobj(player.mo)
end
end
end)
"ThinkFrame"
Well, for that you could try an "if leveltime % 2" for every second frame, "if leveltime % 3" for every third frame, etcetera, however note I did not test that at all. (Reminder: There are 35 frames per second in Sonic Robo Blast 2.)What I meant by, "Shorter than SkyLua, like PeelOut v4" I meant that less afterimages would appear. I was kind of looking for an inbetween sort of afterimage, but the one Lat compiled is actually quite good.
addHook("MobjThinker",function(mobj)//Add MobjThinker hook
if mobj.skin=="sonic" //If the player is playing as Sonic
and(mobj.player.pflags&PF_THOKKED //And Thokking
or mobj.player.pflags&PF_SPINNING)//Or Spinning
and leveltime%2 //Then every 2ND tic-
P_SpawnGhostMobj(mobj) //-make a ghost object of the player
end //End the "if" line, we're done here
end,MT_PLAYER) //End the "function" to be executed, and only execute it on PLAYER objects
You have some pretty good ideas, much better than what I thought. However, I'm not too good at LUA, and I usually end up using and modifying what I think fit. I'm also bad at spriting, but there are tons of sprites out there, and sadly the only Espio sprites I found look horrible, and I couldn't even get them out of the WAD with SLADE3. I might be able to ask someone, though.To be honest, I thought about this (fan character, don't ask) way back in the day. Here's what I brainstormed (most of these are for competitive gametypes):
- An ability where the character throws a smoke bomb at their feet to render himself invisible. Basically, just force him into the animation and give him MF2_SHADOW. Make sure he can only do it on the ground, though. (or, if he won't have an animation, it can work in the air too)
- An ability where he can throw shuriken or kunai daggers or something without using a ring (as if he had an Infinity Ring) but give it the firing rate of the Rail Ring (to prevent being spammed).
- A sneaking mode of some sort. Like, by holding Custom 1, your move speed is greatly reduced and you can't use weapon rings, but you gain MF2_SHADOW. (an alternative to the smoke bomb idea)
- A melee attack that costs 10 rings. Probably should stop the character from moving when it's executed though.
While yes, Espio is based on ninjas, I don't think he's based on the Naruto kind with magic. The ninjas from feudal Japan were just stealthy and had tricks up their sleeves. Legends and myths kind of blew that out of proportion, and that's where the "magic" idea came from. If you research them a bit, you'll find that they had neat tricks such as "walking on water," which you could incorporate into Espio's skills somehow. Just don't stray too far from Espio's original concept, which you could easily do especially by adding magic or something. Don't try to use the time bending ability, either, as it's not only inaccurate, but hard to replicate in SRB2.
Feel free to use any of the ideas above if you want.
EDIT: While staying true to Espio's design is good, gameplay is the biggest concern: It can be original if you want it to be, but it shouldn't confuse people and interrupt the flow of the game. This is especially true not only for single player, but competitive modes like Match as well.
addHook("ThinkFrame", do
for player in players.iterate
if player.mo and player.mo.skin == "sonic" then
if player.cmd.buttons & BT_USE
and player.panim == PA_ROLL
and not P_IsObjectOnGround(player.mo)
and player.mo.ldashready == 0
and player.powers[pw_super] == 0
player.pflags = $1 & ~PF_JUMPED
player.mo.state = S_PLAY_FALL1
player.mo.momx = 0
player.mo.momy = 0
player.mo.momz = 0
end
end
end
end)
Maybe I could use a Whirlwind Shield effect that would rapidly change transparency...?Well, it'd (the tornado would) probably look awful in software rendering. Either because it'd be opaque, or because of the limited colours that can be drawn behind it. But I'd say either exclude or include, but don't have it swing enemies.