PLR Rollforward

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
I need my cart to roll forward at a fixed speed when players aren't touching the cart but when they are pushing the cart the speed should return to the usual pushing speed such as 0.55 for 1 person.

I've made an attempt myself by modifying the rollback so the OnTrue output makes the cart move forward at 0.1 instead of -1. OnFalse still sets the speed to 0.

I have a 2 track_paths both control the value of the roll forward branch. The problem is that OnFalse doesn't work at all. Sending a value of 0 does not stop the cart.

Either this is the wrong way to implement such a feature or I've messed up. Does anybody have any other ideas on how to do this?
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
Everything else is the same, Boojum. All I want is the cart to rolldown the hill slowly (a speed of 0.1) but allow players to interject and push it at normal payload speeds (0.55, 0.77, 1). I also want to be able to enable/disable the roll forward using OnPass outputs from path_tracks.
 
Last edited:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Assuming you still have rollback zones, you will need to chain two logic_branches.

For example, add a new branch whose OnTrue sends the cart forward, and whose OnFalse tests the rollback branch, which will then either stop the cart or reverse it.
 

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
I've done what you've said Boojum. I've duplicated the rollback branch and renamed it plr_blu_rollforward. Here's the outputs for the rollforward branch.

OnFalse > plr_blu_rollback > Test
OnTrue > plr_blu_rollforward > SetSpeedDirAccel 0.1

..and for the top path_track...

OnPass > plr_blu_rollforward > SetValueTest 1

Problems!

1) When somebody enters and leaves the pushzone the cart stops moving.
2) Only SetValueTest will trigger the rollforward but not SetValue.
3) The rollforward will trigger momentarily then stop straight after. (pretty much instantly)

Would it be possible to create new carts just for Stage 3 with changes to the pushingcase?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
...did you make the logic_case target rollforward? It needs to target the first in the chain.

(and it should be test, not SetValueTest, otherwise it will slow down when it arrives unless the number of players changes)
 

Washipato

L3: Member
Jun 22, 2009
149
331
Try using a different case_logic when the cart reach the top track. Give it the 5 different speeds when someone from the team is pushing it and 2 new ones: one when there are no friendly players around it (speed 0.1) and one when a enemy player is standing next to the cart, regardless of how many friendly players are around it.

Then return to use the old case_logic after the cart reaches the end of the ramp. To use two different logic_case, use two different math_counters, one when the cart is not on the downhill and one when it's on the downhill (disabled)

Sorry if this is old information
 
Last edited:

Psy

The Imp Queen
aa
Apr 9, 2008
1,706
1,491
I've fixed it. :D If anybody wants to know how to do this I'll be happy to give you instructions on how to do it.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Try using a different case_logic when the cart reach the top track. Give it the 5 different speeds when someone from the team is pushing it and 2 new ones: one when there are no friendly players around it (speed 0.1) and one when a enemy player is standing next to the cart, regardless of how many friendly players are around it.

Then return to use the old case_logic after the cart reaches the end of the ramp. To use two different logic_case, use two different math_counters.

Sorry if this is old information
You can't change logic_case, they have no ability to be disabled/enabled.
 

Washipato

L3: Member
Jun 22, 2009
149
331
You can't change logic_case, they have no ability to be disabled/enabled.

You can have 2 different math counters tied to those logic_cases. Math_counters can be enabled/disabled. One is used for normal travelling (enabled) and one for downhill (disabled). When the cart reaches the downhill, enable the second counter, pass the value from the first one to it before disabling it. When the cart reaches the end of the downhill, enable the first one and disable the second. Disabled math_counters don't pass values or accept new ones, in this way only one logic_case will be working.

But Psy already solved the problem ::p:. What did you change Psy?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
My payload systems don't even use math_counters though :) so you'd be adding in three entities (counter,counter,case) to do that instead of one branch.