this is really interresting!
can you tell a little bit more about the mod you are building?
Replicating Mover
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Replicating Mover
I thought this might interest people.
The OP was nice enough to let me peek at the mod and I must say that although I would do it a little differently (I think), his ideas have very real potential and I'm quite interested in how he does a release for this. It's worth staying tuned for.
The OP was nice enough to let me peek at the mod and I must say that although I would do it a little differently (I think), his ideas have very real potential and I'm quite interested in how he does a release for this. It's worth staying tuned for.
So long, and thanks for all the fish
Re: Replicating Mover
This isn't working/compiling for me. I had to make it "extend Mover" instead of "native" and remove the "native function SetBrush" to get it to compile. Then when it's used in a map, it crashes when a player joins.comoestas wrote:Fully replicating mover code:Code: Select all
class DynamicMover native; var vector mDesiredLocation; var rotator mDesiredRotation; var float accLocX, accLocY, accLocZ, accRotYaw, accRotPitch, accRotRoll; // replicate without loosing accuracy replication { reliable if (Role == ROLE_Authority) accLocX, accLocY, accLocZ, accRotYaw, accRotPitch, accRotRoll; } native function SetBrush(model m); event PostBeginPlay() { mDesiredLocation = Location; mDesiredRotation = Rotation; } simulated function Tick(float DeltaTime) { if(Role == ROLE_Authority) { accLocX = Location.X; accLocY = Location.Y; accLocZ = Location.Z; accRotYaw = Rotation.Yaw; accRotPitch = Rotation.Pitch; accRotRoll = Rotation.Roll; } else { mDesiredLocation.X = accLocX; mDesiredLocation.Y = accLocY; mDesiredLocation.Z = accLocZ; mDesiredRotation.Yaw = accRotYaw; mDesiredRotation.Pitch = accRotPitch; mDesiredRotation.Roll = accRotRoll; } if(Location != mDesiredLocation) SetLocation(mDesiredLocation); if(Rotation != mDesiredRotation) SetRotation(mDesiredRotation); } defaultproperties { bNoDelete=false NetPriority=1.400000 MoverEncroachType=ME_IgnoreWhenEncroach NumKeys=1 MoveTime=0.000000 StayOpenTime=0.000000 InitialState="" }
Has anyone got this to work? Why is it "native" anyway?
*Edit:* got it to compile using "ucc make -NoBind" but now I can't import it into the Editor:
Join the BunnyTrack.net Discord chat server: https://www.bunnytrack.net/discord