SRB2 Message Board  

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

Reply
 
Thread Tools Search this Thread
Old 04-08-2017   #1
GreenKnight9000
 
GreenKnight9000's Avatar
Default How to make the bot/sidekick character be super all the time?

It's always fun to be super and I thought how much fun it'd be if your sidekick (eg: Sonic & Tails) to be super ALL the time (or at least, on command) I tried but failed miserably because I had no idea what I was doing.
is there a lua script to pull this off?
GreenKnight9000 is offline   Reply With Quote
Old 05-19-2017   #2
Lach
Latch? Lock?? Lack???
 
Lach's Avatar
Default

Not that I know of, but it's super easy to make.

Code:
addHook("MobjThinker", function(mo)
	if mo and mo.player and mo.player.bot > 0
		if not mo.player.powers[pw_super]
			mo.player.powers[pw_emeralds] = 127
			P_DoSuperTransformation(mo.player, true)
		end
		mo.health = 9999
	end
end, MT_PLAYER)
Lach is online now   Reply With Quote
Old 05-20-2017   #3
GreenKnight9000
 
GreenKnight9000's Avatar
Default

Quote:
Originally Posted by Lach View Post
Not that I know of, but it's super easy to make.

Code:
addHook("MobjThinker", function(mo)
	if mo and mo.player and mo.player.bot > 0
		if not mo.player.powers[pw_super]
			mo.player.powers[pw_emeralds] = 127
			P_DoSuperTransformation(mo.player, true)
		end
		mo.health = 9999
	end
end, MT_PLAYER)
AWESOME!!
Also, is there a way to make sure the bot's rings don't run out?
GreenKnight9000 is offline   Reply With Quote
Old 05-21-2017   #4
Rumia1
Backseat Developer
 
Rumia1's Avatar
Default

The way the Lua script is set up, the bot's rings should never run out due to the fact that it's checking every frame to see if the player object is a bot, and if so it sets the ring count to 9999 instead of decreasing every second.
__________________
Quote:
Originally Posted by Cirno
Egguman-senpai...
Rumia1 is offline   Reply With Quote
Old 05-21-2017   #5
GreenKnight9000
 
GreenKnight9000's Avatar
Default

Quote:
Originally Posted by Rumia1 View Post
The way the Lua script is set up, the bot's rings should never run out due to the fact that it's checking every frame to see if the player object is a bot, and if so it sets the ring count to 9999 instead of decreasing every second.
but every 50 seconds, the character reverts and transforms again D:
GreenKnight9000 is offline   Reply With Quote
Old 05-21-2017   #6
Lach
Latch? Lock?? Lack???
 
Lach's Avatar
Default

Quote:
Originally Posted by GreenKnight9000 View Post
but every 50 seconds, the character reverts and transforms again D:
Oh, you're right. When I tested it without the 9999 part, the bot's ring count ticked down every second, and when I tested it with the 9999 part, it remained at 9999. So I guess the bot just neglects its health counter somehow?

Since giving the bot rings increments Player 1's health, and modifying the health stat of the bot doesn't seem to affect how long it stays super, I'm unfortunately going to have to assume this can't be fixed. Sorry.
Lach is online now   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 03:54 AM.


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