replacing the crocodile model with another prop for func_croc

Discussion in 'Mapping Questions & Discussion' started by basilhs333, Jan 14, 2019.

  1. basilhs333

    basilhs333 L9: Fashionable Member

    Messages:
    645
    Positive Ratings:
    179
    Hey guys.
    In short , I would like to replace the crocodile model for a different one for sharkbay but i dont know how.
    Func_croc only makes a crocodile appear. it doesnt have any other options. Someone told me to rewrite the code of func_croc for the map but I am not sure how this is possible.
    Any ideas?
     
  2. Da Spud Lord

    aa Da Spud Lord L0: Crappy Member

    Messages:
    940
    Positive Ratings:
    649
    I think the model is models/props_island/crocodile/crocodile.mdl. Specifically, I'd guess the "attack" animation is used. Try overriding that model and animation in your map's custom files.
     
    • Thanks Thanks x 1
  3. basilhs333

    basilhs333 L9: Fashionable Member

    Messages:
    645
    Positive Ratings:
    179
    yea but how exactly do i do that? thats my main question
     
  4. Da Spud Lord

    aa Da Spud Lord L0: Crappy Member

    Messages:
    940
    Positive Ratings:
    649
    Make the model, give it the same filename and filepath as the crocodile model, and pack it into your map. That should work, I think, although I've never tried this before so I can't be sure.
     
  5. Asd417

    aa Asd417 L1: Crook

    Messages:
    972
    Positive Ratings:
    697
    Model packing to replace the existing one doesn’t always work.
     
  6. Izotope

    aa Izotope Never releases maps

    Messages:
    637
    Positive Ratings:
    624
    Only works for players who play on this map first, and then that model is cached for all maps after this, until you restart or recache.
     
  7. basilhs333

    basilhs333 L9: Fashionable Member

    Messages:
    645
    Positive Ratings:
    179
    so lets say i make a trigger multiple which if you touch it a shark comes and does the animation of jumping like the crocodile, would that be the next logical solution? but of course i should have at least 8 shark with the trigger for each possible space of water available.
    Should I go with that solution or is there anything better?
     
  8. ics

    aa ics http://ics-base.net

    Messages:
    759
    Positive Ratings:
    476
    Overwriting existing model with some packed model within map is no good. Anyone who runs that map on a server, will crash or even the clients crash to desktop.
     
    • Thanks Thanks x 1
  9. AsG_Alligator

    aa AsG_Alligator trigger_hiss

    Messages:
    459
    Positive Ratings:
    963
    I did ask Eric about a model selection option for the entity but alas they did not add it. They only added OnEat outputs.
     
  10. Da Spud Lord

    aa Da Spud Lord L0: Crappy Member

    Messages:
    940
    Positive Ratings:
    649
    Env_entity_maker possesses the ability to spawn its point_template at a specified entity via the ForceSpawnAtEntityOrigin input. Perhaps you could just do one trigger_multiple with the OnStartTouch > env_entity_maker > ForceSpawnAtEntityOrigin > !activator.
     
  11. Da Spud Lord

    aa Da Spud Lord L0: Crappy Member

    Messages:
    940
    Positive Ratings:
    649
    Here, I managed to do it: Using the above method, I managed to create a system that nearly replicates the functionality of func_croc, but allows for customizability in the model and animation that is used. The testing map below has two versions of this: A purely model-based version that plays a model's (currently the default crocodile, can be swapped out for any animated model) attack animation as the jumping animation, as well as a second version that uses a func_movelinear to make a model without a jumping animation (in my case, a sword) jump up and down. All entities are removed after their animations are done, and multiple sets of entities won't interfere with each other.

    Also, I have no idea why the crocodiles are shiny.
     

    Attached Files:

    • Thanks Thanks x 2
  12. basilhs333

    basilhs333 L9: Fashionable Member

    Messages:
    645
    Positive Ratings:
    179
    okay So i tested it and I replaced the crocodile with the shark and it works phenomenaly! Thank So much for your time and work. I will use your logic on my map and I will give you credit on the next update. thanks again so much.
     
    • Like Like x 1
  13. ficool2

    ficool2 L4: Comfortable Member

    Messages:
    195
    Positive Ratings:
    152
    It is possible to override the model of an entity_croc directly (this works for *any* entity however except players) without using the BSP-packing method, with some caveats:
    - Animation length and amount must be the same, and the hitbox/collision will not change
    - The method itself can be confusing and complicated on your first tries

    If this method will suit you, then PM me and I'll explain it
     
    Last edited: Jan 17, 2019
  14. basilhs333

    basilhs333 L9: Fashionable Member

    Messages:
    645
    Positive Ratings:
    179
    no need to. I tried Da Sputd Lord's Logic and it worked with no problems at all. thank you for helping though ;)
     
  15. Izotope

    aa Izotope Never releases maps

    Messages:
    637
    Positive Ratings:
    624
    Or I don't know, post the information here for everyone to see?
     
    • Thanks Thanks x 1
  16. basilhs333

    basilhs333 L9: Fashionable Member

    Messages:
    645
    Positive Ratings:
    179
    Hmmmm there is a post on the top saying: okay So i tested it and I replaced the crocodile with the shark and it works phenomenaly!........