• How would you go about making an autospawner for vehicles, NPCs, entities, and weapons?
    3 replies, posted
Title pretty much says it all, just wanting to know how you would go about doing this. I'm not saying anyone has to write out all the code for me, but if you can help explain it to me that'd be nice. I have the prop autospawner down, but I don't think that would apply to everything else listed in the title, thanks if you can help, if not, then don't bother replying. Unless you have resources I can use. (Ex. Links) Thank you! - Devin
[QUOTE=devincm;41273545]I have the prop autospawner down, but I don't think that would apply to everything else listed in the title[/QUOTE] If you have code that is spawning "props" using something like ents.Create("prop_physics") then you just need to change prop_physics to your other entity types, like ents.Create("npc_zombie") or ents.Create("weapon_rpg") etc.
While playing in singleplayer you can look at a vehicle and type this into your console to get its class name. lua_run print( player.GetByID(1):GetEyeTrace().Entity:GetClass() ) Your existing prop spawning script is probably spawning entities of the class prop_physics.
[QUOTE=wh1t3rabbit;41273987]If you have code that is spawning "props" using something like ents.Create("prop_physics") then you just need to change prop_physics to your other entity types, like ents.Create("npc_zombie") or ents.Create("weapon_rpg") etc.[/QUOTE] Helpful. Thank you.
Sorry, you need to Log In to post a reply to this thread.