After fooling around with various fixes, the best I could come up was this:
The trigger kills the box and sends a 'test' to a logic_branch.
The logic_branch triggers a logic_relay (relay#1) if false and a second relay (#2) if true. Both logic relays do the same thing; set the logic_branch to true, run the spawn/animation sequence and then set the logic_branch back to false. The only difference between the two are timing; one takes 2 seconds and the other 4.
This can wind up with a couple of boxes in the 'hopper' but I haven't been able to break it (eg, send 2 boxes into the acid pool and wind up with one or zero boxes coming out of the dropper).
These are the actual details:
trigger_multiple
- 0 second delay
- Flags: physics objects
Output:
OnStartTouch !activator kill
OnStartTouch dropper_branch Test
logic_branch (dropper_branch)
Output:
OnFalse dropper_logic Trigger
OnTrue dropper_logic2 Trigger
logic_relay (dropper_logic)
Output:
OnTrigger dropper_branch SetValue 1
OnTrigger dropper_cover SetAnimation open
OnTrigger dropper_branch SetValue 0 (2 seconds)
OnTrigger dropper_cover SetAnimation close (2 seconds)
OnTrigger dropper_maker ForceSpawn (2 seconds) (this is the env_entity_maker)
logic_relay2 (dropper_logic)
Output:
OnTrigger dropper_branch SetValue 1
OnTrigger dropper_cover SetAnimation open (3 seconds) - drops the box
OnTrigger dropper_branch SetValue 0 (4 seconds) - extra second to clear things up before allowing the regular spawn to run
OnTrigger dropper_cover SetAnimation close (4 seconds)
OnTrigger dropper_maker ForceSpawn (4 seconds)
It should be noted that a logic_auto runs a ForceSpawn at the beginning of the level, so the entire sequence starts with a box in the hopper.
Is there a better method of doing this? I'm guessing that there's probably an exact sequence of timing that could break everything. The box dropper is right by the hazard so I was able to chuck boxes in (singly and doubly) at various intervals. Tossing two boxes in at the same time--which is what I fear the most--works like a charm.
