• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.

Idea Just dance plugin

rafahbit

Trainer
Member
Joined
Oct 21, 2020
Posts
53
I'm trying to create a Just Dance mini game, but I'm having a lot of problems.

The mini game would work as follows: calling pbDanceGame(ID, Speed) would start the plugin, which would open a simple interface with the sequence name and then a countdown, after which the mini game would begin. For example, calling pbDanceGame(1, 1) would use sequence 1 with its respective name and a speed of 1, which is normal speed, though any value can be used here.

The basic mechanics of the mini game are working, and by downloading this file, you can test and see the problems I'm having.

  1. The interface opens abruptly, and I can't create a fade-in and fade-out transition; it just opens, runs the mini game, and closes.
  2. Along with the transitions, I'm trying to add sounds for entering and exiting the mini game: a sound effect for entering and a closemenu sound effect for exiting, but that's not working either.
  3. I haven't been able to check the number of correct answers the player gets. I know I could store the correct answers in a variable and then check that variable to reward the player if they get 100% correct, but I couldn't get that to work either.
I tried to create most of it on my own, modifying some things from other plugins and asking for help from ChatGPT (which I don't recommend). ChatGPT has introduced 30 different problems into the mini game.

In the old RC, there was a thread explaining how methods work and how to create a scene or UI, but I couldn't find that post here.

I would like to ask for help to get this mini game working, as I had the idea to use it in a Fairy-type gym where the player would have a dance competition with an NPC. If the player fails too much, they would end up in a battle against the NPC.

My strong suits are not English or programming; I handle tilesets and sprites better (I'm also preparing a tileset pack to share).

The images I am using here are not of my own creation but are only placeholders for the development of the plugin.


Sorry if there are any inconsistencies or if it is confusing; I don't speak English and I'm translating everything.
 

Atlat

Novice
Member
Joined
Jan 8, 2023
Posts
21
My #1 rule of using ChatGPT to help with code is to use it as a base to help give you a general idea of where to go, and then scrap about half of it as it has that many problems.

On a slightly more serious note, here are some tricks that may help here.

First, regarding the fading, take a look at UI_PauseMenu. There is this code:
pbFadeOutIn do
CODE
end
I tried putting it around your function and it... sort of worked. Only a little, honestly. You could take a look here (def pbFadeOutIn(z = 99999, nofadeout = false)) and implement some of that code within your code. However, I'm not particularily confident on that.

Next, go to Audio_Play and head to the very bottom. There are functions down there that call certain sound effects. You can even make your own quite easily since they aren't in any class.

Finally, there's the variable stuff. First, I would suggest adding an s to the end of @current_move, though that's more my hyperfixation on consistency than anything else. More importantly, the variables seem to be working perfectly fine. If you want to check for a 100% score rating, just check if @correct_moves == @current_move. Honestly, you really don't even need @error_moves since that's basically just current - correct. You check to see if the number of incorrect moves exceeds a certain number (how many misses you allow), and if it does you battle a trainer.

Now, if you want to do that in an event, I would just suggest saving the scores to game variables and then doing what I said above, but with those game variables instead of @correct_moves and the like.
 
Back
Top