Mover types
Mover types
Hi all,
I've not really done a lot of UScript at all, but this is what I want to make next for one of my maps. You know the game Swingball (you play it in the garden with a tennis ball tied around a pole). I basically want to make a version of that which you can play against a bot with the insta rifle. As far as I know, I can't use a version of the RotatingMover, because it bugs online? So my next thought is this: how do I have a mover with two key positions, but which takes a different route to get to the other position depending on which side you hit it on?
I'll try and work something out, but as far as I can see, it's not particularly simple, unless there is a "fix" for the RotatingMover, which should make it easier...
I've not really done a lot of UScript at all, but this is what I want to make next for one of my maps. You know the game Swingball (you play it in the garden with a tennis ball tied around a pole). I basically want to make a version of that which you can play against a bot with the insta rifle. As far as I know, I can't use a version of the RotatingMover, because it bugs online? So my next thought is this: how do I have a mover with two key positions, but which takes a different route to get to the other position depending on which side you hit it on?
I'll try and work something out, but as far as I can see, it's not particularly simple, unless there is a "fix" for the RotatingMover, which should make it easier...
Thanks in advance for answering the above question!
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Mover types
You'll have to script that yourself. Just use a normal mover but give it a choice of keypoints to use and decide on which choice by the instigator.
So long, and thanks for all the fish
- Creavion
- Godlike
- Posts: 4497
- Joined: Sun Feb 17, 2008 7:23 pm
- Personal rank: About to be non-act.
- Location: Germany, Lower Saxony
Re: Mover types
http://www.wiki.beyondunreal.com/Legacy:RotatingMover
There is already a fixed rotating mover script which is supposed to work online from what I read there.
There is already a fixed rotating mover script which is supposed to work online from what I read there.
About to be non-active
My very last UT map project: CTF-FacePalm (tropical CTF-Face remake)
Why do I leave? click here
What I want to do next: Joining an UDK team (uncertain however) and improve 3D modelling and texture editing skills
Thanks to those who visibly supported me until/at the end!
My reactivated account on indiedb.com.
My very last UT map project: CTF-FacePalm (tropical CTF-Face remake)
Why do I leave? click here
What I want to do next: Joining an UDK team (uncertain however) and improve 3D modelling and texture editing skills
Thanks to those who visibly supported me until/at the end!
My reactivated account on indiedb.com.
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Mover types
The rotating movers I've ever seen were all full of stutter. I think you'd have to run it as simulated to get the stutter to go away and then the true position wouldn't feel right. You can see this in regular movers that travel a long path. The simulated part makes the mover look smooth but from your perspective the players ghost up and down as the server tried to keep position updated.
If you get stuck on this, let me know and I'll script it for you.
If you get stuck on this, let me know and I'll script it for you.
So long, and thanks for all the fish
Re: Mover types
i think i would use something like the soccerball in ut soccer. then give it some other physiscs
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Mover types
I think the soccerball is just a pylon with another mesh added? Oh wait you mean the whole soccerball mod, nvm.
So long, and thanks for all the fish
Re: Mover types
I don't think a mover is the solution for your idea. You should create a new actor (decoration or whatever), and script it's physics so it swings around a point after it has been hit.
Website, Forum & UTStats
******************************************************************************
Nexgen Server Controller || My plugins & mods on GitHub
******************************************************************************
******************************************************************************
Nexgen Server Controller || My plugins & mods on GitHub
******************************************************************************
Re: Mover types
Ok, so I'll have to make a new mover, and a new trigger. Then the trigger needs to pass a further parameter to the mover when it triggers, and the mover needs to use that parameter to work out where to go to. Heh. I have a small amount of experience coding in Java and VisualBasic (noob xd), but I do find UScript hard to look at sometimesJackGriffin wrote:You'll have to script that yourself. Just use a normal mover but give it a choice of keypoints to use and decide on which choice by the instigator.
Thanks in advance for answering the above question!
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Mover types
It won't be hard. Setting the correct keypoints will be the tricky part. You'll likely have to log the keypoints in each direction first via code, then go back and plug those into the mover script. If you get stuck, just let us know.
So long, and thanks for all the fish
Re: Mover types
Can I not just set a number of different keypoints, each with a tag, and then interpolate to that point?
Mapping always takes me a while lol, I always find myself too busy to sit down and do it at the moment. I've basically been working on it as much as I can, and I still haven't really got past thinking about it
Thanks for the advice, I'll let you know what (if anything) I work out.
Mapping always takes me a while lol, I always find myself too busy to sit down and do it at the moment. I've basically been working on it as much as I can, and I still haven't really got past thinking about it
Thanks for the advice, I'll let you know what (if anything) I work out.
Thanks in advance for answering the above question!
Re: Mover types
Ok so I have done some stuff, and got stuck.
First, I did this to make my mover type:
This compiled, great.
Notes: I replaced DoOpen with my own OpenMover(int) - is this bad? I have also replaced Trigger with SMTrigger, because it has to take an extra parameter, is this bad? I have a feeling it might be, because when I then make the trigger class:
...it doesn't compile, because it doesn't recognise SMTrigger in ShootMover. So I'm a little bit stuck, because I thought it would do
Further notes:
- I don't really know the difference between expands and extends. When should each be used?
- All I have done is edit this in Ued, and hit Compile Changed. Do I need to do something else to "finish" my mover class, in order to make the trigger class recognise it?
Thanks again
First, I did this to make my mover type:
Code: Select all
class ShootMover expands Mover;
var(ShootMover) name Tags [20];
...some other stuff is in here...
function OpenMover(int NextKey)
{
//SavedTrigger.Instigator.ClientMessage( "DoOpen called" );
bOpening = true;
bDelaying = false;
LastKeyNum = KeyNum;
InterpolateTo (NextKey, MoveTime);
PlaySound (OpeningSound);
AmbientSound = MoveAmbientSound;
}
function DoOpen()
{
}
...some other stuff is in here...
state() ShootTriggerControl
{
function SMTrigger( actor Other, pawn EventInstigator, name NextTag )
{
PreviousKey = KeyNum;
//SavedTrigger.Instigator.ClientMessage( NumKeys );
SavedTrigger = Other;
Instigator = EventInstigator;
if ( SavedTrigger != None )
{
SavedTrigger.BeginEvent();
while (n<20)
{
if (Tags[n] == NextTag)
{
GotoState( 'ShootTriggerControl', 'Open' );
n=20;
}
n=n+1;
}
}
}
Open:
Disable ('SMTrigger');
OpenMover(n);
FinishInterpolation();
FinishedOpening();
Enable ('SMTrigger');
Sleep(StayOpenTime);
DoClose();
}
Notes: I replaced DoOpen with my own OpenMover(int) - is this bad? I have also replaced Trigger with SMTrigger, because it has to take an extra parameter, is this bad? I have a feeling it might be, because when I then make the trigger class:
Code: Select all
class ShootTrigger extends Trigger;
var(Trigger) name TagSelect;
function Touch( actor Other )
{
local ShootMover A;
if( Super.IsRelevant( Other ) )
{
if( Event != '' )
foreach AllActors( class 'ShootMover', A, Event )
A.SMTrigger( Other, Other.Instigator, TagSelect );
}
}
Further notes:
- I don't really know the difference between expands and extends. When should each be used?
- All I have done is edit this in Ued, and hit Compile Changed. Do I need to do something else to "finish" my mover class, in order to make the trigger class recognise it?
Thanks again
Thanks in advance for answering the above question!
-
- Godlike
- Posts: 3774
- Joined: Fri Jan 14, 2011 1:53 pm
- Personal rank: -Retired-
Re: Mover types
You are making it too obtuse. Unless you are creating a mover type you are going to use again and again, just hand code the mover itself to check for instigator's team. If it's red team then cycle these keypoints, blue does these other keypoints. You'll have to account for it being triggered by the other team mid-cycle too.
So long, and thanks for all the fish