SRB2 Message Board  

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

Reply
 
Thread Tools
Linedef Executor - Change Skybox (skyboxchange.lua) Details »»
Linedef Executor - Change Skybox (skyboxchange.lua)
Version: , by Monster Iestyn (Friendly Neighbour-Hood) Monster Iestyn is offline
Developer Last Online: Aug 2018

Category: Version: SRB2 Rating: (2 votes - 3.80 average)
Released: 12-20-2014 Last Update: Never Installs: 2
Scripts Re-Useable Content

I bet a number of people around have been puzzled by the fact we have linedefs for changing sky and weather ...but not skyboxes? Naturally I've gone and made a script to redeem this heinous crime against SRB2 modding!

Set-up instructions:
  • Plonk the Lua script linked below into a wad for your level, with a lump name like LUA_MAIN, LUA_FUN or LUA_LOL, doesn't matter at all except for the "LUA_" bit
  • Set up your skyboxes each with their own skybox viewpoints, making sure to pay attention to the order you place the skybox viewpoints! Note that the last skybox viewpoint is the first one that will be used on map load.
  • Set up a linedef executor involving linedef type 443 - this should have a front upper texture of name "SETSKYBX".
  • Front x offsets of the linedef determine the "skybox id" of your skybox to switch to - x offsets of 1 sets it to the first skybox viewpoint you placed on the map, 2 to the second viewpoint etc.
  • By default, the skybox change will affect only the player that triggered the linedef executor (does not do anything if not a player). If the Not Climbable flag is checked on the skybox change linedef however, the skybox change will affect ALL players! (It doesn't matter what triggers the linedef if so).
  • Do be warned that deleting Things placed before the Skybox viewpoints can potentially lead to your level editor automatically re-ordering the viewpoints' Thing numbers. This could have dire consequences.

A test map (at MAP01) and gif of the script in action are also attached below; note that the test map already has the script within as the "LUA_SKYB" lump. Some commenting is provided in the Lua script to help understand what's going on. (may be useful for Lua scripting peoples!)

Credit to Jay (known as Spiny on IRC) for helping me test the script out.

Download Now

File Type: zip skyboxchange-test.zip (4.5 KB, 305 views)
File Type: lua skyboxchange.lua (2.7 KB, 309 views)

Screenshots

Click image for larger version

Name:	srb20063.gif
Views:	610
Size:	3.06 MB
ID:	5948  

Show Your Support

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

Comments
Old 12-21-2014   #2
Prime 2.0
Grape flavored
Administrator
 
Prime 2.0's Avatar
Default

Mind providing the test map pictured in the gif?
__________________
Science tells us that nothing can be proven, only rendered more likely to be true. If we do not question what we already know, how can we know, much less admit, when we're wrong? Such things are vital to progress.
Prime 2.0 is offline   Reply With Quote
Old 12-21-2014   #3
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

...welp, I'll see if I can contact Spiny about that. Alternatively, maybe I can make my own test map I guess?
__________________
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record. Also, it's pronounced "Yes-tin".
Monster Iestyn is offline   Reply With Quote
Old 12-22-2014   #4
MascaraSnake
aka SpiritCrusher
Moderator
 
MascaraSnake's Avatar
Default

Sure, any test map is fine.
MascaraSnake is offline   Reply With Quote
Old 12-26-2014   #5
Monster Iestyn
Friendly Neighbour-Hood
Moderator
 
Monster Iestyn's Avatar
Default

Done, created my own test map and added a new gif showing said map in action.
__________________
My page stuffed full of MIDI goodness!
The Hitchhiker's Guide to the Robo-Hoodiverse
Timeline of Sonic Robo Blast History!

That's an uppercase i, not a lowercase L, for the record. Also, it's pronounced "Yes-tin".
Monster Iestyn is offline   Reply With Quote
Old 12-26-2014   #6
Sryder13
'That brit'
Judge
 
Sryder13's Avatar
Default

This all seems to work, so I'll move it into releases for you.
__________________
Quote:
<MonsterIestyn> try ctrl+f masturbation and get to the point
Sryder13 is offline   Reply With Quote
Old 12-26-2014   #7
TehRealSalt
Ya Gal Sal Here (σᴥσ)
Judge
 
TehRealSalt's Avatar
Default

Good job! I don't really need this for now, but it's definitely good to know that this is here for whenever I do need it.

Nice, the test map takes places in a Holographic Laser Cage of the Future Age™.
__________________
THZ Discord | Twitter | Tumblr
TehRealSalt is offline   Reply With Quote
Old 12-28-2014   #8
VirtualBlitz546
The infractions whore ;)
 
VirtualBlitz546's Avatar
Default

This will help WORLD! r8 100 out of 10
__________________
Quote:
<TheDoctor> Mlg? My lovely Gangster? Mega Lick Grope?
<ChaosX79> My Long Gabba
VirtualBlitz546 is offline   Reply With Quote
Old 02-08-2016   #9
Zwip-Zwap Zapony
Please just call me Zappy.
 
Zwip-Zwap Zapony's Avatar
Default

Quote:
Originally Posted by Larztard View Post
Sorry for the bump but how does this work for other players? If Player 'A' activates the skybox change, will it affect Player 'B' who hasn't activated the skybox change? Or will they view the previous skybox it was already set to?
Well, I think that you can choose whether player A's activation will affect just player A or all players, judging by the description.
Quote:
Originally Posted by Monster Iestyn
By default, the skybox change will affect only the player that triggered the linedef executor (does not do anything if not a player). If the Not Climbable flag is checked on the skybox change linedef however, the skybox change will affect ALL players! (It doesn't matter what triggers the linedef if so).
Zwip-Zwap Zapony is offline   Reply With Quote
Old 02-08-2016   #10
Larztard
 
Larztard's Avatar
Default

Quote:
Originally Posted by Zwip-Zwap Zapony View Post
Well, I think that you can choose whether player A's activation will affect just player A or all players, judging by the description.
Yeah, as soon as you posted I just deleted my post because I had just read the description.
__________________
YouTube
Larztard 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 10:04 AM.


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