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

Rotating Mover

UnrealEd 2.1 (227i) and UnrealEd 2.2 (227j), for Unreal 227. With many additions, bugfixes and improvements. Ask mapping related questions, or give hints, tips and tricks.
Post Reply
User avatar
Rubie
OldUnreal Member
Posts: 170
Joined: Sat Jan 19, 2013 9:30 am
Location: Belgium
Contact:

Rotating Mover

Post by Rubie »

Hi,

Before I search deeper alone I wan tot ask the community how I can fix it
Did tried 2 movers:
1 Rotatingmover
2 MixMover

I want to have a rotating mover that run in loop and can be started and stopped by a trigger , how can I fix this ?

sofar did tried with a dispatcher (also without disp) and 2 triggers ( normal/toggle/ turnon,turnoff) nothing from this settings works sofar, also did tried different options from the movers (under Movement and so on).

there are 6 movers in fact looks like kinda axes that will rotate but they need to begin rotating only on end from the room and stop if entry door is reached again.

Screenie [img]http://img-cdn.filefactory.com/embed/xl/5c8bgk07hevz.png[/img]

Greets, Rubie
I have no signature :)
User avatar
Hellkeeper
Global Moderator
Posts: 3260
Joined: Wed May 21, 2008 8:24 pm
Location: France
Contact:

Re: Rotating Mover

Post by Hellkeeper »

Can't make tests for you right now but a few things to consider:

- If you use a rotating mover, any triggering will activate or deactivate the rotation, I don't think it affects any keyframed movement
- Rotating movers don't work online IIRC
- You can use RotationRate to give the mover a constant spin, but I don't know how it will react with triggers.
You must construct additional pylons.
User avatar
Leo T_C_K
OldUnreal Member
Posts: 3673
Joined: Sat Aug 27, 2005 6:24 pm

Re: Rotating Mover

Post by Leo T_C_K »

There are some issues with them usually like player can bump them and so on and reset their rotation. There are ways to bypass that as setting their initialstate to none etc.

Otherwise you could use loopmover or just set the keyframes to rotate during that.
Last edited by Leo T_C_K on Thu Jan 05, 2017 10:43 am, edited 1 time in total.
User avatar
Rubie
OldUnreal Member
Posts: 170
Joined: Sat Jan 19, 2013 9:30 am
Location: Belgium
Contact:

Re: Rotating Mover

Post by Rubie »

Hi thx both for fast reply,

will tryout couple things said above here :)

Rotating movers don't work online IIRC
don't they really ? Does not all movers are Role_Simulatedproxy or is there a bug in this mover ?

There are some issues with them usually like player can bump them and so on and reset their rotation
this I bypass by setting the mover Me_CrushWhenEncroach as this is the target from this mover so he keeps rotating and kill the playerpawn if they bump into it, the reason it should only rotate after trigger been touched = I don't want the scriptedpawns are killed by the movers and this will surprise the player on his way back to the door lol.


Greets, Rubie
I have no signature :)
User avatar
Leo T_C_K
OldUnreal Member
Posts: 3673
Joined: Sat Aug 27, 2005 6:24 pm

Re: Rotating Mover

Post by Leo T_C_K »

They do work online, its just some rotating movers have shoddy replication.
User avatar
Skywolf
OldUnreal Member
Posts: 880
Joined: Sun Aug 02, 2009 12:20 pm

Re: Rotating Mover

Post by Skywolf »

I once wrote a little script that makes a RotatingMover toggleable. Also has a option to slowly spin up/down. It probably isn't perfect though and the more experienced coders here will probably tell the code is terrible :D.

Code: Select all

//=============================================================================
// RotatingMoverDeluxe. //Can be turned on/off.
//=============================================================================
class RotatingMoverDeluxe expands RotatingMover;

var bool SlowUp, SpinDown;
Var Float OldPitch,OldRoll,OldYaw,CurPitch,CurRoll,CurYaw; //Using Float to allow rotation values over 65536.
Var() Float Time2Stop; //Time the mover will take to spin up/down.

function BeginPlay()
{
      Disable( 'Tick' );

      OldPitch = RotateRate.Pitch;
      OldRoll = RotateRate.Roll;
      OldYaw = RotateRate.Yaw;

      CurPitch = RotateRate.Pitch;
      CurRoll = RotateRate.Roll;
      CurYaw = RotateRate.Yaw;
}

function Tick( float DeltaTime )
{
      Local Rotator TempRot;

      TempRot.Pitch = ( Rotation.Pitch + (CurPitch*DeltaTime) );
      TempRot.Roll = ( Rotation.Roll + (CurRoll*DeltaTime) );
      TempRot.Yaw = ( Rotation.Yaw + (CurYaw*DeltaTime) );
      SetRotation (TempRot);
      
      if (SlowUp)
      {
            if (SpinDown)
            {
                  CurPitch = Curpitch-((OldPitch/Time2Stop)*DeltaTime);
                  CurRoll = CurRoll-((OldRoll/Time2Stop)*DeltaTime);
                  CurYaw = CurYaw-((OldYaw/Time2Stop)*DeltaTime);
            
                  if (OldPitch < 0 && CurPitch > 0 || OldPitch > 0 && CurPitch < 0) CurPitch = 0;
                  if (OldRoll < 0 && CurRoll > 0 || OldRoll > 0 && CurRoll < 0) CurRoll = 0;
                  if (OldYaw < 0 && CurYaw > 0 || OldYaw > 0 && CurYaw < 0) CurYaw = 0;
                  
                  if (CurPitch == 0 && CurRoll == 0 && CurYaw == 0) SlowUp = False;
            }

            else
            {
                  CurPitch = Curpitch+((OldPitch/Time2Stop)*DeltaTime);
                  CurRoll = CurRoll+((OldRoll/Time2Stop)*DeltaTime);
                  CurYaw = CurYaw+((OldYaw/Time2Stop)*DeltaTime);

                  if (OldPitch < 0 && CurPitch < OldPitch || OldPitch > 0 && CurPitch > OldPitch) CurPitch = OldPitch;
                  if (OldRoll < 0 && CurRoll < OldRoll || OldRoll > 0 && CurRoll > OldRoll ) CurRoll = OldRoll;
                  if (OldYaw < 0 && CurYaw < OldYaw || OldYaw > 0 && CurYaw > OldYaw) CurYaw = OldYaw;

                  if (CurPitch == OldPitch && CurRoll == OldRoll && CurYaw == OldYaw) SlowUp = False;
            }

      }
}

function Trigger( Actor other, Pawn EventInstigator )
{
      SlowUp = True;
      if (!SpinDown) SpinDown = True;
      Else SpinDown = False;
}

function UnTrigger( Actor other, Pawn EventInstigator )
{
      //Disable('Tick');
}
I hate it when people ask me what my favorite game is. Just try to explain you're not talking about Unreal Tournament ::).
User avatar
Leo T_C_K
OldUnreal Member
Posts: 3673
Joined: Sat Aug 27, 2005 6:24 pm

Re: Rotating Mover

Post by Leo T_C_K »

Perhaps that's just what Rubie would like actually.
User avatar
Rubie
OldUnreal Member
Posts: 170
Joined: Sat Jan 19, 2013 9:30 am
Location: Belgium
Contact:

Re: Rotating Mover

Post by Rubie »

Thx SkyWolf will experiment with this this afternoon :)

Greets, Rubie
I have no signature :)
User avatar
Rubie
OldUnreal Member
Posts: 170
Joined: Sat Jan 19, 2013 9:30 am
Location: Belgium
Contact:

Re: Rotating Mover

Post by Rubie »

okay did experiment with all movers that are standard in Unreal , I must say the mover script from Skywolf works good with a trigger set to Triggerpound (time2stop does nothing add all) only it need some more lines in it to work as I think it should work, a part from the script  "LOOPMOVER" can maybe fix this I don't know how I can do this.
I did used triggerpound as it does not stop when you want it to stop and this caused me to think how it can be fixed so as long the instigator is into the collision radius from the trigger it turns once outside the collision it stops and turn back I want to avoid this visible happens so here below this can be maybe the solution.

this is what should be inserted in to the code imo:

// When the last keyframe position is reached, this mover should
// interpolates to the first keyframe (directly, not through
// the intermediate frames)

if this can be done I think it would cover my problem (not only my problem imo).
I did already asked once  long time ago this but not quit good explained like now as I wanted a plane to move like this and not fly backwards to the  key-frame 0  as this looked really weird a plane that fly reverse lol,
and now the same with this model  looks weird to see it run backwards :).

So if someone has the time that would be great .

btw a loopmover has several problems some other too for example if you assign a sound to the loopmover it wont turnoff sound even if it not runs or did stop to run? answer will be => its  a loopmover lol well even if it is a loopmover this should not be infinity loop sound if opening sound is defined it should only play openingsound (or closingsound if defined) and not loop it imo.

Maybe we should move this topic into Uscript board ??

Greets, Rubie have a Nice Week-End all!
Last edited by Rubie on Sat Jan 07, 2017 12:34 pm, edited 1 time in total.
I have no signature :)
User avatar
Skywolf
OldUnreal Member
Posts: 880
Joined: Sun Aug 02, 2009 12:20 pm

Re: Rotating Mover

Post by Skywolf »

My code is written to be triggered by another script like a dispatcher. If you use just a plain Trigger be sure to set a small ReTriggerDelay else it is pretty much random wether it starts rotating or not. The Initial state should be set to None as this code works independent of Mover States and these only interfere.

Cant really understand what you're tyring to do TBH. The broken english doesn't help either. From what I get do you want a mover to start rotating when triggered and, when stopped, move back to the original position. Either that or you're trying to make a mover rotate while it moves to different KeyPoints. Which would never work smoothly as Rotation is part of a KeyPoint.

Also: Improved code to support starting still and spin up when triggered.

Code: Select all

//=============================================================================
// RotatingMoverDeluxe. //Can be turned on/off.
//=============================================================================
class RotatingMoverDeluxe expands RotatingMover;

var bool SlowUp, SpinDown;
var() bool bInitiallyOn;
Var Float OldPitch,OldRoll,OldYaw,CurPitch,CurRoll,CurYaw; //Using Float to allow rotation values over 65536.
Var() Float Time2Stop; //Time the mover will take to spin up/down.

function BeginPlay()
{
      Disable( 'Tick' );

      OldPitch = RotateRate.Pitch;
      OldRoll = RotateRate.Roll;
      OldYaw = RotateRate.Yaw;

      if (bInitiallyOn)
      {
            CurPitch = RotateRate.Pitch;
            CurRoll = RotateRate.Roll;
            CurYaw = RotateRate.Yaw;
      }
      else
            CurPitch = 0;
            CurRoll = 0;
            CurYaw = 0;
            SpinDown=True;
}

function Tick( float DeltaTime )
{
      Local Rotator TempRot;

      TempRot.Pitch = ( Rotation.Pitch + (CurPitch*DeltaTime) );
      TempRot.Roll = ( Rotation.Roll + (CurRoll*DeltaTime) );
      TempRot.Yaw = ( Rotation.Yaw + (CurYaw*DeltaTime) );
      SetRotation (TempRot);
      
      if (SlowUp)
      {
            if (SpinDown)
            {
                  CurPitch = Curpitch-((OldPitch/Time2Stop)*DeltaTime);
                  CurRoll = CurRoll-((OldRoll/Time2Stop)*DeltaTime);
                  CurYaw = CurYaw-((OldYaw/Time2Stop)*DeltaTime);
            
                  if (OldPitch < 0 && CurPitch > 0 || OldPitch > 0 && CurPitch < 0) CurPitch = 0;
                  if (OldRoll < 0 && CurRoll > 0 || OldRoll > 0 && CurRoll < 0) CurRoll = 0;
                  if (OldYaw < 0 && CurYaw > 0 || OldYaw > 0 && CurYaw < 0) CurYaw = 0;
                  
                  if (CurPitch == 0 && CurRoll == 0 && CurYaw == 0) SlowUp = False;
            }

            else //SpinUp
            {
                  CurPitch = Curpitch+((OldPitch/Time2Stop)*DeltaTime);
                  CurRoll = CurRoll+((OldRoll/Time2Stop)*DeltaTime);
                  CurYaw = CurYaw+((OldYaw/Time2Stop)*DeltaTime);

                  if (OldPitch < 0 && CurPitch < OldPitch || OldPitch > 0 && CurPitch > OldPitch) CurPitch = OldPitch;
                  if (OldRoll < 0 && CurRoll < OldRoll || OldRoll > 0 && CurRoll > OldRoll ) CurRoll = OldRoll;
                  if (OldYaw < 0 && CurYaw < OldYaw || OldYaw > 0 && CurYaw > OldYaw) CurYaw = OldYaw;

                  if (CurPitch == OldPitch && CurRoll == OldRoll && CurYaw == OldYaw) SlowUp = False;
            }

      }
}

function Trigger( Actor other, Pawn EventInstigator )
{
      SlowUp = True;
      if (!SpinDown) SpinDown = True;
      Else SpinDown = False;
}

function UnTrigger( Actor other, Pawn EventInstigator )
{
      //Disable('Tick');
}
I hate it when people ask me what my favorite game is. Just try to explain you're not talking about Unreal Tournament ::).
User avatar
Rubie
OldUnreal Member
Posts: 170
Joined: Sat Jan 19, 2013 9:30 am
Location: Belgium
Contact:

Re: Rotating Mover

Post by Rubie »

Okay thank you , thisone works already better with the possibility to bInitiallyOn=false or true
if we could now give it a sound that start and stop on sequence from the mover that shall be perfect.
I did not knew the initial State did have to been set to None that makes it so confusing in unreal everything is set same never less it should not be so for all those different actors
like for the movers all is set to BumpOpenTimed standard for example a assertmover should be standard set AssertTriggerOpenTimed imo but okay this is how it is just search in the forest for the right tree hehe and one day you find it that's how I feel it... :)

did tried to make the AmbientSound for this mover with a TriggeredAmbientSound actor but this doesn't work neither it starts but don't stop lol. there are couples option did tried them both without success.

it's time I learn to create some tiny script so I don't have to annoy always peoples over here with my problems...... :)
I have no signature :)
User avatar
Skywolf
OldUnreal Member
Posts: 880
Joined: Sun Aug 02, 2009 12:20 pm

Re: Rotating Mover

Post by Skywolf »

The RotatingMover is a strange thing in general. It seems like a quick fix for RotatingRate (under Movement) not working properly on Movers.


Anyway, Updated it! Fixed bInitiallyOn not working (Is what I get for not testing for once :-[) and added sound support. It uses the same sound settings as regular movers (OpeningSound, ClosingSound .etc).

Opening is for spinning up.
Opened for being spinned up completely.
Closing and closed is the same only for when spinning down.
MoveAmbientSound plays as long as it's rotating.

Also added an option to make the SoundPitch increase together with the Rotation. Because I had a few more minutes to spare :D.

Code: Select all

//=============================================================================
// RotatingMoverDeluxe. //Can be turned on/off.
//=============================================================================
class RotatingMoverDeluxe expands RotatingMover;

var bool SlowUp, SpinDown;
var() bool bInitiallyOn;
var() bool bIncreasePitch; //Slowly increase/decrease SoundPitch together with Spinning up/down.
Var() byte LowestSoundPitch, HighestSoundPitch; //SoundPitch at lowest/Highest Rotating speed. Only Used when bIncreasePitch is set to True.
Var Float OldPitch,OldRoll,OldYaw,CurPitch,CurRoll,CurYaw; //Using Float to allow rotation values over 65536.
Var Float TempSoundPitch;
Var() Float Time2Stop; //Time the mover will take to spin up/down.

function BeginPlay()
{
      Disable( 'Tick' );

      OldPitch = RotateRate.Pitch;
      OldRoll = RotateRate.Roll;
      OldYaw = RotateRate.Yaw;

      if (bInitiallyOn)
      {
            CurPitch = RotateRate.Pitch;
            CurRoll = RotateRate.Roll;
            CurYaw = RotateRate.Yaw;
            if (bIncreasePitch) 
            {
                  TempSoundPitch = HighestSoundPitch;
                  SoundPitch = HighestSoundPitch;
            }
            AmbientSound = MoveAmbientSound;
      }
      else
      {
            CurPitch = 0;
            CurRoll = 0;
            CurYaw = 0;
            SpinDown=True;
            if (bIncreasePitch) 
            {
                  TempSoundPitch = LowestSoundPitch;
                  SoundPitch = LowestSoundPitch;
            }
      }
}

function Tick( float DeltaTime )
{
      Local Rotator TempRot;

      TempRot.Pitch = ( Rotation.Pitch + (CurPitch*DeltaTime) );
      TempRot.Roll = ( Rotation.Roll + (CurRoll*DeltaTime) );
      TempRot.Yaw = ( Rotation.Yaw + (CurYaw*DeltaTime) );
      SetRotation (TempRot);
      
      if (SlowUp)
      {
            if (SpinDown)
            {
                  CurPitch = Curpitch-((OldPitch/Time2Stop)*DeltaTime);
                  CurRoll = CurRoll-((OldRoll/Time2Stop)*DeltaTime);
                  CurYaw = CurYaw-((OldYaw/Time2Stop)*DeltaTime);
            
                  if (OldPitch < 0 && CurPitch > 0 || OldPitch > 0 && CurPitch < 0) CurPitch = 0;
                  if (OldRoll < 0 && CurRoll > 0 || OldRoll > 0 && CurRoll < 0) CurRoll = 0;
                  if (OldYaw < 0 && CurYaw > 0 || OldYaw > 0 && CurYaw < 0) CurYaw = 0;
                  
                  if (CurPitch == 0 && CurRoll == 0 && CurYaw == 0)
                  {
                        SlowUp = False;
                        PlaySound(ClosedSound, SLOT_None );
                        AmbientSound = None;
                  }

                  if (bIncreasePitch)
                  {
                        TempSoundPitch -= ((HighestSoundPitch-LowestSoundPitch)/Time2Stop)*DeltaTime;
                        if (TempSoundPitch < LowestSoundPitch) TempSoundPitch = LowestSoundPitch;
                        SoundPitch = TempSoundPitch;
                  }

            }

            else //SpinUp
            {
                  CurPitch = Curpitch+((OldPitch/Time2Stop)*DeltaTime);
                  CurRoll = CurRoll+((OldRoll/Time2Stop)*DeltaTime);
                  CurYaw = CurYaw+((OldYaw/Time2Stop)*DeltaTime);

                  if (OldPitch < 0 && CurPitch < OldPitch || OldPitch > 0 && CurPitch > OldPitch) CurPitch = OldPitch;
                  if (OldRoll < 0 && CurRoll < OldRoll || OldRoll > 0 && CurRoll > OldRoll ) CurRoll = OldRoll;
                  if (OldYaw < 0 && CurYaw < OldYaw || OldYaw > 0 && CurYaw > OldYaw) CurYaw = OldYaw;

                  if (CurPitch == OldPitch && CurRoll == OldRoll && CurYaw == OldYaw)
                  {
                        SlowUp = False;
                        PlaySound(OpenedSound, SLOT_None );
                  }

                  if (bIncreasePitch)
                  {
                        TempSoundPitch += ((HighestSoundPitch-LowestSoundPitch)/Time2Stop)*DeltaTime;
                        if (TempSoundPitch > HighestSoundPitch) TempSoundPitch = HighestSoundPitch;
                        SoundPitch = TempSoundPitch;
                  }

            }
      }
}


function Trigger( Actor other, Pawn EventInstigator )
{
      SlowUp = True;
      if (!SpinDown)
      {
            SpinDown = True;
            PlaySound (ClosingSound, SLOT_None);
      }
      Else
      {
            SpinDown = False;
            PlaySound (OpeningSound, SLOT_None);
      }

      if (AmbientSound == none) AmbientSound = MoveAmbientSound;
}

function UnTrigger( Actor other, Pawn EventInstigator )
{
      //Disable('Tick');
}
And I would indeed recommend learning some basic uscript. There's are alot of little things you should be able to do but can't by default (Like having a working TriggeredAmbientSound).

From my experience here do the nice people here don't mind you asking stupid coding questions nearly as much as most programming focused communities do. athough the latter could have something to do with alot of programmers being part of Linux communities aswell....
I hate it when people ask me what my favorite game is. Just try to explain you're not talking about Unreal Tournament ::).
User avatar
Rubie
OldUnreal Member
Posts: 170
Joined: Sat Jan 19, 2013 9:30 am
Location: Belgium
Contact:

Re: Rotating Mover

Post by Rubie »

Well this is awesome work perfect all needs are fulfilled in this mover!
Also the Pitch control from sound is awesome and realistic on rotating movers if you like to use it !

did added this into code your credits !

//=============================================================================
// Made by Skywolf for Rubies Project
// RotatingMoverDeluxe. //Can be turned on/off.
// For proper use set InitialState under Object = None
//=============================================================================


Thank You

My fault did started long time ago when I did choose the OS  i wanted to work with, I did choose for Windows I know this.
The problems in  the nineties was Linux wasn't easy at all to configure I did tried it but never found out how to manage the sound module so this made me to step away from Linux as I did not have free time to jump into that problem and build up the knowledge as I was young and worked very hard for the family and today I don't feel  myself ad a point to start now with Linux as is to late for me I'm to old to make this step that would take again many years to understand it. :(

Next to all of this I did learned auto mechanics and this is far away from electronics (micro) and software that is written in bytes for all this hardware and even the poor english I know did have to learn it alone over here on my computer hehe........ :)
but okay all know this by now.

Last edited by Rubie on Sun Jan 08, 2017 2:21 pm, edited 1 time in total.
I have no signature :)
User avatar
Skywolf
OldUnreal Member
Posts: 880
Joined: Sun Aug 02, 2009 12:20 pm

Re: Rotating Mover

Post by Skywolf »

Thanks for crediting me! :D. Really wasn't a big deal though but happy I could help out :).

btw: I was talking about how programmers seem to ofter prefer Linux and how many Linux fans are often elitist douchbags . Learning to code (And especially uScript) has nothing to do with knowing how to work with Linux.

I hate it when people ask me what my favorite game is. Just try to explain you're not talking about Unreal Tournament ::).
Post Reply

Return to “UnrealEd 2.x, the Unreal 227 editors”