Announcement

Collapse
No announcement yet.

Attaching hand weapons to vehicles

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

  • replied
    just to let u know, if u modified those packages, u better hope u made a back up! because u may not beable to join servers

    Leave a comment:


  • replied
    Update:

    I set bReplicateInstigator to true in the weapon class. This seemed to fix the instigator replication problem I was having.

    Now the new problem:

    When I get into the vehicle the game crashes. In the log it says that the "clientstate is WRONG!" for the weapon. I logged the states of the weapon on the client and the server. On the server the state is ws_hidden. On the client the weapon state is ws_none.

    Any suggestions on why they are getting out of sync? Or how to fix it?

    Leave a comment:


  • replied
    No, that's not it, but thanks for the help. Currently, I don't even have a mutator. I've just added my classes to the onslaught and xweapons packages. I know this isn't the right way to do it, but I figured I'd build the mutator after I got the stuff working.

    I've made some progress on the problem. When you get into a standard vehicle the ClientRegisterVehicleWeapon function runs. I *think* this function makes the vehicle's weapons relevant to the player. I've made a similar function to make inventory items of the vehicle relevant to the player. My function seems to work. The client now knows what the inventory is. But it still doesn't work. I just started looking at the new problem, so I don't have a good handle on what it is. But I *think* on the client the inventory items don't know who their instigator is. Since many functions in weapons use instigator the weapon isn't working. I'll keep looking at this and post any updates.

    Keep the suggestions coming.

    Leave a comment:


  • replied
    Ok If it works in Your Listen server but not in Dedicated, it may be because u need to add the mutator package name to the Server Packages list in UT2004.ini

    [Engine.GameEngine]
    CacheSizeMegs=32
    UseSound=True
    VoIPAllowVAD=False
    ServerActors=IpDrv.MasterServerUplink
    ServerActors=UWeb.WebServer
    ServerPackages=Core
    ServerPackages=Engine
    ServerPackages=Fire
    ServerPackages=Editor
    ServerPackages=IpDrv
    ServerPackages=UWeb
    ServerPackages=GamePlay
    ServerPackages=UnrealGame
    ServerPackages=XEffects
    ServerPackages=XPickups
    ServerPackages=XGame
    ServerPackages=XWeapons
    ServerPackages=XInterface
    ServerPackages=Vehicles
    ServerPackages=TeamSymbols_UT2003
    ServerPackages=TeamSymbols_UT2004
    ServerPackages=BonusPack
    ServerPackages=SkaarjPack_rc
    ServerPackages=SkaarjPack
    ServerPackages=UTClassic
    ServerPackages=UT2k4Assault
    ServerPackages=Onslaught
    ServerPackages=GUI2K4
    ServerPackages=UT2k4AssaultFull
    ServerPackages=OnslaughtFull
    ServerPackages=xVoting
    UseStaticMeshBatching=True
    ColorHighDetailMeshes=False
    ColorSlowCollisionMeshes=False
    ColorNoCollisionMeshes=False
    ColorWorldTextures=False
    ColorPlayerAndWeaponTextures=False
    ColorInterfaceTextures=False
    MainMenuClass=GUI2K4.UT2K4MainMenu
    ConnectingMenuClass=GUI2K4.UT2K4ServerLoading
    DisconnectMenuClass=GUI2K4.UT2K4DisconnectOptionPa ge
    LoadingClass=GUI2K4.UT2K4SP_LadderLoading
    SinglePlayerMenuClass=GUI2K4.UT2K4SP_Main
    ServerPackages=OnslaughtBP

    Add The Package Here

    ServerPackages=<PackageName>.u

    OR

    atleast thats wat someone told me.

    Leave a comment:


  • started a topic Attaching hand weapons to vehicles

    Attaching hand weapons to vehicles

    I'll quick ask my question, then go into the details of it afterwards.

    How can I make a vehicle's pre-existing inventory items relevant to a player who gets in the vehicle?

    I am trying to attach hand weapons to vehicles for use by the driver. The way I went about this was by just adding a weapon to a vehicle's inventory. A vehicle is a pawn, so this works. With some slight additions to the weapon/vehicle code this works perfect in a listen server, but not on a dedicated server. So I assume I'm having a replication problem.

    The problem is: when a player gets into a vehicle, the player has no access to the weapons that the vehicle is spawned with. If a player drives over a pickup they can pickup the weapon and everything works correctly. The problem is only with weapons that the vehicle spawned with. I am guessing that the inventory on the vehicle is somehow not relevant to the player when they get the vehicle. The vehicle actually owns the weapons, so in the weapon code I made bOnlyRelevantToOwner = false. This made no difference. I tried making the weapon bAlwaysRelevant as well. That didn't work. I tried setting the owner equal to the player when someone enters the vehicle. That didn't work.

    Can anyone offer suggestions? Thanks in advance.
Working...
X