why is it replicating poorly?

You need help? It's here!
Post Reply
LegendaryAgent
Member
Posts: 80
Joined: Thu 29 Sep , 2011 12:26 am
Contact:

why is it replicating poorly?

Post by LegendaryAgent » Sat 03 Dec , 2011 2:39 pm

Code: Select all

class myemitter extends emitter;

var int totick;

replication
{
reliable if(Role==ROLE_Authority)
totick;
}

simulated event tick( float DT)
{
if (totick>0)
{
Emitters[0].Trigger();
totick-=1;
}

defaultproperties
{
     RemoteRole=ROLE_SimulatedProxy
     bNotOnDedServer=False
     bNoDelete=False
     bAlwaysRelevant=True
}
from another class i set totick=2, and yet sometimes even after 2 ticks the emitter[0] fails to trigger, why is this happening? the totick is in reliable replication, i dont understand it at all, can someone explain?

Sorry EDITED forgot to include tick.

LegendaryAgent
Member
Posts: 80
Joined: Thu 29 Sep , 2011 12:26 am
Contact:

Re: why is it replicating poorly?

Post by LegendaryAgent » Sat 03 Dec , 2011 4:40 pm

sry updated first post with tick event... forgot to include tick :S

LegendaryAgent
Member
Posts: 80
Joined: Thu 29 Sep , 2011 12:26 am
Contact:

Re: why is it replicating poorly?

Post by LegendaryAgent » Sun 04 Dec , 2011 4:22 pm

xD anyone there at all? or is this not easy? or you need more information? please im really with question marks on my head on this situation lol
It replicated sometimes and sometimes it doesnt, its like its random based replication...

Im setting totick=2; in another function of another class, that function replication is reliable if(role<role_authority) and it is a powerup subclass.

iZumo
Disappeared Administrator
Posts: 4196
Joined: Fri 19 Mar , 2010 1:21 am
Location: Earth
Contact:

Re: why is it replicating poorly?

Post by iZumo » Sun 04 Dec , 2011 5:50 pm

Read the replication manual more precisely (about Role < Role_Authority) ;)

LegendaryAgent
Member
Posts: 80
Joined: Thu 29 Sep , 2011 12:26 am
Contact:

Re: why is it replicating poorly?

Post by LegendaryAgent » Sun 04 Dec , 2011 5:58 pm

Izumo_CZ wrote:Read the replication manual more precisely (about Role < Role_Authority) ;)

thanks for replying!
thats the thing, there isnt any xD

look for yourself:

Code: Select all

http://udn.epicgames.com/Three/GameStateReplication.html
but how does that matter? i mean, it sets from that function which is replicated as role<role_authority, but the variable is in a diff class which is role==role_authority & its set into function tick.

iZumo
Disappeared Administrator
Posts: 4196
Joined: Fri 19 Mar , 2010 1:21 am
Location: Earth
Contact:

Re: why is it replicating poorly?

Post by iZumo » Sun 04 Dec , 2011 6:17 pm

You can only do Role < ROLE_Authority:

- variables: only PlayerController and derived
- functions: only PlayerController (and derived), and classes owned by the PlayerController

Plus, you're reading Unreal Engine 3 manual, which has replication syntax different.

LegendaryAgent
Member
Posts: 80
Joined: Thu 29 Sep , 2011 12:26 am
Contact:

Re: why is it replicating poorly?

Post by LegendaryAgent » Sun 04 Dec , 2011 7:02 pm

Izumo_CZ wrote:You can only do Role < ROLE_Authority:

- variables: only PlayerController and derived
- functions: only PlayerController (and derived), and classes owned by the PlayerController

Plus, you're reading Unreal Engine 3 manual, which has replication syntax different.

hmmm can u show me that please? all i could find about udn two was this:
http://udn.epicgames.com/Two/FunctionRe ... eplication

User avatar
Azarael
UT2004 Administrator
Posts: 5365
Joined: Thu 11 Feb , 2010 10:52 pm

Re: why is it replicating poorly?

Post by Azarael » Mon 05 Dec , 2011 2:30 am

UnrealWiki has a number of pages on Replication, and should be your first port of call.

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests