Results 1 to 5 of 5

Thread: The Blocks Builder

    1. The Blocks Builder Details »

      The Blocks Builder

      Version: 3.0, by (Member) LJ Sonic is offline
      Developer Last Online: Sep 2016
      Category: [Script] SRB2 Version: v2.1.x   Rating:  (1 votes - 5.00 average)
      Submitted: April 30th, 2014  
      WAD File Contains Lua Level(s)

      This is the script used by the Blocks Builder.
      If you don't know what it is, you can read the original thread: http://srb2skybase.org/mb/showthread...7631#post27631

      You are free to use and even modify it in your own mods.

      The Blocks Builder itself is basically a thinker that you activate on level load that will act on a group of FOFs depending on player's actions.
      Here we'll try making a 4 * 4 * 4 Blocks Builder.

      You have first to create a map where you create a in-level grid where every sector has a different tag:
      SectorsGrid.png
      Numbers are the sector tags. Of course your grid may be bigger, and you may start with another tag, as long as the order is the same.
      Note that every sector geometry should be identical, and should be a square.

      You have now to create a FOF for each potential block.
      You can know how many FOF you'll have to make using this expression:

      n = x * y * z * types

      where n is the number of FOFs, x-y-z the dimensions of the building slot (ex: 16*16*16 blocks), and types how many different kinds of blocks the player will be able to place. n cannot exeed 32768.

      The tags given to the control sectors are irrevelant (at least it is for this script), however there is something very important: the tags of the lines and the indexes of the sectors have to be increased by 1 for each new FOF, the tag starting from the top-left sector tag on the previous grid, and coming back to this value every time it reaches the bottom-right sector tag on the grid.
      Sorry if it's not very easy to understand, I'll still try to give you an example:
      FOFs.png
      Here the lines are tagged from 1 to 64, since our grid had 4 * 4 * 4 = 64 blocks, and their indexes numbers are raising from left to right.
      Note: as you need many control sectors, it is preferable to create unclosed sectors, with only one line per sector.

      Once you made that, just copy-paste the sectors (use Sectors Mode) as until you have a group of line for each kind of block. Don't change their tags, just change their apparence / effect.

      Now you just have to create a double-sided linedef executor "BLOCKSBUILDERTHINKER" called on level load. Refer to the header of the script to know how to setup the Blocks Builder thinker.

      If you need more examples, you could check the maps from the official Blocks Builder.

      Downloads


      Additional Notes

      • Please be mindful of using other people's works. If the modification is not marked as "Re-usable Content", ask the developer for permission before using their work in your mod.

  1. #2
    Join Date
    March 31st, 2013
    Location
    In a closet.
    Posts
    206
    Level
    30
    I might try this out later.
    SRB2 Name: Professor-Hedgehog
    SRB2 Server Name: The Professor's Lab
    SRB2 Projects:
    S1RB (Sonic 1 Mod - Reboot)

  2. #3
    Join Date
    November 14th, 2012
    Posts
    77
    Level
    13
    I'd just like to say that this mod is a script and doesn't feature any map (it's a *.lua file).
    I like making Lua scripts and mapping for srb2. Don't hesitate with asking help from me !
    Recent project:

  3. #4
    Join Date
    March 25th, 2010
    Posts
    1,442
    Level
    58
    It might be a good idea to provide an example map along with the script.
    Quote Originally Posted by SRB2
    <Mystyc Cheez> I ****ING QUIT
    Mystyc Cheez left the game
    <~Sky> Am I too awesome or something?
    <X\Wind> Why is everyone on red...
    <X\Wind> Is Sky that awesome?
    Quote Originally Posted by Steam
    20:48 - Sky: one does not simply ban him
    20:49 - Wind: we must gather the chaos emeralds and blast him

  4. #5
    Join Date
    November 14th, 2012
    Posts
    77
    Level
    13
    You're right, I think I'll do that today.
    But I still think it would be more appropriate to move this to Miscellaneous, since the (coming) sample map won't be the point of this thread.
    I like making Lua scripts and mapping for srb2. Don't hesitate with asking help from me !
    Recent project:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •