Reply: Can't apply the MBP beta 1.5 codes for the par time alarm in Marble Blast Gold

NOTE: You are posting the message as a 'Guest', you can not edit the message or delete it
Please Log in or Register to skip this step.
X

Topic History of: Can't apply the MBP beta 1.5 codes for the par time alarm in Marble Blast Gold

Max. showing the last 20 posts - (Last post first)

  • BRD
  • BRD's Avatar
10 Apr 2025 23:48

I got it working! Thanks again for your time and all your help, I really appreciate it. :)

  • BRD
  • BRD's Avatar
10 Apr 2025 17:28

Oh, thank you RandomityGuy! ;)

  • RandomityGuy
  • RandomityGuy's Avatar
10 Apr 2025 17:21

Okay two things:

- Your code has two definitions of PlayGui::startTimer, please remove the second one.
- In PlayGui::refreshRed, remove the $InPlayGUI condition (remove "&& $InPlayGUI")

  • BRD
  • BRD's Avatar
10 Apr 2025 16:53

Wait a second. It's not working again! 

File Attachment:

File Name: playgui.cs
File Size:9 KB

  • RandomityGuy
  • RandomityGuy's Avatar
10 Apr 2025 15:27

Hello
Unfortunately it is not quite trivial to apply the code from MBP to MBG as it is intertwined with the rest of the code (good news: its still in the same file!), and thus it requires a bit of an understanding of how code works. And as a result, I can only provide you a high level procedure and things to take account of when implementing it.

First off, the file to be changed is marble/client/scripts/playGui.cs, if this file is not available, you can find it here: github.com/MBU-Team/OpenMBG/blob/master/...t/scripts/playgui.cs
MBP Version of the file: github.com/HiGuyMB/MBP150Beta3/blob/mast...t/scripts/playgui.cs

What you need to do is study the differences between the two files (it will be useful later on). The function that you are looking for is called PlayGui::refreshRed(%this), this you can copy over verbatim to the MBG script.

Now comes the tricky part, remember when I said earlier that code is intertwined, yeah here's why: this function utilizes global variables (they start with $ sign, such as $PlayTimerAlarmStartTime and many others), and they can be accessed from any other function as well. Because of this, you also need to carry over all the parts of code (in the same playGui.cs file!) that reference these variables over to the MBG script. This can be quite tricky as it requires an understanding of flow of execution and how control flow statements work (if, else, while, for, etc).

I will list out a few of these functions which you will need to change (there may be others beyond what I list, I leave the rest up to you to figure out):
GuiBitmapCtrl::setTimeNumber(%this,%number), PlayGui::startTimer(%this), PlayGui::resetTimer(%this,%dt)

Lastly, you want to add the audio profiles of the timer, they are found here:
github.com/HiGuyMB/MBP150Beta3/blob/mast...pts/audioprofiles.cs
(MBG script here: github.com/MBU-Team/OpenMBG/blob/master/...pts/audioprofiles.cs )

Hope this much information is sufficient and wish you best of luck towards its implementation.

EDIT: you can send me your playGui.cs file and i'll review it for you, and let you know the corrections.

  • BRD
  • BRD's Avatar
10 Apr 2025 14:43

I Can't apply the MBP beta 1.5 codes for the par time alarm in Marble Blast Gold. Well, i tried it but, it's showing the par time message when the clock has not passed the par time. 

  If there's a way, please create the steps to apply it. Can you do that for me please?

Time to create page: 0.676 seconds