I'm trying to write a script that spawns script_models at a location and then launches them randomly. The models are smoke bombs by the way so I'm trying to make it look like they are being thrown. I can't seem to make the model spawn and I also can't get PhysicsLaunch() to make the model move. (it just drops to the ground like no force is being applied to it ).
In order to spawn models they need to be prechached before load::main() is called, which is why most people do prechache calls before zombiemode::main() call since that's where it's called for zombiemode. Move your prechache call and it should help.
Also I'm on my phone but I remember there being more parameters to physicslaunch? But maybe their optional idk?
As a final note how do you know the effects of your physicslaunch if you can't get the model to spawn?
For the not spawning part I would check that this is defined:
Code Snippet
Plaintext
level.gas_grenade_spawner.origin
If it isn't then maybe thats why it isn't spawning. If it is, I would do two things to your physics, change the origin, and increase the shit out of it.