Results 1 to 3 of 3
  1. #1
    MSgt. Shooter Person
    Join Date
    Aug 2011
    Posts
    63

    Default Replicating an inherited variable possible or workaround?

    I don't believe it is possible for me to replicate an inherited variable in the replication block. Are there any solutions to this other than add the variable to the replication block of the class that owns the variable?

    Ex.

    class NT_RocketWithMelee extends UTWeap_RocketLauncher_Content
    placeable;

    replication
    {
    if(bNetDirty)
    WeaponRange; //doesn't work, belongs to Weapon class
    }

  2. #2

    Default

    Replication conditions can only be specified in the class that introduces the member. No exceptions.

    If you want to vary the weapon range, you'll have to introduce a new variable in your class, because that's the only way to specify a replication condition. You could make it a repnotify variable so you can assign its value to WeaponRange immediately on the client using ReplicatedEvent().
    Wormbo's UT/UT2004/UT3 mods | PlanetJailbreak | Unreal Wiki | Liandri Archives

    <@Mych|Lockdown> ...and the award for the most creative spelling of "Jailbreak" goes to ... "Gandis Jealbrake Server"
    Note that your questions via PMs will be ignored if they actually belong in the forum.

  3. #3
    MSgt. Shooter Person
    Join Date
    Aug 2011
    Posts
    63

    Default

    Thanks for the reply. I think I may have a different problem than I thought. My melee attack adds momentum to the target, which I test out on the barrel static mesh with Can Become Dynamic enabled. Single player works fine. I think it also works on the server. However, on the client, the barrels dont move at all. I'm confused at what I'm suppose to replicate here.

    Edit: Just realized I posted this in the UT3 forum. I'll repost this in the UDK one. I realize I could work around this by making a new class with the barrel as the mesh and set bAlwaysRelevent to true. Would like to make a static mesh just work though. I wonder if the setting Can Become Dynamic is different on the server than the client in the mesh editor.
    Last edited by tho121; 04-07-2012 at 04:26 PM.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.