|
Post by Aayrl on Nov 9, 2009 21:02:34 GMT
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
|
|
|
Post by Stal on Nov 9, 2009 21:41:15 GMT
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)
|
|
|
Post by Aayrl on Nov 10, 2009 3:57:44 GMT
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
|
|
|
Post by blazeryo on Nov 10, 2009 8:56:24 GMT
Yeah I gotta question for you, why do you always put ~Aayrl after every post you make? it's a serious question
|
|
|
Post by Aayrl on Nov 10, 2009 11:25:49 GMT
It's my signature before my forum signature.. ..just a habit ~Aayrl
|
|
|
Post by Stal on Nov 10, 2009 21:06:56 GMT
ok. prefs in client like adding a high score line. pref::usedtimetravel[blah.mis]?=1; abit like that
|
|
|
Post by Aayrl on Nov 11, 2009 0:37:01 GMT
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
|
|
|
Post by Stal on Nov 11, 2009 1:13:00 GMT
no, like make a new kind of high-score
|
|
|
Post by Aayrl on Nov 11, 2009 11:47:36 GMT
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
|
|
|
Post by MarbleDuck on Nov 11, 2009 19:52:16 GMT
That *twitch* ~Aayrl thing is *twitch* going to be the *twitch* death of you...
|
|
|
Post by Stal on Nov 11, 2009 21:21:28 GMT
ok thx
|
|
|
Post by Hi Guy on Dec 4, 2009 23:26:30 GMT
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!
|
|
|
Post by Perishingflames on Dec 5, 2009 0:38:49 GMT
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.
|
|
|
Post by Hi Guy on Dec 5, 2009 22:28:13 GMT
Thank you PF! It worked!
|
|
|
Post by IsraeliRD on Dec 5, 2009 22:44:11 GMT
Loc--wait, what?
|
|
|
Post by Stal on Dec 6, 2009 21:13:55 GMT
I meant like how in MBP they have an easter egg high score line in the MBPprefs.cs.
|
|
|
Post by Hi Guy on Jun 6, 2010 0:21:04 GMT
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
|
|
|
Post by Seizure22 (Witty Title) on Jun 6, 2010 3:26:22 GMT
I think it's this:
(object name).getValue();
|
|
Marblemaster1 (Frosty)
Professional Marbler
Master of the Spam Board, that is[ss:Default Skin]
I have CDO. It's just like OCD, except the letters are in alphabetical order AS THEY SHOULD BE.
Posts: 361
|
Post by Marblemaster1 (Frosty) on Jun 12, 2010 1:32:20 GMT
I have a question:
Where is the code that controls the powerup functions?
|
|
|
Post by IsraeliRD on Jun 12, 2010 1:42:05 GMT
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.
|
|
|
Post by Hi Guy on Jun 17, 2010 22:49:25 GMT
How do you get the selected level number? Also, which file would PM_MissionList be in?
|
|
|
Post by Seizure22 (Witty Title) on Jun 18, 2010 1:08:06 GMT
PM_MissionList.getSelectedId(); PlayMissionGui
|
|
|
Post by Hi Guy on Jun 18, 2010 12:16:39 GMT
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.
if ($MissionType == "Advanced") { ... }
so that it will only return "Yes" for what it's equal to?
|
|
ShadowMarble
Beginner Marbler
The shadow is glitching out.
Posts: 28
|
Post by ShadowMarble on Jun 18, 2010 15:37:04 GMT
if ($MissionType $= "Advanced") { ... }
$= will compare strings. You can use !$= to test if two strings are NOT equal.
|
|
|
Post by Hi Guy on Jun 18, 2010 16:15:30 GMT
OMG Thank you!
|
|
|
Post by Hi Guy on Jul 7, 2010 15:48:59 GMT
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
|
|
|
Post by Seizure22 (Witty Title) on Jul 7, 2010 17:52:53 GMT
eval("blah();");
Syntax is tricky, post again if you're having trouble.
|
|
|
Post by Hi Guy on Jul 11, 2010 14:16:08 GMT
Thanks seizure22!
|
|
|
Post by Stal on Jul 11, 2010 23:42:18 GMT
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)
|
|
|
Post by Seizure22 (Witty Title) on Jul 12, 2010 0:06:05 GMT
for root folder files
exec("./etc.cs");
for other folder files
exec("marble/server/scripts/blah.cs");
|
|