SRB2 Message Board  

Go Back   SRB2 Message Board > Archived > Outdated Releases (2.1.X) > Lua (2.1.X)

 
 
Thread Tools
Linedef Executor - Change Skybox (skyboxchange.lua) Details »»
Linedef Executor - Change Skybox (skyboxchange.lua)
Version: , by Monster Iestyn (Fangtastic) Monster Iestyn is offline
Developer Last Online: Aug 2020

Category: Version: SRB2 Rating: (3 votes - 4.20 average)
Released: 12-20-2014 Last Update: Never Favourites: 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, 432 views)
File Type: lua skyboxchange.lua (2.7 KB, 468 views)

Screenshots

Click image for larger version

Name:	srb20063.gif
Views:	813
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
Permanently Banned
Default

Mind providing the test map pictured in the gif?
Prime 2.0 is offline  
Old 12-21-2014   #3
Monster Iestyn
Fangtastic
Administrator
 
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  
Old 12-22-2014   #4
MascaraSnake
Retired
 
MascaraSnake's Avatar
Default

Sure, any test map is fine.
MascaraSnake is offline  
Old 12-26-2014   #5
Monster Iestyn
Fangtastic
Administrator
 
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  
Old 12-26-2014   #6
Sryder
'That brit'
Judge
 
Sryder's Avatar
Default

This all seems to work, so I'll move it into releases for you.
Sryder is offline  
Old 12-26-2014   #7
TehRealSalt
(σᴥσ)
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™.
__________________
Twitter | Not really around here anymore, working on my indie game over at Patreon
TehRealSalt is offline  
Old 12-28-2014   #8
VirtualBlitz546
 
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  
Old 02-08-2016   #9
Zwip-Zwap Zapony
 
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  
Old 02-08-2016   #10
Larz T
Siced
 
Larz T'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.
__________________
Quote:
Originally Posted by MaykeAdventuresZForever View Post
I been playing this since I was 9 years old and all I felt was anger.
YouTube

Avatar art done by TehRealSalt
Larz T is offline  
 

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 08:43 PM.


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