I'm trying to make a hologram - an item that creates an actor that every moment copies owner's animsequence, animframe etc. Basically it works except for
1) animframe - animsequence changes but animframe doesn't -
maybe it's possible to check player's animation and play it on item's own using playanim instead of copying animframes
2) movement not smooth
What is th way to solve the problems? Does anybody know? What kind of replication is best for such actors?
mb there's something similar done for ut?
For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com
PLZ HELP - animation replication
-
pink
- OldUnreal Member
- Posts: 39
- Joined: Wed Nov 05, 2003 3:01 pm
-
Age
- OldUnreal Member
- Posts: 848
- Joined: Sat Dec 29, 2007 5:25 pm
Re: PLZ HELP - animation replication
Something like:
or
Code: Select all
function Tick(float deltatime)
{
AnimFor(Pawn(Owner));
}
function AnimFor(actor Other)
{
if(Other!=None)
{
AnimSequence = Other.AnimSequence;
AnimFrame = Other.AnimFrame;
AnimRate = Other.AnimRate;
TweenRate = Other.TweenRate;
AnimMinRate = Other.AnimMinRate;
AnimLast = Other.AnimLast;
bAnimLoop = Other.bAnimLoop;
SimAnim.X = 10000 * Other.AnimFrame;
SimAnim.Y = 5000 * Other.AnimRate;
SimAnim.Z = 1000 * Other.TweenRate;
SimAnim.W = 10000 * Other.AnimLast;
bAnimFinished = Other.bAnimFinished;
}
}
Code: Select all
function Tick(float deltatime)
{
AnimFor(yourhologram);
}
function AnimFor(actor Other)
{
if(Other!=None)
{
Other.AnimSequence = Pawn(Owner).AnimSequence;
Other.AnimFrame = Pawn(Owner).AnimFrame;
Other.AnimRate = Pawn(Owner).AnimRate;
Other.TweenRate = Pawn(Owner).TweenRate;
Other.AnimMinRate = Pawn(Owner).AnimMinRate;
Other.AnimLast = Pawn(Owner).AnimLast;
Other.bAnimLoop = Pawn(Owner).bAnimLoop;
Other.SimAnim.X = 10000 * Pawn(Owner).AnimFrame;
Other.SimAnim.Y = 5000 * Pawn(Owner).AnimRate;
Other.SimAnim.Z = 1000 * Pawn(Owner).TweenRate;
Other.SimAnim.W = 10000 * Pawn(Owner).AnimLast;
Other.bAnimFinished = Pawn(Owner).bAnimFinished;
}
}
Last edited by Age on Fri May 02, 2008 9:40 am, edited 1 time in total.
-
Bane
- OldUnreal Member
- Posts: 493
- Joined: Sun Mar 03, 2002 6:32 pm
Re: PLZ HELP - animation replication
AnimFrame is not replicated, which is likely your problem (I assume this works fine offline). Setting it every tick clientside (like in Age's code, but you'll need to make tick and AnimFor simulated) should fix it, and you honestly should be trying to set everything you can clientside and replicate as little as possible. I don't think there's anything for this problem that you'd need to replicate. For the movement, try PHYS_Trailer. It natively adjusts movement and rotation. I believe you want the location to be at an offset from the owner. There's a variable for that and another one to make rotation the same. Try going here for information on PHYS_Trailer: http://chimeric.beyondunreal.com/tutorials/tut27.php
Author of Hide and Seek mod, and the NALIBALL mod
Hide and Seek can be downloaded from:
http://HideNSeek.5u.com
Hide and Seek can be downloaded from:
http://HideNSeek.5u.com
-
Age
- OldUnreal Member
- Posts: 848
- Joined: Sat Dec 29, 2007 5:25 pm
Re: PLZ HELP - animation replication
Code: Select all
replication
{
unreliable if( Role==ROLE_Authority )
AnimFor;
}
simulated function AnimFor(actor a)
{
...
}
-
pink
- OldUnreal Member
- Posts: 39
- Joined: Wed Nov 05, 2003 3:01 pm
Re: PLZ HELP - animation replication
Thank you guys, that really was helpful.
I solved the problem using simulated function AnimFor, but phys_trailer is quite a discovery.
Thank you again!
I solved the problem using simulated function AnimFor, but phys_trailer is quite a discovery.
Thank you again!