Pre-caching models

Discussion in 'Mapping Questions & Discussion' started by Faux Rhinoceros, May 1, 2017.

  1. Faux Rhinoceros

    aa Faux Rhinoceros Also known as Dr. Element

    Messages:
    1,470
    Positive Ratings:
    1,363
    While working on a custom Demoman robot, i stumbled over an attribute called "Custom projectile model".

    Naturally, i immediately set forth to implement it. This is what it looks like in the .pop file:

    Code:
    ItemAttributes
                {
                    "custom projectile model" "models/props_2fort/frog.mdl"
                }
    Now, this works for some models. Most notably, it works with the bomb model used for the flag in MvM.

    The problem is that this model is turning the wrong way when it comes out of the barrel, so i went to try some other models (There's a plain bomb in the decker pack that happens to face the right direction). However, most models instantly crash my game when the demoman starts firing, leaving me with this error message:

    [​IMG]

    My best hypothesis would be that it tries to use a model before the game has loaded it into memory, but i honestly have no clue. I tried placing the prop in my map in an attempt to cache it (whatever that means), but that didn't do anything.

    Any idea how this may be solved?
     
  2. Diva Dan

    aa Diva Dan hello!

    Messages:
    813
    Positive Ratings:
    1,223
    Try placing a prop down of different type, I think prop_physics_override or props_physics_multiplayer work, something like that. It should appear invisible in game once you compile the map
     
    • Like Like x 1
  3. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,817
    Positive Ratings:
    4,658
    Pretty sure it needs to be placed as a prop_dynamic
     
    • Like Like x 1
    • Agree Agree x 1
  4. Faux Rhinoceros

    aa Faux Rhinoceros Also known as Dr. Element

    Messages:
    1,470
    Positive Ratings:
    1,363
    That worked. Thank you both!

    Now, do you reckon it's possible to change the origin and orientation of the fired projectile somehow? Whenever my demoman fires a shot, the bomb model is launched in an upright position and it twirls around a point outside the model itself. Currently using the mortar from the frontline pack.
     
    Last edited: May 2, 2017
  5. Diva Dan

    aa Diva Dan hello!

    Messages:
    813
    Positive Ratings:
    1,223
    Not without using a different model. Most models come with their origin point on the very bottom center except for a few exceptions like the pass time jack or some hats and other projectiles. It takes some browsing of the model viewer
     
  6. Faux Rhinoceros

    aa Faux Rhinoceros Also known as Dr. Element

    Messages:
    1,470
    Positive Ratings:
    1,363
    Yeah, yeah. I know i am asking for sorcery.

    Oh well. Time to reinstall 3ds max i guess.
     
  7. Micnax

    aa Micnax I maek map

    Messages:
    2,018
    Positive Ratings:
    1,338
  8. Faux Rhinoceros

    aa Faux Rhinoceros Also known as Dr. Element

    Messages:
    1,470
    Positive Ratings:
    1,363