Triggers Are Wonderful Things
#8444 posted by
Preach on 2009/04/14 21:27:01
The thing that makes trigger_teleport and trigger_push fail is that both functions precache sounds during their spawnfunctions, an action which is illegal after the frames begin.
As luck would have it, there is a very easy fix in the case of the trigger_teleport. Set spawnflag 2 on your info_notnull. This is the SILENT flag, which means the file will not be precached. This does mean that you lose the ambient sound of the teleporter, but not the sounds when you actually teleport from it.
trigger_push is not so fortunate, so we have to work a bit harder. What we do is directly set the touch function ourselves, and then make the use function perform the trigger initialisation instead. The only other things that the trigger_push spawnfunction does is precache the sound, and set a default .speed on the entity.
The fields should look like:
use InitTrigger
touch trigger_push_touch
speed 1000
The problem with func_door is that .owner is already used for doors - it points to the master door. Even if you could construct an entity which has all the settings of a door except .owner equal to the player, you'd cause crashes as soon as you tried to open it. So a func_train or func_plat is probably the best bet.