Snow-Man Posted May 14, 2014 Posted May 14, 2014 Hey Guys, how can i make logo move up to down then login panel will be shown
Moderators Citizen Posted May 14, 2014 Moderators Posted May 14, 2014 You can use these functions: guiCreateStaticImage(to show your logo)getElementPosition (to get the current position of your logo)interpolateBetween(to calculate the next position of the gui element for the moving animation)setElementPosition(to set the new position calculated with interpolate between)addEventHandler (to execute a function when an event is triggered)setTimer(of 50 ms to update the position of your logo) (@Others: I know it's better to use interpolateBetween with onClientRender but I think it's too complicated for now) and this event: onPlayerJoin (to know when a player joins. So we will start the animation here)
Dealman Posted May 14, 2014 Posted May 14, 2014 Get/Set Element position for gui elements? Aye, their positions are stored via element data. That's how setElementPosition/Rotation works, it modifies the data. I discovered this while writing my own gamemdoe and named the datas PosX, PosY instead of posX, posY etc.. Which broke the position/rotation function.
Snow-Man Posted May 14, 2014 Author Posted May 14, 2014 You can use these functions: guiCreateStaticImage(to show your logo)getElementPosition (to get the current position of your logo)interpolateBetween(to calculate the next position of the gui element for the moving animation)setElementPosition(to set the new position calculated with interpolate between)addEventHandler (to execute a function when an event is triggered)setTimer(of 50 ms to update the position of your logo) (@Others: I know it's better to use interpolateBetween with onClientRender but I think it's too complicated for now) and this event: onPlayerJoin (to know when a player joins. So we will start the animation here) can you give me a simple exmaple about that ?
Moderators Citizen Posted May 14, 2014 Moderators Posted May 14, 2014 You can use these functions: guiCreateStaticImage(to show your logo)getElementPosition (to get the current position of your logo)interpolateBetween(to calculate the next position of the gui element for the moving animation)setElementPosition(to set the new position calculated with interpolate between)addEventHandler (to execute a function when an event is triggered)setTimer(of 50 ms to update the position of your logo) (@Others: I know it's better to use interpolateBetween with onClientRender but I think it's too complicated for now) and this event: onPlayerJoin (to know when a player joins. So we will start the animation here) can you give me a simple exmaple about that ? If I do a simple example, your script will be done. I gave you a lot of informations to let you do it. So try by yourself and come back with some code.
Snow-Man Posted May 14, 2014 Author Posted May 14, 2014 You can use these functions: guiCreateStaticImage(to show your logo)getElementPosition (to get the current position of your logo)interpolateBetween(to calculate the next position of the gui element for the moving animation)setElementPosition(to set the new position calculated with interpolate between)addEventHandler (to execute a function when an event is triggered)setTimer(of 50 ms to update the position of your logo) (@Others: I know it's better to use interpolateBetween with onClientRender but I think it's too complicated for now) and this event: onPlayerJoin (to know when a player joins. So we will start the animation here) can you give me a simple exmaple about that ? If I do a simple example, your script will be done. I gave you a lot of informations to let you do it. So try by yourself and come back with some code. ok thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now