• 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.

General game making help

Status
Not open for further replies.
29
Posts
13
Years
    • Seen Sep 9, 2014
    It's been a long time since I've written AS2, but you could possibly try this.
    Code:
    totalScore = 0; //variable used to keep track of your current score
    on (press) {
    totalScore+=1;
    this.parent.pokemoncaughteasy.gotoAndStop(totalScore);
    
    //unload Movie Behavior
         if(this == Number(this)){
             unloadMovieNum(this);
         } else {
             this.unloadMovie();
         }
         //End Behavior
    
    }
    It's not working...
    So I removed the first line:
    "This script contains no errors"
    LIES
    the script wouldn't work, neither does it work with the first line.

    Do I need to add the totalscore to some other place?
    You gotta remember I'm putting it on 151 different Pokémon.

    Maybe I should add the first line to the frame instead of the mc?
    Or should I change the variable of totalscore to the "currentFrame" or something?
     

    Magicsaur

    Code Hero
    29
    Posts
    13
    Years
  • perhaps the problem is that you are trying to remove the child from within it. try rewriting the code so it goes in the parent MovieClip.

    also, is this totalscore a number?

    because instead of using a movieClip for that, you could have dynamic text in the parent and instead of trying to go to the next frame, just change its text to the current score.

    well idk if it'll help, but here's how i'd do it if I was using AS3. This code would go on the main timeline. c:

    Code:
    var totalScore:Number = 0; //Number to keep track of your current score
    
    var pokeMC:MovieClip; //base movieClip to create a pokemon in.
    function createPokemon(pokemonNumber:Number):void {
    //you would have to export the pokemon MovieClip and export it for actionscript, and give it the Class name of Pokemon. located under Library>yourMovieClip>Properties>Advanced.
    pokeMC = new Pokemon();
    pokeMC.gotoAndStop(pokemonNumber); //if you kept each pokemon pic in one frame in pokeMC.
    
    //eventlistener for pokeMC... this is part of what makes AS3 way better than AS2- event handlers.
    pokeMC.addEventListener(MouseEvent.MOUSE_UP, onReleaseEvent);
    
    //add it to the stage.
    addChild(pokeMC);
    }
    
    //This is the event listener function that is called when the mouse button is released.
    function onReleaseEvent(e:MouseEvent):void {
    //total score gets 1 added to it.
    totalScore += 1;
    
    //you update your dynamic text to have the new totalScore.
    totalScoreTxt.text = totalScore;
    /*or we could do something more fancy here and add zeros
    if(totalScore <10) totalScoreTxt.text = "00" + totalScore;
    if(totalScore >= 10 && totalScore < 100) totalScoreTxt.text = "0" + totalScore;
    
    //remove the event listener so this doesn't happen again for the movieClip you just clicked.
    e.currentTarget.removeEventListener(MouseEvent.MOUSE_UP, onReleaseEvent);
    
    //remove the pokemon you clicked on.
    removeChild(e.currentTarget as MovieClip);
    }
    
    //whenever you want to create a pokemon, use the createPokemon function written above.
    //this would create Bulbasaur if you set it up according to the notes in the function.
    //createPokemon(1);
     
    Last edited:

    Neo-Spriteman

    or goloog. that works too.
    209
    Posts
    15
    Years
    • Age 26
    • MD
    • Seen Jun 19, 2015
    Having trouble using MP3s. They keep lagging for some reason... Help, please?
     

    Sero

    私はセクシーです
    82
    Posts
    15
    Years
  • I tried playtesting my game and I suddenly got this error:
    Code:
    ---------------------------
    Pokemon Essentials
    ---------------------------
    Exception: NoMethodError
    
    Message: undefined method `+' for nil:NilClass
    
    PokemonUtilities:289:in `getRoughLatLon'
    
    PokemonUtilities:386:in `getLatLong'
    
    PokemonUtilities:586:in `getToneInternal'
    
    PokemonUtilities:584:in `each'
    
    PokemonUtilities:584:in `getToneInternal'
    
    PokemonUtilities:353:in `getTone'
    
    PokemonUtilities:2095:in `pbDayNightTint'
    
    Sprite_Character:124:in `update_or'
    
    PerspectiveTilemap:408:in `shadow_update'
    
    Shadow:179:in `update'
    
    
    
    This exception was logged in ./errorlog.txt.
    
    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK   
    ---------------------------
    Does anyone know what the problem is?
     
    Last edited:
    23
    Posts
    12
    Years
    • Seen Jul 24, 2022
    Hi, Im having a few problems...
    Ill take any help i can get, and i apologize in advance if I come off as a noob.
    Ive used RPG Maker for a year now, and with my pokemon game Im having these problems:

    -Changed Graphics won't/aren't updating
    I wanted to change various things such as the pokegear's background and the fightbox to alternate colors, when I playtest, nothing changes (it's driving me nuts). The file is renamed correctly and is the correct filetype (.png), I've googled this problem everywhere and I seem to only find something about a 'refresh' subject, but I can't figure it out. I found a Refresh Def in my code, but I still am confused on how to implement my changes.

    -Battle Music volume is too low
    All other sounds are still the correct volume, I checked the scripts and the volumes are all at 100. But when my game goes into battle, the music is DRASTICALLY reduced, I have to crank my volume to hear it correctly, but then the SE's are overwhelming. I am using MIDI files, and i have no other conflicting programs that I have seen that are modifying the volume.

    Thanks in advance for any help.

    I really appreciate any help, I've been everywhere and I've learned as much as I could from scratch before coming and asking here.

    EDIT: Problems Solved (Partially)
    (turns out my copy of pokemon essentials was using different filenames for the fightbox and backdrops in pokegear than what was default.) Still can't figure out number 2. I believe Windows Media Player is screwing up the midi volumes.
     
    Last edited:
    29
    Posts
    13
    Years
    • Seen Sep 9, 2014
    perhaps the problem is that you are trying to remove the child from within it. try rewriting the code so it goes in the parent MovieClip.

    also, is this totalscore a number?

    because instead of using a movieClip for that, you could have dynamic text in the parent and instead of trying to go to the next frame, just change its text to the current score.

    well idk if it'll help, but here's how i'd do it if I was using AS3. This code would go on the main timeline. c:

    Code:
    var totalScore:Number = 0; //Number to keep track of your current score
    
    var pokeMC:MovieClip; //base movieClip to create a pokemon in.
    function createPokemon(pokemonNumber:Number):void {
    //you would have to export the pokemon MovieClip and export it for actionscript, and give it the Class name of Pokemon. located under Library>yourMovieClip>Properties>Advanced.
    pokeMC = new Pokemon();
    pokeMC.gotoAndStop(pokemonNumber); //if you kept each pokemon pic in one frame in pokeMC.
    
    //eventlistener for pokeMC... this is part of what makes AS3 way better than AS2- event handlers.
    pokeMC.addEventListener(MouseEvent.MOUSE_UP, onReleaseEvent);
    
    //add it to the stage.
    addChild(pokeMC);
    }
    
    //This is the event listener function that is called when the mouse button is released.
    function onReleaseEvent(e:MouseEvent):void {
    //total score gets 1 added to it.
    totalScore += 1;
    
    //you update your dynamic text to have the new totalScore.
    totalScoreTxt.text = totalScore;
    /*or we could do something more fancy here and add zeros
    if(totalScore <10) totalScoreTxt.text = "00" + totalScore;
    if(totalScore >= 10 && totalScore < 100) totalScoreTxt.text = "0" + totalScore;
    
    //remove the event listener so this doesn't happen again for the movieClip you just clicked.
    e.currentTarget.removeEventListener(MouseEvent.MOUSE_UP, onReleaseEvent);
    
    //remove the pokemon you clicked on.
    removeChild(e.currentTarget as MovieClip);
    }
    
    //whenever you want to create a pokemon, use the createPokemon function written above.
    //this would create Bulbasaur if you set it up according to the notes in the function.
    //createPokemon(1);

    I JUST found out how to do it

    Instead of this.parent, parent, or .parent, you had to put _parent!
    on (press) {

    Code:
            //Movieclip GotoAndStop Behavior
        _parent.pokemoncaughteasy.nextFrame();;
        //End Behavior
    
        //unload Movie Behavior
        if(this == Number(this)){
            unloadMovieNum(this);
        } else {
            this.unloadMovie();
        }
        //End Behavior
    
    
    
    }
    ^-------- Fixed code up there
    You can also use _root.
     

    Conan Edogawa

    One Truth Prevails
    1,061
    Posts
    15
    Years
  • Before I start messing around with RMXP again, I'd like to know if there is a template or setup for windowskins. I'm used to just editing Poccil's, but I'm not using the kit so I think I need to do it from scratch.

    EDIT: And also, if someone could help me change the screen size/resolution, that would be appreciated also.
     
    Last edited:
    84
    Posts
    14
    Years
    • Seen Jun 6, 2014
    im having some trouble using rmxp
    i'll try to spend as much time as i can using it but i don't know where to start yet
    i don't even know how to script :(
    where should i start?
     
    Last edited:
    9
    Posts
    14
    Years
    • Seen Apr 8, 2012
    In need of help!

    hey i am new member here and i decided to make a pokemon game!
    i want to make it in RMXP i know about maping,importing custom sprites and such but my problem is the scripting can someone help me find tutorial how to script in RMXP with pictures if there are also that would help tnx a lot if someone decides to help me :D
     
    Last edited:

    marcc5m

    what
    1,116
    Posts
    13
    Years
  • I'm new to game development, and was wondering how to make the shadows...transparent? Idk, transparent but make the tiles underneath it darker...how to make shadows. How exactly would I do that? I'm using Game Maker btw.
     
    Last edited:

    Rossay

    Quack quack
    191
    Posts
    13
    Years
  • I'm new to game development, and was wondering how to make the shadows...transparent? Idk, transparent but make the tiles underneath it darker...how to make shadows. How exactly would I do that? I'm using Game Maker btw.

    In game maker, in the image editor (assuming you are using V8 or V8.1), you can edit the OPACITY (it's the bar on the right-hand side which goes from 0 -> 255).

    I'm not entirely sure what you're talking about, but I think you might be asking how to give the pokemon sprites shadows? If so, then the easiest way to do it is to use:

    draw_sprite_ext(sprite,subimg,x,y,xscale,yscale,rot,color,alpha)

    Set the alpha to some value less than 1, say 0.4, and the colour to c_black and you'll get a black-transparent shadow of the pokemon drawn.

    If I've misinterpreted your question, then please explain it further and I can provide more help.
     

    marcc5m

    what
    1,116
    Posts
    13
    Years
  • In game maker, in the image editor (assuming you are using V8 or V8.1), you can edit the OPACITY (it's the bar on the right-hand side which goes from 0 -> 255).

    I'm not entirely sure what you're talking about, but I think you might be asking how to give the pokemon sprites shadows? If so, then the easiest way to do it is to use:

    draw_sprite_ext(sprite,subimg,x,y,xscale,yscale,rot,color,alpha)

    Set the alpha to some value less than 1, say 0.4, and the colour to c_black and you'll get a black-transparent shadow of the pokemon drawn.

    If I've misinterpreted your question, then please explain it further and I can provide more help.

    Underneath tiles on the maps. I tried using the opacity, but it still looks the exact same.
     

    Freak A

    Back !!!
    296
    Posts
    15
    Years
    • Seen Jul 18, 2013
    anybody know where i could find some kh chain of memories OW's with the 4 way directional sprites and not only diagonal sprites pleeese !!! i dont just need riku and sora i need the final fantasy characters too but even a little would help, i've also tried spriters resource but they only have diagnol sprites for all non- playable characters
     

    mustafa505

    Aeon Developer
    306
    Posts
    14
    Years
  • i think this prob have been posted many times but
    i will post it :
    i dont know how to connect two maps
    EX- Pallet town is connected to route 1 and then viridian city and so on
    ---------------------------------------------------------------------
    Please Help :(
     
    Last edited:

    TheMarkCrafter

    roses are red, violets are blue, i used to break r
    543
    Posts
    13
    Years
  • i think this prob have been posted many times but
    i will post it :
    i dont know how to connect two maps
    EX- Pallet town is connected to route 1 and then viridian city and so on
    ---------------------------------------------------------------------
    Please Help :(

    1. Go to editor.exe located at your game folder
    2. Go to visual editor
    3. Press "S" to show the map
    4. Press "A"
    5. Put the map using your mouse connected.
    Here is the help, Lucky goose!
     

    flamemaster

    No school like the old school
    195
    Posts
    14
    Years
    • MI
    • Seen Mar 23, 2016
    does anyone know of any good scripting tutorials that i could use in pokemon essentials.
     
    11
    Posts
    13
    Years
    • Seen Jun 2, 2011
    Hey guys, i was wondering if anyone could help me. I need help in making a character walk in from off screen and stop the player from walking any further aswell as like gary from yellow, walk up to you and steal the pokeballl. and also make pokemon follow in overworld.

    Thanks for your time.
     
    Last edited:

    zingzags

    PokemonGDX creator
    536
    Posts
    15
    Years
  • I swear it has been a few months since I last coded, I feel like I am high right now but I have a serious question. How to I make a line break, just to cut off some text, and place it on the next line.
    Code:
    [abilitydesc,16,306,10,Color.new(0,0,0),Color.new(208,208,200)],
     
    Last edited:
    Status
    Not open for further replies.
    Back
    Top