SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Releases > Lua

Reply
 
Thread Tools
Keep Rings and Shields between levels (KeepStatus.lua) Details »»
Keep Rings and Shields between levels (KeepStatus.lua)
Version: 1.2, by FuriousFox (AKA FuriousFox) FuriousFox is offline
Developer Last Online: Sep 2017

Category: Version: SRB2 Rating: (2 votes - 3.80 average)
Released: 02-14-2016 Last Update: Never Installs: 2
Scripts Re-Useable Content

This LUA script will enable you to keep your rings and shields after finishing a level. You will automatically start the next level with whatever you had at the end of the previous level. Works in Co-Op too!

v1.0
Initial Release

v1.1
Fixed compatibility with NiGHTS Special Stages, spectators, custom exits, end of round in Match/CTF, and manual map changes.

v1.2
Fixed a "rings" variable not belonging to a player
Fixed problem where you received extra lives after grabbing a ring when starting a level with over 100 rings

Download Now

File Type: lua KeepStatus.lua (915 Bytes, 438 views)

Screenshots

Click image for larger version

Name:	srb20000.gif
Views:	393
Size:	4.18 MB
ID:	7469  

Supporters / CoAuthors

Show Your Support

  • The author of this addon has given explicit permission for its content to be re-used and/or reproduced.

Comments
Old 02-14-2016   #2
Wolfy
wolfs
Developer
 
Wolfy's Avatar
Default

Already tested and confirmed working online and offline, so welcome to releases!
__________________
Quote:
[23:56:36] <SM-MaxX> prisma illya is a gift to this impure earth and a shining beacon for all anime
Wolfy is offline   Reply With Quote
Old 02-14-2016   #3
Larztard
Yeah...
 
Larztard's Avatar
Default

This looks neat. I'll check this out whenever I get the chance.
__________________
YouTube
Larztard is offline   Reply With Quote
Old 02-14-2016   #4
FuriousFox
AKA FuriousFox
Developer
 
FuriousFox's Avatar
Default

Just did a quick update to make the LUA work with NiGHTS Special Stages and gametypes that have spectators. Also made it so your rings and shields carry over even when the "exiting" state doesn't happen, such as custom exits, end of round in Match/CTF, and manual map changes.
FuriousFox is offline   Reply With Quote
Old 02-14-2016   #5
Knux576
Neighborhood Memer
 
Knux576's Avatar
Default

I found that if you end a level with 100 rings, once you enter the next level it will award you with an extra life. I don't know how fixable this is but it's pretty silly.
Knux576 is offline   Reply With Quote
Old 02-15-2016   #6
FuriousFox
AKA FuriousFox
Developer
 
FuriousFox's Avatar
Default

Quote:
Originally Posted by Knux576 View Post
I found that if you end a level with 100 rings, once you enter the next level it will award you with an extra life. I don't know how fixable this is but it's pretty silly.
Probably not. I remember Sonic 3 & Knuckles having similar problems when entering the boss part of Lava Reef Act 2.
FuriousFox is offline   Reply With Quote
Old 02-15-2016   #7
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

Sounds like you may want to mess with "player.xtralife" - it's a counter to check how many lives have already been given through collecting 100 rings, 200 rings, etc.

EDIT: on an unrelated note, what is "rings != 0" in line 3 all about? "rings" is not the name of a standalone variable that exists in the context of your script, so it'll be seen as "nil" until given a value ...and so "rings != 0" will always be true. May as well get rid of that condition, unless of course you meant to write "player.rings" instead.

Last edited by Monster Iestyn; 02-15-2016 at 02:00 AM.
Monster Iestyn is offline   Reply With Quote
Old 02-17-2016   #8
FuriousFox
AKA FuriousFox
Developer
 
FuriousFox's Avatar
Default

Quote:
Originally Posted by Monster Iestyn View Post
Sounds like you may want to mess with "player.xtralife" - it's a counter to check how many lives have already been given through collecting 100 rings, 200 rings, etc.

EDIT: on an unrelated note, what is "rings != 0" in line 3 all about? "rings" is not the name of a standalone variable that exists in the context of your script, so it'll be seen as "nil" until given a value ...and so "rings != 0" will always be true. May as well get rid of that condition, unless of course you meant to write "player.rings" instead.
Done and done. v1.2 addresses both of these.
FuriousFox is offline   Reply With Quote
Reply

Thread Tools

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 05:44 PM.


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