Does anyone know how to spawn weapons/items when triggered? The only way I can think of right now is to make an invisible func_breakable, but these create gibs and sound when broken. I want the weapons to drop to the floor, so a game_player_equip isn't really feasible (it also can't be parented or enabled/disabled...)
1
Re: Spawn weapons on demand
Posted by Leperous on Mon Jan 10th at 10:50pm 2005

Leperous
member
3382 posts
788 snarkmarks
Registered: Aug 21st 2001
Location: UK
Occupation: Lazy student
Posted by Leperous on Mon Jan 10th at 10:50pm 2005
Leperous
member
3382 posts
788 snarkmarks
Registered: Aug 21st 2001
Location: UK
Occupation: Lazy student
Re: Spawn weapons on demand
Posted by Bobv on Mon Jan 10th at 10:54pm 2005
Posted by Bobv on Mon Jan 10th at 10:54pm 2005
What if you had the weapons in glass boxes so the player could see but
not touch, at the push of a button the bottom of this glass box
(func_door) opens, and the weapon drops down..... it'll be like a
vending machine 
Re: Spawn weapons on demand
Posted by Orpheus on Mon Jan 10th at 11:30pm 2005

Orpheus
member
13860 posts
1547 snarkmarks
Registered: Aug 26th 2001
Location: Long Oklahoma - USA
Occupation: Long Haul Trucking
Posted by Orpheus on Mon Jan 10th at 11:30pm 2005
there is a prefab at PFL. unseth made it. when you open the door an item spawns, close it and open it again, a different item spawns.
at least, thats what i was informed of. perhaps you can adapt the idea from HL1 to HL2?
Orpheus
member
13860 posts
1547 snarkmarks
Registered: Aug 26th 2001
Location: Long Oklahoma - USA

Occupation: Long Haul Trucking
Re: Spawn weapons on demand
Posted by Leperous on Tue Jan 11th at 12:32am 2005

Leperous
member
3382 posts
788 snarkmarks
Registered: Aug 21st 2001
Location: UK
Occupation: Lazy student
Posted by Leperous on Tue Jan 11th at 12:32am 2005
Well, I had a look at it and it uses a monster_maker to spawn weapons.
Unfortunately, it would seem that trying to get an npc_maker to spawn a weapon causes the game to crash 
Leperous
member
3382 posts
788 snarkmarks
Registered: Aug 21st 2001
Location: UK
Occupation: Lazy student
Re: Spawn weapons on demand
Posted by Rof on Tue Jan 11th at 1:10am 2005
Posted by Rof on Tue Jan 11th at 1:10am 2005
Use point_template and env_entity_maker.
You make your inital entity, and set the "Template XX" field of a point_template to it's name.
Then you set the env_entity_maker's "Point_template to spawn" to the name of the point_template, and you can fire the env_entity_maker's "ForceSpawn" input to spawn an item.
Works with every entity I tried with it, anyway. Weapons, oilbarrels, rollermines, etc.
What's really cool is you can spawn mutiple entites at once (using the various
Template fields of point_template), and they'll keep working.
i.e. you can spawn a func_physbox that has a phys_thruster and an env_spark parented to it, and all I/O connections etc. will still work.
You make your inital entity, and set the "Template XX" field of a point_template to it's name.
Then you set the env_entity_maker's "Point_template to spawn" to the name of the point_template, and you can fire the env_entity_maker's "ForceSpawn" input to spawn an item.
Works with every entity I tried with it, anyway. Weapons, oilbarrels, rollermines, etc.
What's really cool is you can spawn mutiple entites at once (using the various
Template fields of point_template), and they'll keep working.
i.e. you can spawn a func_physbox that has a phys_thruster and an env_spark parented to it, and all I/O connections etc. will still work.
Re: Spawn weapons on demand
Posted by Leperous on Wed Jan 12th at 10:35pm 2005

Leperous
member
3382 posts
788 snarkmarks
Registered: Aug 21st 2001
Location: UK
Occupation: Lazy student
Posted by Leperous on Wed Jan 12th at 10:35pm 2005
Excellent, thanks
This will even help with my Combine prison pod problems!
The only problem is that the weapons will keep respawning, but that can be easily fixed with some sort of trigger that kills them soon after.
Leperous
member
3382 posts
788 snarkmarks
Registered: Aug 21st 2001
Location: UK
Occupation: Lazy student
1
© Snarkpit.net 2001 - 2023, about us, donate, contact
Snarkpit v6.1.0 created this page in 0.0091 seconds.

Snarkpit v6.1.0 created this page in 0.0091 seconds.


