PLR Rollforward

Discussion in 'Mapping Questions & Discussion' started by Psy, Jul 31, 2009.

  1. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    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?
     
    • Thanks Thanks x 2
  2. tovilovan

    tovilovan L6: Sharp Member

    Messages:
    391
    Positive Ratings:
    94
  3. MangyCarface

    aa MangyCarface Mapper

    Messages:
    1,616
    Positive Ratings:
    1,275
    This is how PLR is done.

    Simply add a Case 0 to the logic_case that sets the cart speeddir to w/e you want the base to be. Then, remove the inputs that cause it to roll back after x seconds.
     
  4. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,532
    How it's done depends entirely on what all conditions/speeds the cart can be in. The method will vary drastically.
     
  5. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    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: Jul 31, 2009
  6. MangyCarface

    aa MangyCarface Mapper

    Messages:
    1,616
    Positive Ratings:
    1,275
    Oh. Have the case 0 check a bool (isrolling vs !isrolling) and then route the result to the cart to either stop it when not rolling or set its speed to low when rolling
     
  7. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,532
    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.
     
  8. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    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?
     
  9. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,532
    ...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)
     
  10. Washipato

    Washipato L3: Member

    Messages:
    149
    Positive Ratings:
    96
    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: Aug 1, 2009
  11. Psy

    aa Psy The Imp Queen

    Messages:
    1,705
    Positive Ratings:
    1,467
    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.
     
  12. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,532
    You can't change logic_case, they have no ability to be disabled/enabled.
     
  13. Washipato

    Washipato L3: Member

    Messages:
    149
    Positive Ratings:
    96
    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?
     
  14. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,532
    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.