Post: Easier way of animating your menu's!
09-09-2011, 01:52 PM #1
Correy
I'm the Original
(adsbygoogle = window.adsbygoogle || []).push({}); i made this for a friend but it will be useful in a few ways.
- it's less coding
- it's much easier

so, in your GSC place this code somewhere in there
    
Animate(Axis,NewPos,Time)
{
self moveOverTime(Time);
self.Axis=NewPos;
}


so, now.. you will need to make your shader move, could be your scroll bar or your background but either way you will use the same method.
i will give you the syntax of this then explain it too you.
    
self.ScrollBar Animate(Axis, New Position, Time It Takes To Move);


so, you need to declare which element you are move, i've used ScrollBar, there for you enter..
    
self.YourShader


then you need to make it move, thats what the second part is for..
    Animate("AXIS", "POSITION", "TIME");


you need to declare which axis you are moving, if you don't know what axis are then Y Axis represents up or down, X represents left to right.
so, you need to put.. x or y.
    "THE AXIS" / "Y"


the next part is the new posistion you want it to move to
note: you need to code the shader to the start position
so, you will enter the co-ordinate of the new position, there is no real method of finding the co-ordinate but you need to experiment with it.
    "NEW POSITION", "120"


finally, the end number.. this represents the amount of seconds it takes for the shader to finally move to it's position which you shouldn't need an example for.
for a final result you should end up with something like this.
    
self.MyShader Animate("Y", "120", "1");


that will successfully move you shader or element.
i hope you find this useful.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 2 users say thank you to Correy for this useful post:

iReset Nigga, x_DaftVader_x
09-09-2011, 01:55 PM #2
iReset Nigga
2Fresshh!!
Thanks My nigga i will def be using this in my new patch 1ce Studman gives me the damn menu base :p
09-09-2011, 01:56 PM #3
247Yamato
< ^ > < ^ >
Good idea, is far better than what I saw in other menus
09-09-2011, 01:59 PM #4
Correy
I'm the Original
Originally posted by 247Yamato View Post
Good idea, is far better than what I saw in other menus


cheers, it's better than putting god damn eleMoveY and eleMoveX and getting confused :p
i might like, edit it so you can move both in one function Smile
09-09-2011, 02:46 PM #5
iReset Nigga
2Fresshh!!
Originally posted by Correy View Post
cheers, it's better than putting god damn eleMoveY and eleMoveX and getting confused :p
i might like, edit it so you can move both in one function Smile


You Should do that and we could make it so 1 goes 1 way and the other goes the other way that would be pretty sick :p
09-09-2011, 03:00 PM #6
Correy
I'm the Original
Originally posted by iReset View Post
You Should do that and we could make it so 1 goes 1 way and the other goes the other way that would be pretty sick :p


wasn't hard done it here.
    Animate(xAxis,yAxis)
{
self moveOverTime(1);
self.x = xAxsis;
self.y = yAxsis;
}


i've set the time to a defualt '1' but easy changed.
    
self.scroller Animate(X New Pos, Y New Pos);

The following user thanked Correy for this useful post:

iReset Nigga
09-09-2011, 04:24 PM #7
Originally posted by Correy View Post
i made this for a friend but it will be useful in a few ways.
- it's less coding
- it's much easier

so, in your GSC place this code somewhere in there
    
Animate(Axis,NewPos,Time)
{
self moveOverTime(Time);
self.Axis=NewPos;
}


so, now.. you will need to make your shader move, could be your scroll bar or your background but either way you will use the same method.
i will give you the syntax of this then explain it too you.
    
self.ScrollBar Animate(Axis, New Position, Time It Takes To Move);


so, you need to declare which element you are move, i've used ScrollBar, there for you enter..
    
self.YourShader


then you need to make it move, thats what the second part is for..
    Animate("AXIS", "POSITION", "TIME");


you need to declare which axis you are moving, if you don't know what axis are then Y Axis represents up or down, X represents left to right.
so, you need to put.. x or y.
    "THE AXIS" / "Y"


the next part is the new posistion you want it to move to
note: you need to code the shader to the start position
so, you will enter the co-ordinate of the new position, there is no real method of finding the co-ordinate but you need to experiment with it.
    "NEW POSITION", "120"


finally, the end number.. this represents the amount of seconds it takes for the shader to finally move to it's position which you shouldn't need an example for.
for a final result you should end up with something like this.
    
self.MyShader Animate("Y", "120", "1");


that will successfully move you shader or element.
i hope you find this useful.

Boring menus are boring... :pirate:

The following user thanked x_DaftVader_x for this useful post:

247Yamato
09-09-2011, 05:56 PM #8
Correy
I'm the Original
Originally posted by x. View Post
Boring menus are boring... :pirate:


could be for text Winky Winky
cough, text like a scrollable menu.. cough, yours, cough.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo