Page 1 of 1

why is it replicating poorly?

Posted: Sat 03 Dec , 2011 2:39 pm
by LegendaryAgent

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.

Re: why is it replicating poorly?

Posted: Sat 03 Dec , 2011 4:40 pm
by LegendaryAgent
sry updated first post with tick event... forgot to include tick :S

Re: why is it replicating poorly?

Posted: Sun 04 Dec , 2011 4:22 pm
by LegendaryAgent
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.

Re: why is it replicating poorly?

Posted: Sun 04 Dec , 2011 5:50 pm
by iZumo
Read the replication manual more precisely (about Role < Role_Authority) ;)

Re: why is it replicating poorly?

Posted: Sun 04 Dec , 2011 5:58 pm
by LegendaryAgent
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.

Re: why is it replicating poorly?

Posted: Sun 04 Dec , 2011 6:17 pm
by iZumo
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.

Re: why is it replicating poorly?

Posted: Sun 04 Dec , 2011 7:02 pm
by LegendaryAgent
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

Re: why is it replicating poorly?

Posted: Mon 05 Dec , 2011 2:30 am
by Azarael
UnrealWiki has a number of pages on Replication, and should be your first port of call.