file Basic Marble Blast Coding Q&A

  • Aayrl
  • Aayrl's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Big Deal!
More
10 Nov 2009 00:02 - 07 Jan 2014 02:28 #1 by Aayrl
Basic Marble Blast Coding Q&A was created by Aayrl
I felt silly posting replies onto member's coding tutorials. My alternative is to create a thread where users can post their coding questions, and hopefully get them answered. Please post here if you have any questions referring to the Marble Blast coding language and we'll see what feedback we can present to you.

~Aayrl
Last edit: 07 Jan 2014 02:28 by Aayrl.

Please Log in or Create an account to join the conversation.

More
10 Nov 2009 00:41 #2 by Stal
Replied by Stal on topic Basic Marble Blast Coding Q&A
Ah! I have SOO many questions!
how do you create a line in the prefs.cs file? Like when you pick up an item? (in itemdata datablock)

Please Log in or Create an account to join the conversation.

  • Aayrl
  • Aayrl's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Big Deal!
More
10 Nov 2009 06:57 #3 by Aayrl
Replied by Aayrl on topic Basic Marble Blast Coding Q&A
I'm not sure what you're looking for, you've given me two seperate coding files to work with here (inventory.cs and prefs.cs). One operates the powerups and your current inventory status, whilst the other controls your times and settings.

Please clarify the question more for me

~Aayrl

Please Log in or Create an account to join the conversation.

  • Aayrl
  • Aayrl's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Big Deal!
More
10 Nov 2009 11:56 #4 by Aayrl
Replied by Aayrl on topic Basic Marble Blast Coding Q&A
Yeah I gotta question for you, why do you always put ~Aayrl after every post you make? it's a serious question

Please Log in or Create an account to join the conversation.

  • Aayrl
  • Aayrl's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Big Deal!
More
10 Nov 2009 14:25 #5 by Aayrl
Replied by Aayrl on topic Basic Marble Blast Coding Q&A
It's my signature before my forum signature..

..just a habit

~Aayrl

Please Log in or Create an account to join the conversation.

More
11 Nov 2009 00:06 #6 by Stal
Replied by Stal on topic Basic Marble Blast Coding Q&A
ok.
prefs in client
like adding a high score line.
pref::usedtimetravel[blah.mis]?=1;
abit like that

Please Log in or Create an account to join the conversation.

  • Aayrl
  • Aayrl's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Big Deal!
More
11 Nov 2009 03:37 #7 by Aayrl
Replied by Aayrl on topic Basic Marble Blast Coding Q&A
From my understanding, the prefs.cs file in the client folder is merely a saved data recall station. Your game saves your settings and scores here, and recalls them later as written in various other coding. MainMenuGUI for example recalls data from this file to display your best times.

Per se, there is no way to 'add' lines into here manually, it's all done automatically by the marbleblast.exe program.

~Aayrl

Please Log in or Create an account to join the conversation.

More
11 Nov 2009 04:13 #8 by Stal
Replied by Stal on topic Basic Marble Blast Coding Q&A
no, like make a new kind of high-score

Please Log in or Create an account to join the conversation.

  • Aayrl
  • Aayrl's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Big Deal!
More
11 Nov 2009 14:47 #9 by Aayrl
Replied by Aayrl on topic Basic Marble Blast Coding Q&A
Such...as...a new level genre...like Expert levels?

Again, this is attained not through the prefs.cs file, but another technique. If you create and title a new subfolder under your levels folder, name it, and give the playmenugui a place to access it (Another button), the game then calls upon level data stored into that folder, and saves it into the prefs.cs as a different level genre.

If you're talking more along the lines of a new 'time' for high scores, such as Platinum and Ultra, this is also done in several other bits and pieces of coding inside each level file and the game.cs. Again, the game calls upon the data stored here, and uses the prefs.cs as a place of memory/storage.

~Aayrl

Please Log in or Create an account to join the conversation.

More
11 Nov 2009 22:52 #10 by MarbleDuck
Replied by MarbleDuck on topic Basic Marble Blast Coding Q&A
That *twitch* ~Aayrl thing is *twitch* going to be the *twitch* death of you...

youtube.com/marbleduck

Please Log in or Create an account to join the conversation.

More
12 Nov 2009 00:21 #11 by Stal
Replied by Stal on topic Basic Marble Blast Coding Q&A
ok thx

Please Log in or Create an account to join the conversation.

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • At college, may not be around
More
05 Dec 2009 02:26 #12 by HiGuy
Replied by HiGuy on topic Basic Marble Blast Coding Q&A
How do I change the prefs.cs file name, like how MBF and MBP both have their own prefs.cs, how would I get it to make my own?

~HiGuy
EAT IT!

PQ in a nutshell
function clientcmd12dothepq() {
    commandToClient(LocalClientConnection, '34onthedancefloor');
}

Please Log in or Create an account to join the conversation.

  • Perishingflames
  • Perishingflames's Avatar
  • Offline
  • Senior Marbler
  • Senior Marbler
More
05 Dec 2009 03:38 #13 by Perishingflames
Replied by Perishingflames on topic Basic Marble Blast Coding Q&A
marble/main.cs, change all (3?) instances of prefs.cs to ___prefs.cs

and may want to do that for common/main.cs as well.

Please Log in or Create an account to join the conversation.

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • At college, may not be around
More
06 Dec 2009 01:28 #14 by HiGuy
Replied by HiGuy on topic Basic Marble Blast Coding Q&A
Thank you PF! It worked!

PQ in a nutshell
function clientcmd12dothepq() {
    commandToClient(LocalClientConnection, '34onthedancefloor');
}

Please Log in or Create an account to join the conversation.

  • IsraeliRD
  • IsraeliRD's Avatar
  • Offline
  • Project Manager
  • Project Manager
  • Dragon Power Supreme
More
06 Dec 2009 01:44 #15 by IsraeliRD
Replied by IsraeliRD on topic Basic Marble Blast Coding Q&A
Loc--wait, what?

"matan, now i get what you meant a few years back when you said that "the level in mbg is beyond me" after the last rampage i noticed things were insane, and now i truly feel that too" - Dushine, 2015.

Please Log in or Create an account to join the conversation.

More
07 Dec 2009 00:13 #16 by Stal
Replied by Stal on topic Basic Marble Blast Coding Q&A
I meant like how in MBP they have an easter egg high score line in the MBPprefs.cs.

Please Log in or Create an account to join the conversation.

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • At college, may not be around
More
06 Jun 2010 02:21 #17 by HiGuy
Replied by HiGuy on topic Basic Marble Blast Coding Q&A
BUMP! How would you get the current value of a GuiTextEditCtrl (after the user has entered text)?

(Figured the bump was o.k. since it's a Q&A thread...)

HiGuy

PQ in a nutshell
function clientcmd12dothepq() {
    commandToClient(LocalClientConnection, '34onthedancefloor');
}

Please Log in or Create an account to join the conversation.

  • Seizure22
  • Seizure22's Avatar
  • Offline
  • Intermediate Marbler
  • Intermediate Marbler
More
06 Jun 2010 05:26 #18 by Seizure22
Replied by Seizure22 on topic Basic Marble Blast Coding Q&A
I think it's this:

(object name).getValue();

Please Log in or Create an account to join the conversation.

  • Marblemaster1
  • Marblemaster1's Avatar
  • Offline
  • Advanced Marbler
  • Advanced Marbler
  • QuArK proudly!
More
12 Jun 2010 03:32 #19 by Marblemaster1
Replied by Marblemaster1 on topic Basic Marble Blast Coding Q&A
I have a question:

Where is the code that controls the powerup functions?

while (!PQ.getIsReleased())
{
      System.out.println("PQ WHERe");
}
You know what's boring? Opaque marble skins. You know what's not? Glass Marbles!

Please Log in or Create an account to join the conversation.

  • IsraeliRD
  • IsraeliRD's Avatar
  • Offline
  • Project Manager
  • Project Manager
  • Dragon Power Supreme
More
12 Jun 2010 03:42 #20 by IsraeliRD
Replied by IsraeliRD on topic Basic Marble Blast Coding Q&A
Powerups.cs, but the engine contains superjump, superspeed, superbounce and shockabsorber values and those we cannot decrypt, so no one knows how to modify these.

"matan, now i get what you meant a few years back when you said that "the level in mbg is beyond me" after the last rampage i noticed things were insane, and now i truly feel that too" - Dushine, 2015.

Please Log in or Create an account to join the conversation.

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • At college, may not be around
More
18 Jun 2010 00:49 #21 by HiGuy
Replied by HiGuy on topic Basic Marble Blast Coding Q&A
How do you get the selected level number?
Also, which file would PM_MissionList be in?

PQ in a nutshell
function clientcmd12dothepq() {
    commandToClient(LocalClientConnection, '34onthedancefloor');
}

Please Log in or Create an account to join the conversation.

  • Seizure22
  • Seizure22's Avatar
  • Offline
  • Intermediate Marbler
  • Intermediate Marbler
More
18 Jun 2010 03:08 #22 by Seizure22
Replied by Seizure22 on topic Basic Marble Blast Coding Q&A
PM_MissionList.getSelectedId();
PlayMissionGui

Please Log in or Create an account to join the conversation.

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • At college, may not be around
More
18 Jun 2010 14:16 #23 by HiGuy
Replied by HiGuy on topic Basic Marble Blast Coding Q&A
Thanks seizure!
One more: Edit: Figured out the Yes/No. Edit 2: Got the mission type. How can I compare it to a string e.g.
Code:if ($MissionType == Advanced) {
...
}

so that it will only return Yes for what it's equal to?

PQ in a nutshell
function clientcmd12dothepq() {
    commandToClient(LocalClientConnection, '34onthedancefloor');
}

Please Log in or Create an account to join the conversation.

More
18 Jun 2010 17:37 #24 by ShadowMarble
Replied by ShadowMarble on topic Basic Marble Blast Coding Q&A
Code:if ($MissionType $= Advanced) {
...
}

$= will compare strings. You can use !$= to test if two strings are NOT equal.

Please Log in or Create an account to join the conversation.

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • At college, may not be around
More
18 Jun 2010 18:15 #25 by HiGuy
Replied by HiGuy on topic Basic Marble Blast Coding Q&A
OMG Thank you!

PQ in a nutshell
function clientcmd12dothepq() {
    commandToClient(LocalClientConnection, '34onthedancefloor');
}

Please Log in or Create an account to join the conversation.

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • At college, may not be around
More
07 Jul 2010 17:48 #26 by HiGuy
Replied by HiGuy on topic Basic Marble Blast Coding Q&A
How would I run a string as a script?

I've tried
ececute(blah);
run(blah);
runCommand(blah);
(replace blah with a real command)

HiGuy

PQ in a nutshell
function clientcmd12dothepq() {
    commandToClient(LocalClientConnection, '34onthedancefloor');
}

Please Log in or Create an account to join the conversation.

  • Seizure22
  • Seizure22's Avatar
  • Offline
  • Intermediate Marbler
  • Intermediate Marbler
More
07 Jul 2010 19:52 #27 by Seizure22
Replied by Seizure22 on topic Basic Marble Blast Coding Q&A
eval(blah(););

Syntax is tricky, post again if you're having trouble.

Please Log in or Create an account to join the conversation.

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • At college, may not be around
More
11 Jul 2010 16:16 #28 by HiGuy
Replied by HiGuy on topic Basic Marble Blast Coding Q&A
Thanks seizure22!

PQ in a nutshell
function clientcmd12dothepq() {
    commandToClient(LocalClientConnection, '34onthedancefloor');
}

Please Log in or Create an account to join the conversation.

More
12 Jul 2010 01:42 #29 by Stal
Replied by Stal on topic Basic Marble Blast Coding Q&A
How do I get the main.cs (server) to exec new .cs files? Or do I need some special formatting in the new files? >_< (exec(etc.cs); isn't working)

Please Log in or Create an account to join the conversation.

  • Seizure22
  • Seizure22's Avatar
  • Offline
  • Intermediate Marbler
  • Intermediate Marbler
More
12 Jul 2010 02:06 #30 by Seizure22
Replied by Seizure22 on topic Basic Marble Blast Coding Q&A
for root folder files

exec(./etc.cs);

for other folder files

exec(marble/server/scripts/blah.cs);

Please Log in or Create an account to join the conversation.

Moderators: AayrlKalle29Regislian