SRB2 Message Board  

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

Reply
 
Thread Tools Search this Thread
Old 05-04-2014   #1
TOGM95
What am I again?
 
TOGM95's Avatar
Default Wanting turnsuper.lua 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?
__________________
I'm shy, I'm idiotic, but most importantly, I'm alive.
TOGM95 is offline   Reply With Quote
Old 05-04-2014   #2
"Lat'"
Stop it
 
"Lat'"'s Avatar
Default

Quote:
Originally Posted by TOGM95 View Post
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...)
__________________
Quote:
Originally Posted by kiro the hedgehog View Post
So is a better boss and stage in the works or is this massive disapointment gonna really be the end of the game?
"Lat'" is offline   Reply With Quote
Old 05-04-2014   #3
TOGM95
What am I again?
 
TOGM95's Avatar
Default

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?
__________________
I'm shy, I'm idiotic, but most importantly, I'm alive.
TOGM95 is offline   Reply With Quote
Old 05-04-2014   #4
Steelie
Solving issues with coffee
 
Steelie's Avatar
Default

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.
__________________
<Majro> or maybe they simply walk at sucking
Steelie is offline   Reply With Quote
Old 05-04-2014   #5
TOGM95
What am I again?
 
TOGM95's Avatar
Default

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?
__________________
I'm shy, I'm idiotic, but most importantly, I'm alive.

Last edited by TOGM95; 05-04-2014 at 04:49 PM. Reason: Forgot Something
TOGM95 is offline   Reply With Quote
Old 05-04-2014   #6
gregory_house
Also known as TemporaryAl
 
gregory_house's Avatar
Default

Quote:
Originally Posted by TOGM95 View Post
If this doesn't work then what works for P2?
It's not player2 you want to replace player with, but rather players[1]
__________________
My friends are my strength. - Discord: TemporaryAl#4689
gregory_house is offline   Reply With Quote
Old 05-04-2014   #7
TOGM95
What am I again?
 
TOGM95's Avatar
Default

Could you give me an example please?
__________________
I'm shy, I'm idiotic, but most importantly, I'm alive.
TOGM95 is offline   Reply With Quote
Old 05-04-2014   #8
VirtualBlitz546
 
VirtualBlitz546's Avatar
Default

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.
__________________
Quote:
<TheDoctor> Mlg? My lovely Gangster? Mega Lick Grope?
<ChaosX79> My Long Gabba

Last edited by VirtualBlitz546; 05-04-2014 at 07:08 PM.
VirtualBlitz546 is offline   Reply With Quote
Old 05-05-2014   #9
TOGM95
What am I again?
 
TOGM95's Avatar
Default

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?
__________________
I'm shy, I'm idiotic, but most importantly, I'm alive.

Last edited by TOGM95; 05-05-2014 at 07:13 PM.
TOGM95 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 02:30 AM.


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