Wanting turnsuper.lua for Player 2

Status
Not open for further replies.

TOGM95

What am I again?
Hello, everyone!

I was playing SRB2 2.1.8 with the SRB2 Hub mod with my sister until i loaded turnsuper.lua. When this happened my sister sayed that turning super anytime and she couldn't turn was unfair. I wanted to help her but i'm noob at lua scripting...

Can someone help me doing a turnsuper for Player 2?
 
Hello, everyone!

I was playing SRB2 2.1.8 with the SRB2 Hub mod with my sister until i loaded turnsuper.lua. When this happened my sister sayed that turning super anytime and she couldn't turn was unfair. I wanted to help her but i'm noob at lua scripting...

Can someone help me doing a turnsuper for Player 2?

Seriously... Does those kind of useless dumb cheats still exists? :<
Anyways, I have seriously no idea of how to do it... (Even if I'm trying to do it for BuffGauge 2P support...)
 
It is for fun (at least this is what i think) and i want to help my little sister ok?

Anyway, do you know someone good at lua scripting?
 
Well, first of all. That script is game breaking and stupid.

Second, asking someone to do things for you will get you whacked. If you really want to cheat yourself of a game, learn to Lua yourself. End of story.
 
Eh, i really need some lua teaching but as for player.mo or whatever with "player" it IS suposed to be player2 for P2, right? I mean, i tried this and it didn't work.

Code:
local function Turnsuper2(player)
	if not player2.mo return end 
	if not player2.mo.health return end 
	if player2.powers[pw_super] return end 
        player2.powers[pw_emeralds] = (EMERALD7<<1)-1 
	P_DoSuperTransformation(player2, true) 
        P_GivePlayerRings(player2, 9999)
end
local function Turnbacknormal2(player)
	if not player2.mo return end 
	if not player2.mo.health return end  
	if player2.powers[pw_super] 
        P_GivePlayerRings(player2, -9999)
end end

COM_AddCommand("superon2", function(player)
	Turnsuper2(player)
 
end)

COM_AddCommand("superoff2", function(player)
	Turnbacknormal2(player)
end)

If this doesn't work then what works for P2?
 
Last edited:
When you add the hook needed to make the super form code work, just put MT_PLAYER.

Oh just like this...

addHook("MobjThinker", SForm, MT_PLAYER)
local function SForm(doom)

and then you add the code you want to make the super form act.
 
Last edited:
OK. I'll try that and later i see if it works.

EDIT: Um... it says:

Code:
 bad argument to "addHook" (expected, got nil)

Any ideas?
 
Last edited:
Status
Not open for further replies.

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

Back
Top