por favor?
i know
what to do
addHook("ThinkFrame", function()
for player in players.iterate do
if player.mo.skin ~= "skinnamehere" then
continue
end
if (player.cmd.buttons & BT_TOSSFLAG) //If you're holding CUSTOM2
and player.rings >= 200 // 200 rings cuz its super sonic
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD1) //OH
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD2) //MY
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD3) //CHAOS
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD4) // EMERALDS
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD5)
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD6)
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD7)
P_DoSuperTransformation(player)
P_GivePlayerRings(player,-150)
print "your idk is now super" // change this
end
end
end)
this was stolen by cman cuz it was made by me and i got no credit but u can use it
---------- Post added at 12:58 AM ---------- Previous post was at 12:57 AM ----------
you can change the 200 to something smaller
(if your going 2 use 50 just remove the P_GivePlayRings part at the end)
addHook("ThinkFrame", function()
for player in players.iterate do
if player.mo.skin ~= "skinnamehere" then
continue
end
if (player.cmd.buttons & BT_TOSSFLAG) //If you're holding CUSTOM2
and player.rings >= 200 // 200 rings cuz its super sonic
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD1) //OH
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD2) //MY
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD3) //CHAOS
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD4) // EMERALDS
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD5)
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD6)
P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD7)
P_DoSuperTransformation(player)
P_GivePlayerRings(player,-150)
print "your idk is now super" // change this
end
end
end)
Ok, but I tried this and it didn't work. Did I do something wrong in making it a lua?You need to put the script as a code by clicking on the # icon, the text should appear like this :
Code:addHook("ThinkFrame", function() for player in players.iterate do if player.mo.skin ~= "skinnamehere" then continue end if (player.cmd.buttons & BT_TOSSFLAG) //If you're holding CUSTOM2 and player.rings >= 200 // 200 rings cuz its super sonic P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD1) //OH P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD2) //MY P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD3) //CHAOS P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD4) // EMERALDS P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD5) P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD6) P_SpawnMobj(player.mo.x, player.mo.y, player.mo.z, MT_EMERALD7) P_DoSuperTransformation(player) P_GivePlayerRings(player,-150) print "your idk is now super" // change this end end end)
Or you can put [ CODE ] the text then [ /CODE ] and also I didn't see you post this script as an add-on soo I'm not sure if you're telling the truth :/
Maybe you didn't modify the skin check?Ok, but I tried this and it didn't work. Did I do something wrong in making it a lua?
Wdym modify the skin check?Maybe you didn't modify the skin check?
50 (200 in case of this lua) rings, no shield. Press spin mid-jump.Btw, it might be because I'm not using it correctly. When u get all the emeralds, how do u turn super?
But you see, that's the issue. When you get all 7 emeralds, even in this lua, you still just get the invincibility and speed. So you never really get the chance to have no shield or invincibility because by the time it ends, the emeralds are used up and scatter again. I think the only way to be super in 2.2 is to have a lua that replaces some of the official game's match code when activated.50 (200 in case of this lua) rings, no shield. Press spin mid-jump.
Though it would be easier if P_DoSuperTransformation / super forms themselves didn't constantly check for emeralds while transformed and Lua was just able to force players super regardless.
But you see, that's the issue. When you get all 7 emeralds, even in this lua, you still just get the invincibility and speed. So you never really get the chance to have no shield or invincibility because by the time it ends, the emeralds are used up and scatter again. I think the only way to be super in 2.2 is to have a lua that replaces some of the official game's match code when activated.
addHook("ThinkFrame", do
for player in players.iterate
if not (player.issuper)
player.issuper = 0
end
if player.mo == nil then continue end
if player.powers[pw_invulnerability] == 20*TICRATE
and player.powers[pw_sneakers] == 20*TICRATE
and G_RingSlingerGametype()
print("the player has all emmies")
player.powers[pw_emeralds] = 127
player.powers[pw_sneakers] = 0
player.powers[pw_invulnerability] = 1 //avoid invincibility music
end
if player.issuper == 1
player.powers[pw_super] = (player.rings)
end
if player.rings == 0
and player.issuper == 1
player.issuper = 0
end
end
end)
addHook("AbilitySpecial", do
for player in players.iterate
if player.mo == nil then continue end
if player.powers[pw_emeralds] == 127 and G_RingSlingerGametype()
and player.rings >= 50
P_DoSuperTransformation(player)
player.issuper = 1
end
end
end)
addHook("PlayerSpawn", function(player)
player.issuper = 0
end)
/* use this for debugging
hud.add(function(v, p)
local mo = p.mo
if not mo
return
end
local str1, str2, str3
str1 = "emmy value = " ..p.powers[pw_emeralds].. "."
str2 = "super value = " ..p.powers[pw_super].. "."
str3 = "rings value = " ..p.rings.. "."
v.drawString(310, 180, str1, V_ALLOWLOWERCASE | V_SNAPTOBOTTOM | V_SNAPTORIGHT, "right")
v.drawString(310, 168, str2, V_ALLOWLOWERCASE | V_SNAPTOBOTTOM | V_SNAPTORIGHT, "right")
v.drawString(310, 156, str3, V_ALLOWLOWERCASE | V_SNAPTOBOTTOM | V_SNAPTORIGHT, "right")
end)*/
hmmm.... maybe we can get the emerald and super match code from 2.1 and maybe it will replace the 2.2 one when you use the lua?
...Even if you force the player to be super (with the ringslinger emeralds), SRB2 will force him not to be super. I tried do stuff when the player has the exact 20 seconds of sneakers and invincibility, this will give him all emeralds because having the sneakers and invuln doesn't mean the player is still having the emeralds. Then I coded to make player super by force when he double jump, but SRB2 has something that disables this. of course, 2.2.... ugh, Here's my code..
The ONLY way now, is to code a custom super status from scratch that exacts the SRB2 ringslinger super data. Don't know why SRB2 has disabled this but...Code:addHook("ThinkFrame", do for player in players.iterate if not (player.issuper) player.issuper = 0 end if player.mo == nil then continue end if player.powers[pw_invulnerability] == 20*TICRATE and player.powers[pw_sneakers] == 20*TICRATE and G_RingSlingerGametype() print("the player has all emmies") player.powers[pw_emeralds] = 127 player.powers[pw_sneakers] = 0 player.powers[pw_invulnerability] = 1 //avoid invincibility music end if player.issuper == 1 player.powers[pw_super] = (player.rings) end if player.rings == 0 and player.issuper == 1 player.issuper = 0 end end end) addHook("AbilitySpecial", do for player in players.iterate if player.mo == nil then continue end if player.powers[pw_emeralds] == 127 and G_RingSlingerGametype() and player.rings >= 50 P_DoSuperTransformation(player) player.issuper = 1 end end end) addHook("PlayerSpawn", function(player) player.issuper = 0 end) /* use this for debugging hud.add(function(v, p) local mo = p.mo if not mo return end local str1, str2, str3 str1 = "emmy value = " ..p.powers[pw_emeralds].. "." str2 = "super value = " ..p.powers[pw_super].. "." str3 = "rings value = " ..p.rings.. "." v.drawString(310, 180, str1, V_ALLOWLOWERCASE | V_SNAPTOBOTTOM | V_SNAPTORIGHT, "right") v.drawString(310, 168, str2, V_ALLOWLOWERCASE | V_SNAPTOBOTTOM | V_SNAPTORIGHT, "right") v.drawString(310, 156, str3, V_ALLOWLOWERCASE | V_SNAPTOBOTTOM | V_SNAPTORIGHT, "right") end)*/
Thing is, I don't think Lua has that deep modification abilites to the game, and the game is written in C while the scripting is Lua.hmmm.... maybe we can get the emerald and super match code from 2.1 and maybe it will replace the 2.2 one when you use the lua?
Darn, and I cant seem to find it in 2.1's files. What now?Thing is, I don't think Lua has that deep modification abilites to the game, and the game is written in C while the scripting is Lua.
Welp, it been a while, and I would say this issue has been solved, but sadly,(And I feel so bad saying this)View attachment 24039
I think it works
--
I don't think I'm allowed to upload a lua here so I put it in submissions
Actually, this mod does work, my mistake, it was just a mod a had which did something to the lua.Welp, it been a while, and I would say this issue has been solved, but sadly,(And I feel so bad saying this)
...The mod, really doesnt work as it should
View attachment 41463
I explain in more detail on the mod's thread