• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Essentials Tutorial] Pokémon: Essentials coding 101

Rai Rai

Master of everything!
262
Posts
13
Years
  • Seen Aug 29, 2012
Well, today I announce myself here to give all of you game developers the basics of coding within Essentials. The main aim is to teach those how to make a simple window script with the day to day functions many other developers out there use to make their menus have that extra touch.
Enjoy.
Ps. If you want the code to keep reference without having to keep coming back here, I've put it in at the bottom of the thread.
Made a mistake on the code, on the last end of the code delete it, that will fix the error I made.
Tutorial.png

Spoiler:
 
Last edited:

Gmack

I'm back!
81
Posts
14
Years
sigh.... Finally someone makes this! Something i can relate to, not tutorials.
And best of all, it's for essentials! What a novel idea! XD
 

Luka S.J.

Jealous Croatian
1,270
Posts
15
Years
I'd have to be a downer, but there are quite a few thigs up there which would either give you a syntax error or an unwanted result. Good try though, the code is really clean. Now onto the fixes:

1. Quite an easy mistake to do with @frame. You started performing math functions without defining the variable. You first need to put @frame=0 somewhere before the update starts.

2. No text will be drawn as you forgot to place pbDrawText after textpositions have been defined, not to mention the lack of @overlay.clear to refresh the text.

3. The 51.times do command will not make the opacity go up smoothly, instead it will be filled in one frame, as there should be a pbWait(1) command before the end, that will make the whole function ladt 51 frames. Plus since it's in a loop, that function will repeat infinately, freezing your game, which is not what you want.

4. I have no idea what you put @frame in there for as it just resets when it reaches a number, don't know if that was intentional.

That's all I can see wrong/inaccurate for now.
 

Rai Rai

Master of everything!
262
Posts
13
Years
  • Seen Aug 29, 2012
I'd have to be a downer, but there are quite a few thigs up there which would either give you a syntax error or an unwanted result. Good try though, the code is really clean. Now onto the fixes:

1. Quite an easy mistake to do with @frame. You started performing math functions without defining the variable. You first need to put @frame=0 somewhere before the update starts.

2. No text will be drawn as you forgot to place pbDrawText after textpositions have been defined, not to mention the lack of @overlay.clear to refresh the text.

3. The 51.times do command will not make the opacity go up smoothly, instead it will be filled in one frame, as there should be a pbWait(1) command before the end, that will make the whole function ladt 51 frames. Plus since it's in a loop, that function will repeat infinately, freezing your game, which is not what you want.

4. I have no idea what you put @frame in there for as it just resets when it reaches a number, don't know if that was intentional.

That's all I can see wrong/inaccurate for now.

Heh yeah, was pretty late at the time of doing it XD. I'll change up all the errors once I get back tonight. Was a 5 minute whip up type thing cause I was asked questions :P.
 
Back
Top