Please or Register to create posts and topics.

Button-activated aerial faith plate SORT of works...

Page 1 of 2Next

Hey guys,

I'm working on my first map and spent pretty much all day trying to get this to work.

The goal is to have a catapult which fires immediately at the press of a button, launching a cube.

So basically I created a catapult in the floor using the wiki as a guide, and directly above it a trigger_catapult brush. The trigger starts out disabled, so that walking over the faith plate or placing an object on it doesn't do anything. Nearby is a button, which when pressed enables the trigger (and then disables it again after 1 second, so that the button/launcher combo can be used repeatedly). The button also outputs a FireUser1 to the trigger which activates both the launch animation and sound.

Pressing the button perfectly triggers the firing animation and sound, but doesn't launch the cube, even though I have "Everything" checked in the trigger_catapult's Flags tab. The cube just sits there, and the catapult fires right through it.

Now, if I stand on the faith plate and then drop a cube on the button, I get launched perfectly.

Also, I've found that if I repeatedly run over and over the button, it EVENTUALLY launches the cube after half a dozen or so attempts. Weird.

Can anyone pinpoint exactly what I'm missing here? Getting frustrated. Thanks.

You are probably making things more complicated than they have to be. Why don't you use a filter so the cube is the only thing that activates it?

Also make sure that Physic objects are ticked in your flags as well. 'everything' doesn't necessarily mean everything :S

?????????????????????????????TWP Releases | My Workshop

Grrr, still pulling my hair out over this.

I experimented with the flags, but that doesn't seem to be the issue. It DOES launch the cube, just not consistently. Also I don't want to filter/restrict it too much because I need to be able to launch the player and even other items besides cubes.

So now what?

I noticed that if I drop the cube on the catapult and QUICKLY press the button (like within a second or so) it launches every time. But if I leave the cube sitting there for longer than that and then fire, it's a miss.

I've been having a lot of trouble with these trigger_catapult brush entities, but I can't tell if it's because I'm brand new at this or if they are just glitchy. On another part of the map, I have a catapult that is mounted to a rotating platform, so that you can aim the catapult one direction or another by pressing a button. It all works beautifully except that the launched object always goes the same direction, regardless of where the catapult is pointed. The catapult and trigger are both parented to the platform so in theory everything should rotate as a unit, but for some reason the trigger stubbornly refuses to rotate.

Again, grrrrrrrr. :-x

gridmonkey wrote:
The button also outputs a FireUser1 to the trigger which activates both the launch animation and sound.

You should not be doing it this way. This is a perfect example of when to use a logic_relay. Have the button trigger the logic_relay, and have the logic_relay enable the trigger_catapult, as well as play the sound and animation.

You say that the cube will be launched if you quickly press the button. Is the cube still in motion when this happens, like has it settled to a stand still or is it moving around? I'm wondering if the trigger_catapult is not triggered by a stationary object for some reason. You could try adding a phys_explosion with a VERY small value, and have it fire at the same time you enable the trigger_catapult.

You say the trigger_catapult starts out disabled; do you ever Disable it? If so, are you giving it enough time to be activated and fired?

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

Maybe a stationary cube can't 'StartTouch' a Catapult trigger?

P.S. For the second paragraph: have you parented the info_target that the catapult launches to, to the rotating platform?

?????????????????????????????TWP Releases | My Workshop

There's a "OnStartTouching" output isn't there? Or something like it?

If i'm uderstanding correctly the catapult won't launch the cube if the trigger_catapult is enabled after the cube is settled.. thats probaby because physics turn off when the object is not moving so it doesnt calculate it when it's not needed.

I would solve this guerilla-style :-) . Put point_push near the catapult with some small values and trigger it just when the catapult is activated and then quicky turn it off.. it should be enough to wake the cube so it can be launched.

Hope i helped.

Cheers

Thank you all for the suggestions. These all seem like perfectly good ideas, but unfortunately nothing seems to work. I tried both the point_push and the phys_envexplosion and succeeded in pushing the cube around a bit, but that's it. I can still launch the cube if I press the button immediately after setting it down on the catapult, or alternatively by rapid-firing the button 4-6 times. Otherwise, it just sits there.

chickenmobile wrote:
For the second paragraph: have you parented the info_target that the catapult launches to, to the rotating platform?

I'm actually not using a target. The trajectory doesn't have to be exact, it just needs to go one direction or the other.

msleeper wrote:
You should not be doing it this way. This is a perfect example of when to use a logic_relay. Have the button trigger the logic_relay, and have the logic_relay enable the trigger_catapult, as well as play the sound and animation.

Okay, I added the relay. In this case it doesn't make any difference that I can tell but if that's the "right" way to do it, I'll get in the habit now. Thanks for the tip.

Quote:
You say the trigger_catapult starts out disabled; do you ever Disable it? If so, are you giving it enough time to be activated and fired?

I assume you meant to ask if I ever enable it (or else I'm really lost!) If so then yeah, enabling the trigger is the first thing in the sequence: Button activates logic relay which enables trigger with zero delay. One-tenth of a second later the noise & animation are set off. After half a second, the trigger is disabled again.

I'm very curious about the second question. Exactly how much time is "enough time" for it to be activated? I've moved all these time delays around by as much as a full second but so far I haven't noticed any difference -- the cube just gets ignored.

CroSSGunS wrote:
There's a "OnStartTouching" output isn't there? Or something like it?

This is mentioned in the Wiki entry on Triggers, but I don't really understand what it is or how to use it:
OnStartTouch
OnEndTouch
- Outputs called whenever a entity matching all filters enters/leaves the trigger, regardless of whether it has passed any further tests. The entity that entered or left is the !caller.

gridmonkey wrote:
I assume you meant to ask if I ever enable it (or else I'm really lost!) [. . .] After half a second, the trigger is disabled again.

No, I was asking when or if the trigger is ever disabled, and you answered me here. I wonder if you aren't giving it enough time to work - IE, half a second is too short of time.

You also seemed to miss a critical part of what I said:

msleeper wrote:
You say that the cube will be launched if you quickly press the button. Is the cube still in motion when this happens, like has it settled to a stand still or is it moving around? I'm wondering if the trigger_catapult is not triggered by a stationary object for some reason. You could try adding a phys_explosion with a VERY small value, and have it fire at the same time you enable the trigger_catapult.

Try this. I have a feeling the phys_explosion will solve all your problems.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

I can't test it at the moment, but you might try setting Use Threshold Check to False. My understanding is that an object has to be moving to trigger a trigger_catapult. Use Threshold Check <boolean> along with Lower Threshold <float>, Upper Threshold <float>, and Entry Angle Tolerance <float> control how much movement the object needs to trigger it.

Page 1 of 2Next