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

Land shark

Discussion in 'Requests' started by RadioActive, Sep 20, 2015.

Tags:
  1. RadioActive

    RadioActive Guest

    Hello.
    I need someone to change the behavior of sharks. All I want is to make them land animals. I know it probably sounds weird but yeah - I need sharks to move smoothly on the ground, follow players and attack them when close.
    Animation will be weird but it won't be a problem.

    I was trying on my own to do something with this:
    $movement_factory = generic_movement
    @$movement_scripts = LandAnimal.as;

    but nothing worked. I am just total n00b to make it work :rektlord:.

    It would be also cool if players were not able to pick them up and sit on them but that's not that much important.
    Thanks.
     
  2. RadioActive

    RadioActive Guest

    Bisons are bigger, they do not have chomp animation, can be tamed and ridden and i believe it would be little bit harder to make them smaller and add more frames. Sharks are perfect for what I am trying to achieve, just need them to move on the ground, not just to jump.

    E: I am pretty sure it's really simple to do for someone who know how2mod.
     
    Last edited by a moderator: Sep 20, 2015
  3. RadioActive

    RadioActive Guest

    Bison is one block higher, he can not get through 2 block high tunnels / doorway. I need this to make a mob for my maze "gamemode", got sprites ready. The only thing missing is what i am asking for. I forgot how stupid sharks are when they are out of the water.
    Btw. I found out how to resize bison's collision mask but it does not make sense anyway. I just need a fu:anger:ng land shark!
    --- Double Post Merged, Sep 22, 2015, Original Post Date: Sep 20, 2015 ---
    Anyone goddamnit? Or at least some tips how to remove bison's taming and riding. I think I know how to resize its mask collision and sprite size. Just need him to be more aggressive. :rektlord:
     
  4. Pirate-Rob

    Pirate-Rob Haxor Staff Alumni Tester

    Messages:
    270
    I'll give it a shot later today. It should hopefully be easy.
     
  5. RadioActive

    RadioActive Guest

    Thanks, Pirate Rob.
    To clarify all I need is to make a mob/animal walking and attacking people. Shark's size and animations are perfect - that's why I thought it would be easier to base on its files. All I had to do would be a new sprites.
    If it will be better to edit bison's files, then go ahead.
     
  6. Pirate-Rob

    Pirate-Rob Haxor Staff Alumni Tester

    Messages:
    270
    Finished.
    Based off bison. I tried it as a shark and it just flew it the air constantly. If you need any changes let me know ;)
     

    Attached Files:

    RadioActive likes this.
  7. sangfroid

    sangfroid What is your raison d'ĂȘtre? Forum Moderator Staff Alumni Tester

    Messages:
    29
    How about this? Why make a shark that acts as a land animal when you can have a beer that uses the current shark code but instead of hurting players it makes them inebriated to a state similar to being on fire?
    #college
     
    RadioActive likes this.
  8. RadioActive

    RadioActive Guest

    !!!!!!
    Yes, exactly as I wanted it to be! Thank you so much!
    Now I just have few questions and one problem which is adding it on the map. Every block, animal and object has its own color which is used when you create a map. It would be cool if this landshark has its own, but I guess if I change file names and "landshark" word in these files to "shark", it will be ok and it will use shark's color, right?
    Another question is its size. Let's say I want to make a new mob based on landshark cfg and as files, but bigger (longer). All I have to do is to change these values:

    s32_sprite_frame_width = 64
    s32_sprite_frame_height = 32


    and this:

    #block_collider
    @f32 verticesXY = 16.0; -4.0;
    48.0; -4.0;
    52.0; 0.0;
    48.0; 4.0;
    16.0; 4.0;
    12.0; 0.0;

    That's all? I think I know how to do it properly, just need to know if there's something else except this.
    Two more questions, not that much important:
    How to change Landshark's speed? Could not find anything in these two files.
    What exactly is this: f32 shape_mass = 1000.0
    More mass = harder to push him (using shield for example)?
    --- Double Post Merged, Sep 22, 2015, Original Post Date: Sep 22, 2015 ---
    Oh boi!
    [​IMG]
    I think I know what for is f32 shape_mass = 1000.0 now.
    Also collision mask is not exactly as it should be, but it will be!
    (For plebs reading this thread - with these colors I just tested if sprite textures are in the correct position, not cut, etc.)
     
    Last edited by a moderator: Sep 22, 2015
    PeggleFrank likes this.
  9. Pirate-Rob

    Pirate-Rob Haxor Staff Alumni Tester

    Messages:
    270
    I think you got that all right? Speed is controlled by LandAnimal.as I'm guessing.
    I'm not sure how mass works, but if it's too low, the creature will be able to fly ::P:
     
  10. RadioActive

    RadioActive Guest

    This mass thing is kinda weird but yeah, all problmes solved. I also figured out how to add different colors to the map palette, so no need of replacing shark :]
    Thank you, Rob!
    :heart:
     
    Pirate-Rob likes this.