1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

MapLoaders

Discussion in 'Modding Help' started by FunATuns, Mar 14, 2015.

  1. FunATuns

    FunATuns Builder Carry Donator

    Messages:
    114
    Hi, I'm trying to make a spawn-able workshop and I cant seem to figure out how to add it to the map Loader.
    The Workshop is in the Entities\Natural folder. Thanks!
    -FunATuns
     
    Last edited: Mar 14, 2015
  2. Skinney

    Skinney THD Team THD Team Forum Moderator Tester

    Messages:
    468
    Your first step is to create a new unique color for your blob.
    Code:
    const SColor my_color_name(/*my_color*/);
    
    /*
        SColor can be either;
        Hexadecimal, eg:  SColor hex(0xFF0F0F0F);
        Decimal, eg: SColor dec_argb(255, 15, 15, 15);
    
        Use whatever makes more sense to you.
    */

    After you've created your unique color you will want to add a conditional statement with your new color.
    Code:
    else if(pixel == my_color_name)
    {
        spawnBlob(map, "your_blob_name", offset, 255);
    }
    /*
        Plug this conditional statement into the already present series of statements.
    */

    Once you've done all of the above it's just a matter of adding your new color to your custom map.
     
  3. FunATuns

    FunATuns Builder Carry Donator

    Messages:
    114
    Thanks Skinney, Do I put the name of the blob or the name of the folder on my_color_>name<? Thnaks for responding so quickly!
    -FunATuns
     
  4. Skinney

    Skinney THD Team THD Team Forum Moderator Tester

    Messages:
    468
    It's entirely up to you, you're just setting the name for the variable you're declaring so you can easily reference it in your conditional statement.
    Code:
    int my_first_variable = 0;
    my_first_variable += 1;
    
    print(" my_first_variable = "+my_first_variable);
    // my_first_variable = 1
     
  5. FunATuns

    FunATuns Builder Carry Donator

    Messages:
    114
    Oops, I didn't notice that that was going to be referenced down there! Thanks though, how is bunnyfection coming along? By the way, do you know of a onhit hook by any chance? Thanks
    -FunATuns
     
    Last edited: Mar 15, 2015