Forum posts

Posted 17 years ago2007-01-27 23:41:50 UTC
in Location of Spawned Entities? Post #210872
Rotation is correct. It spawns 8-16 units higher (Z+), 16-32 units forward (X+), and 4-8 units right (Y+) of the env_entity_maker's origin.

It wouldn't be too bad, except I'm trying to get it to spawn onto a shelf/gun cabinet.
Posted 17 years ago2007-01-27 17:55:10 UTC
in Location of Spawned Entities? Post #210824
I'm creating a prefab for spawning weapons. I have the following:
  • An AK47 with 800 rounds (name: full_weapon_ak47) with an output set to "OnPlayerPickup, ForceSpawn full_weapon_entity_maker_&i) after 2 seconds"
  • A point_template (name: full_weapon_point_template_&i) with Template1 set to full_weapon_ak47
  • An env_entity_maker (name: full_weapon_entity_maker_&i) with the Point_template to spawn set to full_weapon_point_template_&i
  • A logic_timer (name: full_weapon_logic_timer_&i) set to fire full_weapon_entity_maker_&i initially to create the first weapon.
It works almost right. The weapon spawns initially, so the timer is working. When I pick up the weapon, another one spawns after 2 seconds.

The problem: the weapon doesn't spawn at any origin that I can determine. It doesn't spawn at the origin of its model, the origin of the env_entity_maker, the origin of the timer, or the origin of the point_template.

Is there some secret to forcing the spawn location? What have I missed?

Thanks!

[edit] There's absolutely NOTHING in the way of it spawning (nothing within a few hundred units).
Posted 17 years ago2007-01-13 14:35:35 UTC
in Launching and removing entities Post #209515
I'm working on a new CSS map, and as part of it I'd like to have certain func_physbox_multiplayer entities get spawned, travel, and get removed. En route, the player has the option of destroying the entities.

Here's what I have:
A logic_timer ("launch_timer") fires every 5 seconds.
An env_entity_maker ("launcher") takes input from the timer and spawns a template ("asteroid template")
A point_template ("asteroid template") has a func_physbox_multiplayer object ("asteroid") as Template 1
The func_physbox_multiplayer object ("asteroid") has a Strength of 1, enabling it to be destroyed when the player shoots it.

Everything seems to work fine. Every five seconds, an asteroid is spawned and travels (falls) to a point in the map. Unfortunately, if I don't shoot them they end up piling up.

My question: How do I force one of these asteroids to automatically go away on its own after a time? How do I kill each individual asteroid 10 seconds after it was launched without killing every asteroid on the map?

Thanks for any help you can provide!
-- GeodeLX