Announcement

Collapse
No announcement yet.

BR w/ Vehicles: Rest Bomb when in Vehicle?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    BR w/ Vehicles: Rest Bomb when in Vehicle?

    i've created my own game type using some of the bombing run code. Everything seems to be working great. Then I enabled vehicles. That works great too. Then I added an element to the game where the bomb explodes after X seconds and resets the bomb. So far so good.

    But the problem I'm having is this: if someone is in a vehicle when the bomb explodes, the bomb resets, but they are still 'carrying' it. They get the "Deliver the bomb" message but don't have the bomb.

    if (Holder.PlayerReplicationInfo.HasFlag == None) {
    Spawn(class'Deliverator.PizzaExplosion',self,,Loca tion+Pizza.Location,Rotation);
    HurtRadius(600, 600, class'DamTypeRedeemer', 100000, Location+Pizza.Location);
    Holder.PlayerReplicationInfo.HasFlag = None;
    C.Pawn.PlayerReplicationInfo.HasFlag = None;
    Pizza.SendHome();
    } else if (Holder.PlayerReplicationInfo.HasFlag != None) {
    Spawn(class'Deliverator.PizzaExplosion',self,,Loca tion+C.Pawn.Location,Rotation);
    HurtRadius(600, 600, class'DamTypeRedeemer', 100000, Location+C.Pawn.Location);
    Holder.PlayerReplicationInfo.HasFlag = None;
    C.Pawn.PlayerReplicationInfo.HasFlag = None;
    Pizza.SendHome();
    }

    #2
    just a quick thought
    I'm not entirely sure on the vehicles part of the problem, but try removing these two lines:

    Holder.PlayerReplicationInfo.HasFlag = None;
    C.Pawn.PlayerReplicationInfo.HasFlag = None;

    when you call the BR Ball's sendhome function (Pizza Included), it will automatically address the issue of who's holding it and change it.

    Might not fix your problem, but its redundant code either way.

    Comment


      #3
      i see what you're saying.. that was stuff i put in there to try and address the issue above... ill remove it anyways

      Comment


        #4
        You need to clear HasFlag in controller's playerreplicationinfo instead of pawn's.
        (Note that Holder.Controller reference may not work since when holder is in vehicle controller controls vehicle pawn not actual holder.)
        I see that you have reference to contoller in your code so (assuming that C is controller of ball carrier) you want:
        Code:
        C.PlayerReplicationInfo.HasFlag = None;
        instead of:
        Code:
        C.Pawn.PlayerReplicationInfo.HasFlag = None;
        Hope this helps.

        Comment


          #5
          =)

          awsome.. that totally solved my problem. a thousand thanks =D

          Comment

          Working...
          X