OfficerJohnson Posted January 26, 2018 Share Posted January 26, 2018 Hello again. I'm just curious if this is necessary or just a good programming practice when spawning models, animations, or speech audio? I've seen it used a couple of times, preferably in a loop. And to make this two questions and save forum space... When we request one of these things, we are putting it in memory, correct? So, if we want to take it out of memory, we use STREAMING::SET_ENTITY_AS_NO_LONGER_NEEDED? This should allow the entity to phase out of existence if it's dead or out of draw distance, right? In other words, I'm trying to understand how we keep and remove entities once we want to use and are finished using them. What then would keep them in memory (persistent)? Because, currently, that is my current problem. Link to comment Share on other sites More sharing options...
Jitnaught Posted January 27, 2018 Share Posted January 27, 2018 In SHVDN it is not necessary if you are using the built-in functions (e.g. World.CreateVehicle) as they include the code to request the model/dictionary/etc. If you're using natives then yes you would have to request the model/dictionary/etc. Yes that's exactly what that function does (MarkAsNoLongerNeeded() in SHVDN). To keep an entity persistent set IsPersistent to true (which uses the SET_ENTITY_AS_MISSION_ENTITY native). Link to comment Share on other sites More sharing options...