Jump to content

Trouble with trigger_push


Recommended Posts

A key feature of my new map is jump pads, but I've run into a problem. I'm trying to make the jump pads toggleable, so that they switch on and off via a script. Basically, I want them to only be usable at specific times.

 

To make the jump pads, I'm using a trigger_push targeted at an info_notnull. I'm using the script command SET_INACTIVE to toggle them on and off. When they're active, they work perfectly--they fire me at the right speed, in the right direction, every time. But they behave strangely when they're "inactive." Instead of doing nothing, they make my character vibrate uncontrollably as soon as I touch them. It's like they're trying to push me and not push me at the same time.

 

I have tried using entities instead (target_activate and target_deactivate) to achieve the toggling, but I get exactly the same effect.

 

Does anyone know what the problem is, and how I can fix it?

Link to comment

I did start off by using trigger_multiple with target_push, but I read in several places that trigger_push is more reliable for Internet play--something about server-side versus client-side calculations. Plus, the trigger_multiple + target_push setup doubles the number of entities needed to make jump pads.

 

If needed I will try that workaround, but I would prefer a solution to the trigger_push problem instead.

Link to comment

I actually think its because the trigger_push is predictable and cannot be truly turned off.  Thus the client thinks you triggered it even if its disabled but does not know it is disabled.  (This state is not networked at all as it just sets gentity_t::flags & FL_INACTIVE bit which is server-side only)

 

If this map was for SP its possible we (OpenJK) could make a change to the behavior but unlikely that we will do so for MP since that's in mod scope and would only work in the case of the server running fs_game OpenJK or any other forks with updated change.

Link to comment

I actually think its because the trigger_push is predictable and cannot be truly turned off.  Thus the client thinks you triggered it even if its disabled but does not know it is disabled.

 

I use a few trigger_push buttons on my yavtemptrial map and they reset after you use them so they can be used again.

MB2 Beta Tester / MB2 FA Assistant Dev

Link to comment

I actually think its because the trigger_push is predictable and cannot be truly turned off.  Thus the client thinks you triggered it even if its disabled but does not know it is disabled.  (This state is not networked at all as it just sets gentity_t::flags & FL_INACTIVE bit which is server-side only)

 

If this map was for SP its possible we (OpenJK) could make a change to the behavior but unlikely that we will do so for MP since that's in mod scope and would only work in the case of the server running fs_game OpenJK or any other forks with updated change.

 

I quickly put together a room this morning with a trigger_push and my results were exactly the same as the original post. I pointed a trigger_push at a target_position, then pointed a trigger_multiple at a target_activate and flagged the trigger_push as inactive. The player started vibrating on the pad until I used the trigger_multiple, then it all worked fine. Interestingly, this only happened in multiplayer. When I compiled the map in single player, it all worked as it should.  :huh:

 

 

I use a few trigger_push buttons on my yavtemptrial map and they reset after you use them so they can be used again.

 

I took a look at the .map  you sent over to me and what you have is a func_door, which triggers when pushed and also fires off another door. The trigger_push that Jedi_Mediator is referring to is like a jump platform, that whisks you into the air when you tread on it, like the air tunnel in JK2 Bespin.

Link to comment

I actually think its because the trigger_push is predictable and cannot be truly turned off.  Thus the client thinks you triggered it even if its disabled but does not know it is disabled.  (This state is not networked at all as it just sets gentity_t::flags & FL_INACTIVE bit which is server-side only)

 

If this map was for SP its possible we (OpenJK) could make a change to the behavior but unlikely that we will do so for MP since that's in mod scope and would only work in the case of the server running fs_game OpenJK or any other forks with updated change.

This actually makes a lot of sense. And considering that MagSul got the same result, I think you're probably right.

 

Well, looks like I'll have to go with target_push instead. But I can live with that. I'd like to clarify one thing, though--are they reliable enough for MP play? Like I mentioned before, I've read in several places that target_push is not recommended for MP, because it's client-side predicted...is there any truth to this?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...