Hi guys,
I'm struggling with this issue for about 2 days now.
I have an actor called DGItem, which holds information about a game item. This actor has no mesh or collision. This actor has a "proxy actor" inside used for clients to render object when its placed in the level (for pickup) or it's being hold by a player.
In addition, when a monster drops an item (when killed), I create a new actor called DGDroppedPickup, which has a collision, and gets tossed from Monster. This last actor contains a reference to DGItem (the item itself).
The procedure that toss the item when the monster happens from DGItem.
NPC dies , call DGItem.
DGItem drops itself creating a DGDroppedPickup.
The thing is:
1) DGDroppickup gets replicated.
2) DGItem doesn't get replicated. (data, not physical representation)
3) DGItemAttach gets replicated (phyisical representation of item)
Object
These are the "Relevancy Rules", and I can't understand why its not being replicated.
If the actor has a RemoteRole of ROLE_None, it is not relevant --- Its ROLE_SimulatedProxy
If the actor's NetUpdateTime is larger than the current time, it is not relevant --- I don't really get this, but I understand no matter the NetUpdateTime, it should get replicated at some point.
If the actor is bAlwaysRelevant, it is relevant --- If I use this, it gets replicated, ofc! but its not the idea.
If the actor is owned by a viewer (could also be the client), it is relevant --- No apply
If the actor is owned by the client, it is relevant --- No apply
If the actor is the viewer, it is relevant ---- No apply
If the viewer is the actor's instigator, it is relevant ---- No apply
If the actor's Base is set it is relevenat if the Base actor is relevant ----- I'm setting DGItem BASE to "DGDroppedPickup", and DGDroppedPickup is being replicated!
If the actor does not have bBlockActors and is bHidden or bOnlyOwnerSee, it is not relevant
If the actor is visible according to a line-of-sight check between the actor's Location and the player's ViewLocation, then it is relevant
If the actor is visible according to a line-of-sight check through a portal, it is relevant
Otherwise, it is not relevant
Any ideas?
I'm struggling with this issue for about 2 days now.
I have an actor called DGItem, which holds information about a game item. This actor has no mesh or collision. This actor has a "proxy actor" inside used for clients to render object when its placed in the level (for pickup) or it's being hold by a player.
In addition, when a monster drops an item (when killed), I create a new actor called DGDroppedPickup, which has a collision, and gets tossed from Monster. This last actor contains a reference to DGItem (the item itself).
The procedure that toss the item when the monster happens from DGItem.
NPC dies , call DGItem.
DGItem drops itself creating a DGDroppedPickup.
Code:
function DropFrom(vector StartLocation, vector StartVelocity) { local DGDroppedPickup P; `Log(Self@"DropFrom"); if( Instigator != None && DGPawn(Instigator).ItemsInventory != None ) { //DGPawn(Instigator).ItemsInventory.RemoveFromInventory(Self); } // if cannot spawn a pickup, then destroy and quit if( DroppedPickupClass == None || DroppedPickupMesh == None ) { Destroy(); return; } `Log(Self@"Spawn DroppedPickup"); P = Spawn(DroppedPickupClass,,, StartLocation); if( P == None ) { Destroy(); return; } `Log(Self@"DroppedPickup"@P); // Item Attachment Self.ItemAttach = Spawn(Self.ItemAttachment.Class,,,P.Location,P.Rotation,Self.ItemAttachment); `Log(Self@"SetOwner"@P); Self.SetOwner(P); Self.SetBase(P); Self.ItemAttach.SetBase(P); bForceNetUpdate = TRUE; // DroppedPickup P.SetPhysics(PHYS_Falling); P.Item = Self; P.Velocity = StartVelocity; P.Instigator = Instigator; Instigator = None; }
1) DGDroppickup gets replicated.
2) DGItem doesn't get replicated. (data, not physical representation)
3) DGItemAttach gets replicated (phyisical representation of item)
Object
Code:
bReplicateInstigator=TRUE RemoteRole=ROLE_SimulatedProxy bHidden=false NetPriority=+1.4
If the actor has a RemoteRole of ROLE_None, it is not relevant --- Its ROLE_SimulatedProxy
If the actor's NetUpdateTime is larger than the current time, it is not relevant --- I don't really get this, but I understand no matter the NetUpdateTime, it should get replicated at some point.
If the actor is bAlwaysRelevant, it is relevant --- If I use this, it gets replicated, ofc! but its not the idea.
If the actor is owned by a viewer (could also be the client), it is relevant --- No apply
If the actor is owned by the client, it is relevant --- No apply
If the actor is the viewer, it is relevant ---- No apply
If the viewer is the actor's instigator, it is relevant ---- No apply
If the actor's Base is set it is relevenat if the Base actor is relevant ----- I'm setting DGItem BASE to "DGDroppedPickup", and DGDroppedPickup is being replicated!
If the actor does not have bBlockActors and is bHidden or bOnlyOwnerSee, it is not relevant
If the actor is visible according to a line-of-sight check between the actor's Location and the player's ViewLocation, then it is relevant
If the actor is visible according to a line-of-sight check through a portal, it is relevant
Otherwise, it is not relevant
Any ideas?
Comment