- Posts: 1118
- Thank you received: 368
Basic Marble Blast Coding Q&A
- Aayrl
- Topic Author
- Offline
- Administrator
- Big Deal!
~Aayrl
Please Log in or Create an account to join the conversation.
- Stal
- Offline
- Advanced Marbler
- Posts: 227
- Thank you received: 0
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
- Topic Author
- Offline
- Administrator
- Big Deal!
- Posts: 1118
- Thank you received: 368
Please clarify the question more for me
~Aayrl
Please Log in or Create an account to join the conversation.
- Aayrl
- Topic Author
- Offline
- Administrator
- Big Deal!
- Posts: 1118
- Thank you received: 368
Please Log in or Create an account to join the conversation.
- Aayrl
- Topic Author
- Offline
- Administrator
- Big Deal!
- Posts: 1118
- Thank you received: 368
..just a habit
~Aayrl
Please Log in or Create an account to join the conversation.
- Stal
- Offline
- Advanced Marbler
- Posts: 227
- Thank you received: 0
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
- Topic Author
- Offline
- Administrator
- Big Deal!
- Posts: 1118
- Thank you received: 368
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.
- Stal
- Offline
- Advanced Marbler
- Posts: 227
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Aayrl
- Topic Author
- Offline
- Administrator
- Big Deal!
- Posts: 1118
- Thank you received: 368
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.
- MarbleDuck
- Offline
- Advanced Marbler
youtube.com/marbleduck
Please Log in or Create an account to join the conversation.
- Stal
- Offline
- Advanced Marbler
- Posts: 227
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- HiGuy
- Offline
- Lead Developer
- PQ Developer Emeritus
~HiGuy
EAT IT!
This signature is real code
Please Log in or Create an account to join the conversation.
- Perishingflames
- Offline
- Senior Marbler
- Posts: 882
- Thank you received: 21
and may want to do that for common/main.cs as well.
Please Log in or Create an account to join the conversation.
- HiGuy
- Offline
- Lead Developer
- PQ Developer Emeritus
This signature is real code
Please Log in or Create an account to join the conversation.
- IsraeliRD
- Offline
- Project Manager
- Dragon Power Supreme
"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.
- Stal
- Offline
- Advanced Marbler
- Posts: 227
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- HiGuy
- Offline
- Lead Developer
- PQ Developer Emeritus
(Figured the bump was o.k. since it's a Q&A thread...)
HiGuy
This signature is real code
Please Log in or Create an account to join the conversation.
- Seizure22
- Offline
- Intermediate Marbler
- Posts: 79
- Thank you received: 0
(object name).getValue();
Please Log in or Create an account to join the conversation.
- Marblemaster1
- Offline
- Advanced Marbler
- Custom Code Enthusiast
- Posts: 237
- Thank you received: 8
Where is the code that controls the powerup functions?
QuArK is still a good map editor
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
- Offline
- Project Manager
- Dragon Power Supreme
"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
- Offline
- Lead Developer
- PQ Developer Emeritus
Also, which file would PM_MissionList be in?
This signature is real code
Please Log in or Create an account to join the conversation.
- Seizure22
- Offline
- Intermediate Marbler
- Posts: 79
- Thank you received: 0
PlayMissionGui
Please Log in or Create an account to join the conversation.
- HiGuy
- Offline
- Lead Developer
- PQ Developer Emeritus
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?
This signature is real code
Please Log in or Create an account to join the conversation.
- ShadowMarble
- Offline
- Novice Marbler
- Posts: 10
- Thank you received: 0
...
}
$= 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
- Offline
- Lead Developer
- PQ Developer Emeritus
This signature is real code
Please Log in or Create an account to join the conversation.
- HiGuy
- Offline
- Lead Developer
- PQ Developer Emeritus
I've tried
ececute(blah);
run(blah);
runCommand(blah);
(replace blah with a real command)
HiGuy
This signature is real code
Please Log in or Create an account to join the conversation.
- Seizure22
- Offline
- Intermediate Marbler
- Posts: 79
- Thank you received: 0
Syntax is tricky, post again if you're having trouble.
Please Log in or Create an account to join the conversation.
- HiGuy
- Offline
- Lead Developer
- PQ Developer Emeritus
This signature is real code
Please Log in or Create an account to join the conversation.
- Stal
- Offline
- Advanced Marbler
- Posts: 227
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Seizure22
- Offline
- Intermediate Marbler
- Posts: 79
- Thank you received: 0
exec(./etc.cs);
for other folder files
exec(marble/server/scripts/blah.cs);
Please Log in or Create an account to join the conversation.