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?
class NT_RocketWithMelee extends UTWeap_RocketLauncher_Content
WeaponRange; //doesn't work, belongs to Weapon class
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
| Unreal Wiki
| Liandri Archives
Note that your questions via PMs will be ignored if they actually belong in the forum.
<elmuerte> you shouldn't do all-nighters, it's a waste of time and effort
<TNSe> its always funny to find code a week later you dont even remember writing
<Pfhoenix> what's worse is when you have a Star Wars moment
<Pfhoenix> "Luke! I am your code!" "No! Impossible! It can't be!"
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 05:26 PM.