Announcement

Collapse
No announcement yet.

How you make a Vehicle stay within the Vehicle?

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

    How you make a Vehicle stay within the Vehicle?

    Does any one know how code this in? I am trying to make an tranportion Vehicle that is fast to move the tank arcoss the battle field. I can't make two Vehicle move at the same time over the top of each other. They side again each other. It something to do with the krama and the Physics or something else. I Think it need to update the Vehicle when it is not moving. I try look at the forums but there is no good example. Just a beginer learning this.

    http://www.ataricommunity.com/forums...errerid=222978
    I found this forums but it wouldn't work. There an error on the Physics when it leave it stay the same that the default wasn't the same.

    The plan and the flow chart.
    -Tank
    -Vehicle Tranport
    step 1)When the Vehicle enter the Vehicle tranport.
    Vehicle Tranport = Vehicle Tranport
    Tank = added if enter

    step 2)The Vehicle tranport stay the same but the tank changes a bit.
    tank = ( Vehicle Tranport + Tank )
    Vehicle Tranport = Vehicle Tranport

    step 3)The Vehicle Tranport move the to destion as the tank move. if the Vehicle Tranport get DMG the tank have to leave so that the other player can move out of the way to not get destory.

    step 4)The tank leaves the Vehicle Tranport and the tank will go to the defualt.
    Tank = Tank defualt
    Vehicle Tranport = Vehicle Tranport

    Please Help me >.<!

    #2
    The only code I have only works single player, there is an issue withthe physics of the vehicle, and the replication of how the ehicle is moved in net play

    Comment


      #3
      perhaps the same way AS-Junkyard carries the HB: blocking volume around it. Spawning them around a fixed area (loader) should be possible. Make sure you subclass the blockingvolume and set bStatic=False btw

      Comment


        #4
        But how can i attach to the vchicle when it is carrying it?

        Comment


          #5
          If you don't mind that there can be no driver in the vehicle you're trying to carry whil attaching it (they can get in after though, or b in a weapon spot) my code will work...

          However do do the way PRI's, Pawns and replication work, if the driver is in the vec while being attached (and maybe unattached) it all messes up

          Comment


            #6
            couldnt you have it spawn a dummy? an actor with the mesh and stuff that looks like a vehicle and attach it to a bone or somsort?

            Comment


              #7
              as long as you dont care about the vehicles physics...

              Code:
              vehicle.setphysics(PHYS_NONE);
              vehicle.AttachToBone(otherVehicle, 'bone_name');
              and that worked on my helicopter...

              EDIT: and done forget to set it back to

              Code:
              vehicle.setphysics(PHYS_KARMA);

              Comment


                #8
                I do care about the vehicles physics that there should be an cosllion dected if the vehilcle want to leave that go back to normal.

                Comment


                  #9
                  Did that work online Bigcheese? WIth a driver already in the vec, cause my experiance has been:
                  The driver of the vec doing the attaching see's almost everything right (if the driver pawn is visable or there are headlights they get left behind)
                  the driver of the vec being attached sometimes see his vec take off, sometimes not, but always he's left behind. All vec shots orginate at the vehicle that picked him up and when the vec is unattached he is instanly teleported to where the vec wwas dropped

                  Everybody else sees' the vec moved... somtimes, but the driver name is left behind...


                  The problem comes down to pawns dont' deal well with having their base chnaged while they are possed (everything works perfect if the driver is empty, note that wepaon pawns can be cocupied since their base is not changed)

                  As far as the PRI is concerned you are not moving, and are still in the same place, ths leads to the other people and the driver of the picked up vec seeing the vec left behind. The server allwos that the vec is moving, but it's not replicated to anybod excep the person who picked up the vec cause their pawn code caused the pickup, variables seem to be only replicated to the pawn that owns them, or to the machine of the pawn that owns the actor, cause the base change is made by one pawn it get's all the replcation info, but nobody else does, that is supposed to be take care of by the PRI, but the PRI does not handle base changes for pawns...

                  Comment


                    #10
                    ^dont know if this will help but i have read somewhere here a line of code

                    canbebaseforpawns=True

                    i think it is not correct maybe someone can correct me plz

                    Comment


                      #11
                      that just lets people stand on raptors...

                      i dint know about that Hsoolien, mabey you could just force a pawn update whenever the vehicle moves...

                      Comment


                        #12
                        IT always something to do with the update of the properties of the krama and the Physics. The that vehicle stay the same utntil the player is using it or not played. Like the Hellbender when you enter the vehicle and you go the another sapwn for hellbender to park it there it usally stay there.

                        But I saw in the UDN section about that but it outdate about the trailer. http://udn.epicgames.com/Two/HotRod

                        Comment


                          #13
                          canbebaseforpawns=True I have this code here. Just want to know how to add collsion if the vechicle is trigger or attach to something.

                          Where the AS-Junkyard that the hellbender maget. Don't know where is the code come from. Just need to know how to attach it.

                          Comment


                            #14
                            That magnet is a mover, so there is no special code

                            Comment


                              #15
                              just have the transportation vehicle open when you press altfire or something and close with the same button and then the falling off part won't be a problem

                              Comment

                              Working...
                              X