file Basic Marble Blast Coding Q&A

  • Jeff
  • Jeff's Avatar
  • Offline
  • Developer
  • Developer
  • PlatinumQuest Programmer
More
05 Feb 2011 05:14 #151 by Jeff
Replied by Jeff on topic Basic Marble Blast Coding Q&A
Thanks anyways, Matan.

Edit: Thats odd, I posted this after you matan, but it showed up before (sorry for going off topic.)

I am a programmer. Most here know me for being one of the major contributors to Marble Blast Platinum and PlatinumQuest.

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

  • IsraeliRD
  • IsraeliRD's Avatar
  • Offline
  • Project Manager
  • Project Manager
  • Dragon Power Supreme
More
05 Feb 2011 05:14 #152 by IsraeliRD
Replied by IsraeliRD on topic Basic Marble Blast Coding Q&A
That I don't know. Wait for someone else to respond I don't think it would though.

"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.

  • dobrakmato
  • dobrakmato's Avatar
  • Offline
  • Experienced Marbler
  • Experienced Marbler
More
05 Feb 2011 11:03 #153 by dobrakmato
Replied by dobrakmato on topic Basic Marble Blast Coding Q&A
@Seizure22
In which file I could find a function PlayMissionGui:onWake?

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

More
05 Feb 2011 11:26 #154 by picklecow10
Replied by picklecow10 on topic Basic Marble Blast Coding Q&A
Feb 5, 2011, 3:03am, dobrakmato wrote:@Seizure22
In which file I could find a function PlayMissionGui:onWake?

I know I'm not Seizure, but it looks like that's in playmissiongui.gui.dso.

Speaking of playmissiongui.gui.dso...

Is there a way to change what badge (instead of GOLD) appears next to certain times in the menu, when you're picking you're level?

Like
Code:if(x = true)
{
badgeThingNextToTime=gold;
}
else
{
badgeThingNextToTime=otherbadge;
}

Kind of like how MBP has a Platinum Badge and an Ultra Badge, depending on what time you get.

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

  • dobrakmato
  • dobrakmato's Avatar
  • Offline
  • Experienced Marbler
  • Experienced Marbler
More
05 Feb 2011 13:56 #155 by dobrakmato
Replied by dobrakmato on topic Basic Marble Blast Coding Q&A
Quote:Speaking of playmissiongui.gui.dso... I know but playmissiongui.gui.dso is compiled file... and when i open it show me this: Code:! \ GuiChunkedBitmapCtrl playMissionGui profile GuiContentProfile horizSizing width vertSizing height position 0 0 extent 640 480 minExtent 8 8 visible 1 helpTag 0 bitmap ./background.jpg useVariable tile GuiControl GuiDefaultProfile center -1 44 641 392 GuiBitmapCtrl PM_TabAdvanced right bottom 410 21 166 43 command $MissionType=Advanced;buildMissionList(); ./play/tab_adv wrap text Advanced PM_TabIntermediate 213 4 205 58 $MissionType=Intermediate;buildMissionList(); ./play/tab_inter Intermediate PM_TabCustom 589 91 52 198 $MissionType=Custom;buildMissionList(); ./play/cust_tab PM_Box 0 42 610 351 ./play/playGui.png 31 29 276 229 ./play/text_window PM_preview 312 42 258 193 ~/data/missions/beginner/superspeed PM_NoQualOverlay OverlayScreenProfile 2 3 256 190 258 194 ./play/level_window.png GuiMLTextCtrl PM_level_bkgnd GuiMLTextProfile 5 156 254 24 lineSpacing 2 allowColorChars maxChars -1 PM_level_fgnd 4 155 PM_NoQualText 0 84 254 32 GuiBitmapButtonCtrl PM_play GuiButtonProfile 391 257 121 62 PM_StartMission(); play groupNum buttonType PushButton ./play/play PM_prev 321 260 77 58 PM_setSelected(4); Prev RepeaterButton repeatPeriod 350 repeatDecay 0.9 accelerator left ./play/prev PM_next 507 262 75 60 PM_setSelected(6); Next ./play/next GuiTextListCtrl PM_missionList GuiTextArrayProfile 80 384 enumerate resizeCell columns fitParentWidth clipColumnText noDuplicates false 102 260 79 61 disconnect(); Canvas.setContent(MainMenuGui); escape ./play/back PM_description 61 43 215 174 PM_TabBeginner 29 2 184 55 $MissionType=Beginner;buildMissionList(); ./play/tab_begin Beginner PM_TabButtons -4 2 631 61 GuiButtonBaseCtrl 577 18 43 40 $MissionType=;buildMissionList(); Button 428 22 142 36 PMSetMissionTab(Advanced); 236 6 183 52 PMSetMissionTab(Intermediate); 62 7 141 50 PMSetMissionTab(Beginner); PM_TabButtons2 597 106 42 171 PMSetMissionTab(Custom); top 625 465 18 19 PM_skipQualify(); onWake $MissionType PMSetMissionTab %tab getGroup %par add RootGroup buildMissionList sortByLevel SimGroup %ngrp getObject %grp %obj getCount level %lowest %lowestIndex %i %level delete isObject PlayMissionGroup findFirstFile $Server::MissionFileSpec %file strstr getMissionObject findNextFile clear %cnt getName %j %mission addRow $LastMissionType MissionInfo $Game::Qualified $pref::QualifiedLevel rowCount %selected %row getField getRowText PM_setSelected PM_skipQualify getRowNumById getSelectedId PM_StartMission %id getRowTextById type $pref::HostMultiPlayer %serverType $Server::ServerType $doRecordDemo recordDemo file createServer GameConnection ServerConnection %conn setConnectArgs $pref::Player::Name setJoinPassword $Client::Password connectLocal loadMission onDemoPlay $playingDemo %misFile onDemoPlayDone disconnect %forced setContent Canvas MainMenuGui runPresentation $testCheats %playEnabled setActive setVisible setText setSelectedRow upperFirst %levelText name desc %descText time formatTime getBestTimes $hs %time goldTime setValue setBitmap filePath fileBase %next %prev FileObject %MissionInfoObject openForRead %missionFile %inInfoBlock isEOF readLine %line trim close eval %path %misPath %groupTab nameToID setName · Beginner PM_Tab 0 common/ CVS/ MTYPE_ 1 MultiPlayer SinglePlayer ~/client/demos/demo.rec <color:CCCCCC><font:DomCasualD:32><just:center>Not Qualified! <font:DomCasualD:24><just:center> Level <color:FFFFFF> <color:000000> <spush><font:DomCasualD:24> <spop><lmargin:10>

<spush><font:DomCasualD:24><lmargin:0>
Time to Qualify: <spop> <lmargin:0>

<spush><font:DomCasualD:24>Best Times:<spop><lmargin:10><tab:0,130,180><font:Arial Bold:14>

<shadow:1:1><color:000000><shadowcolor:ffffff4f> . <bitmap:marble/client/ui/play/goldscore.png>

/ PM_setSelected( ); new ScriptObject(MissionInfo) { new ScriptObject() { }; %missionInfoObject = marble/data/missions custom ð? @¨ &#8482; A QE PE P ÿ¬ D-I/0 N7:DKI/0 N7:D\I/0 N7:DlI/0 N7:DwI/0 N7:D&#8240;I/0 N7:D&#8226;I/0 N7:D¼I/0 N7:D¨I/0 N7:D¼I/0 N7:D¼I/0 N7:QE PD P ÿ DÕI/0 N7:DçI/0 N7:DçI/0 N7:DîI/0 N7:DôI/0 N7:D&#8240;I/0 N7:D&#8226;I/0 N7:D¼I/0 N7: QE PE P ÿB DÕI/0 N7:Dÿ I/0 N7:Dÿ I/0 N7:Dÿ& I/0 N7:Dÿ- I/0 N7:D&#8240;I/0 N7:D&#8226;I/0 N7:Dÿ< I/0 N7:D¼I/0 N7:Dÿh I/0 N7:D&#8226;I/0 N7:Dÿ&#129; I/0 N7: QE PE P ÿ½ DÕI/0 N7:Dÿ I/0 N7:Dÿ I/0 N7:Dÿ» I/0 N7:Dÿ£ I/0 N7:D&#8240;I/0 N7:D&#8226;I/0 N7:Dÿª I/0 N7:D¼I/0 N7:DÿÚ I/0 N7:D&#8226;I/0 N7:Dÿë I/0 N7: QE PE P ÿ8 DÕI/0 N7:Dÿ I/0 N7:Dÿ I/0 N7:Dÿ I/0 N7:Dÿ I/0 N7:D&#8240;I/0 N7:D&#8226;I/0 N7:Dÿ I/0 N7:D¼I/0 N7:Dÿ= I/0 N7:D¼I/0 N7:Dÿ&#129; I/0 N7: QE PE P ÿ× DÕI/0 N7:DKI/0 N7:D\I/0 N7:DÿT I/0 N7:DÿY I/0 N7:D&#8240;I/0 N7:D&#8226;I/0 N7:D¼I/0 N7:Dÿa I/0 N7:D¼I/0 N7: QE PD P ÿ DÕI/0 N7:DKI/0 N7:D\I/0 N7:Dÿt I/0 N7:Dÿz I/0 N7:D&#8240;I/0 N7:D&#8226;I/0 N7:D¼I/0 N7:Dÿ&#8218; I/0 N7:D¼I/0 N7: QE PE P ÿ&#8225; DÕI/0 N7:Dÿ I/0 N7:Dÿ I/0 N7:Dÿ I/0 N7:Dÿ§ I/0 N7:D&#8240;I/0 N7:D&#8226;I/0 N7:D¼I/0 N7:Dÿ¯ I/0 N7:D¼I/0 N7: QE PE P ÿÆ Dÿä I/0 N7:Dÿ I/0 N7:Dÿ I/0 N7:Dÿù I/0 N7:Dÿý I/0 N7:D&#8240;I/0 N7:D&#8226;I/0 N7:D¼I/0 N7: QE PD P ÿ&#8230; DÕI/0 N7:Dÿ I/0 N7:Dÿ I/0 N7:DlI/0 N7:Dÿ I/0 N7:D&#8240;I/0...........

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

  • IsraeliRD
  • IsraeliRD's Avatar
  • Offline
  • Project Manager
  • Project Manager
  • Dragon Power Supreme
More
05 Feb 2011 14:32 #156 by IsraeliRD
Replied by IsraeliRD on topic Basic Marble Blast Coding Q&A
I may not be Seizure, but that PlayMissionGui::onWake IS in the playMissionGui. We all also know how does the compiled file look like

Picklecow10:
The solution is pretty obvious, sorta, you need to do the same thing as in game.cs in client folder. That is, 'if' gets ultimate, display bitmap X, but 'else if' gets platinum, display bitmap Y.
Taking your example & slightly modifying it plus using the .dso posted above:

if(time < mission.madeuptime)
{
badgeThingNextToTime=<bitmap:marble/client/ui/path/madeup.png>;
}
else if(time < mission.suckytime)
{
badgeThingNextToTime=<bitmap:marble/client/ui/path/sucky.png>;
}

Since we told the game where to check for the image, we can tell it just to do %badgeThingNextToTime later on when it grabs the times (like in game.cs in client) and it'll display the proper path to pic, thus showing the proper pic.

I was actually told how to do that by Alex Swanson when I tried to make the Ultimate Time for MBP The actual code is different and has more into it but the general concept is in the example above and gets you what you need.

"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.

  • Seizure22
  • Seizure22's Avatar
  • Offline
  • Intermediate Marbler
  • Intermediate Marbler
More
05 Feb 2011 21:38 #157 by Seizure22
Replied by Seizure22 on topic Basic Marble Blast Coding Q&A
@ jeff

Change the material attributes directly instead of creating a replacement:

defaultmaterial.friction = blah;
etc.

@ Dobrák

You can't edit it so put that function at the bottom of main.cs and it should work.

@picklecow

Add some elseifs to the area just after this code in client/ui/playmissiongui.gui, inside the for loop
(or ask Matan if you don't have the .gui)

Code: %file = %mission.file;
getBestTimes(%file, %mission);

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

More
05 Feb 2011 22:01 #158 by picklecow10
Replied by picklecow10 on topic Basic Marble Blast Coding Q&A
@Seizure: that's my main problem, I don't have the .gui

@RD Can I have the .gui?

I'm just really shaky on how to display the picture, I'm still relatively new to scripting.
Is it just something like, if I want text followed by a picture, I'd put:

text @ <bitmap:marble/client/ui/play/goldscore.png>;

Because something along those lines isn't working for me.

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

  • Jeff
  • Jeff's Avatar
  • Offline
  • Developer
  • Developer
  • PlatinumQuest Programmer
More
06 Feb 2011 03:37 #159 by Jeff
Replied by Jeff on topic Basic Marble Blast Coding Q&A
it is still not working


Quote://

datablock AudioProfile(doSuperJumpSfx)
{
filename = ~/data/sound/doSuperJump.wav;
description = AudioDefault3d;
preload = true;
};

datablock AudioProfile(PuSuperJumpSfx}
{
filename = ~/data/sound/pusuperJumpVoice.wav;
description = AudioDefault3d;
};

datablock ItemData(FrictionItem)
{
//Mission editor category
category = Powerups;
className = PowerUp;
powerUpId = 6;

activeAudio = DoSuperJumpSfx;
pickupAudio = PuSuperJumpVoicesSfx;

//Basic Item properties
shapeFile = ~/data/shapes/items/shockabsorber.dts;
mass = 1;
friction = 1;
elasticity = 0.3;
emap = false;

//Dynamic properties defined by the scripts
pickupName = a Friction Increase PowerUp!;
useName = Friction Increase PowerUp;
maxInventory = 1;
function Marble::onPowerUpUsed(%obj)
{
PlayGui.setPowerUp();
%obj.playAudio(0, %obj.powerUpData.activeAudio);
%obj.powerUpData = ;
defaultmaterial.friction = 10;
defaultmaterial.restitution = 0.5;
}
};

I am a programmer. Most here know me for being one of the major contributors to Marble Blast Platinum and PlatinumQuest.

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

More
06 Feb 2011 05:33 #160 by Phil
Replied by Phil on topic Basic Marble Blast Coding Q&A
Quote:text @ <bitmap:marble/client/ui/play/goldscore.png>;
@picklecow: Try it without the extension perhaps?

@jeff: my advice is to google learning TorqueScript. With all of the snippets you post, it looks like you're just trying things and hoping that they'll work, sorry.

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

  • dobrakmato
  • dobrakmato's Avatar
  • Offline
  • Experienced Marbler
  • Experienced Marbler
More
06 Feb 2011 13:10 #161 by dobrakmato
Replied by dobrakmato on topic Basic Marble Blast Coding Q&A
@Seizure22
OK tested but doesn't work in Marble Blast/main.cs - Showing Syntax error
and doesn't work in Marble Blast/marble/main.cs - Showing: Code:marble/main.cs Line: 136 - Syntax error.
>>> Advanced script error report. Line 271.
>>> Some error context, with ## on sides of error halt:
echo(%device @ - @ getWord(%res, 0) @ x @ getWord(%res, 1) @ ( @ getWord(%res, 2) @ bpp)); } } PlayMissionGui::onWake(%this, %obj) {##
##
if($MissionType $= ) $MissionType = Beginner; PMSetMissionTab($MissionType)
>>> Error report complete.

Executing marble/main.cs.
marble/main.cs Line: 136 - Syntax error.
>>> Advanced script error report. Line 271.
>>> Some error context, with ## on sides of error halt:
echo(%device @ - @ getWord(%res, 0) @ x @ getWord(%res, 1) @ ( @ getWord(%res, 2) @ bpp)); } } PlayMissionGui::onWake(%this, %obj) {##
##
if($MissionType $= ) $MissionType = Beginner; PMSetMissionTab($MissionType)
>>> Error report complete.


and error in the MarbleBlast/common/main.cs - Code:common/main.cs Line: 157 - Syntax error.
>>> Advanced script error report. Line 313.
>>> Some error context, with ## on sides of error halt:
activatePackage(Common); PlayMissionGui::onWake(%this, %obj) {##
##
if($MissionType $= ) $MissionType = Beginner; PMSetMissionTab($MissionType); //function from original file
>>> Error report complete.


What I'm doing bad?

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 Feb 2011 13:36 #162 by IsraeliRD
Replied by IsraeliRD on topic Basic Marble Blast Coding Q&A
Did you close the function with a } ?

Also I thought seizure meant the root main.cs (but I'm not him so I don't know )

"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.

  • dobrakmato
  • dobrakmato's Avatar
  • Offline
  • Experienced Marbler
  • Experienced Marbler
More
06 Feb 2011 14:22 #163 by dobrakmato
Replied by dobrakmato on topic Basic Marble Blast Coding Q&A
Feb 6, 2011, 5:36am, admin wrote:Did you close the function with a } ?

Also I thought seizure meant the root main.cs (but I'm not him so I don't know )

Yes i closed function with }...

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

  • Seizure22
  • Seizure22's Avatar
  • Offline
  • Intermediate Marbler
  • Intermediate Marbler
More
06 Feb 2011 21:49 #164 by Seizure22
Replied by Seizure22 on topic Basic Marble Blast Coding Q&A
You need to add the word function before playmissiongui::onwake:

function playmissiongui::onwake()
{
....

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

More
07 Feb 2011 05:31 #165 by picklecow10
Replied by picklecow10 on topic Basic Marble Blast Coding Q&A
Removing the extension doesn't work.

I guess I may just use different colors instead of badges

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

  • IsraeliRD
  • IsraeliRD's Avatar
  • Offline
  • Project Manager
  • Project Manager
  • Dragon Power Supreme
More
07 Feb 2011 05:42 #166 by IsraeliRD
Replied by IsraeliRD on topic Basic Marble Blast Coding Q&A
Extention? but both mbg and mbp use it...

Anyway, here is MBP's, modded a bit for you:
Code:
if (%time < %mission.madeupTime)
{
%badgenextotime = <bitmap:marble/client/ui/play/madeupTime.png>\n;
}
else if (%time < %mission.suckyTime)
{
%badgenextotime = <bitmap:marble/client/ui/play/suckyTime.png>\n;
}
%descText = %descText @ <shadow:1:1><color:000000><shadowcolor:ffffff4f> @ (%i + 1) @ . @ getField($hs[%i], 1) TAB formatTime(%time) TAB %badgenextotime;

"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
  • Rewrite it in Rust
More
09 Feb 2011 02:02 #167 by HiGuy
Replied by HiGuy on topic Basic Marble Blast Coding Q&A
Hey, lately I've been trying to make a low-gravity powerup that the user can collect and use at any time, but whenever I use it, the game crashes.

Code:
Code:datablock AudioProfile(PuLowGravVoiceSfx) {
filename = ~/data/sound/LowGrav.wav;
description = AudioDefault3d;
preload = true;
};
datablock ItemData(LowGravItem) {
category = Powerups;
className = PowerUp;
pickupAudio = PuLowGravVoiceSfx;
pickupName = a Low Gravity Powerup!;
useName = Low Gravity Powerup!;
shapeFile = ~/data/shapes/powerup/LowGrav.dts;
mass = 1;
powerUpId = 6;
friction = 1;
elasticity = 0.3;
emap = true;
maxInventory = 1;
};
function LowGravItem::onUse(%this, %data) {
echo(Use);
Parent::onUse(%this, %data);
defaultmarble.gravity = 4;
return true;
}


Unfortunately, the PowerUp crashes MB, and it never echos Use. Is there anything incorrect with my code, or do I need to add handlers in inventory.cs and such?

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
09 Feb 2011 21:33 #168 by Seizure22
Replied by Seizure22 on topic Basic Marble Blast Coding Q&A
This was just covered some days ago:

GOGO COPYPASTA!

*remove quote tags because the text is SOO SMALL, could you change the quote/code font size for the forum?*

That is because the default powerups are hardcoded in the engine, and there are no definitions of what to do for powerupid > 5. To fix this, you would need to edit the Marble::setPowerUp function to account for ID > 5 (and thus make functions to do what you want to accomplish) OR create a separate class of item object altogether (such as the gems are) with custom scripting to interface with the powerup variables, functions, and GUI element(s).

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

  • IsraeliRD
  • IsraeliRD's Avatar
  • Offline
  • Project Manager
  • Project Manager
  • Dragon Power Supreme
More
09 Feb 2011 23:07 #169 by IsraeliRD
Replied by IsraeliRD on topic Basic Marble Blast Coding Q&A
Nope, but you can add in [size] tags


Quote:Hi Seizure!

Uses size=4.

"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.

  • Jeff
  • Jeff's Avatar
  • Offline
  • Developer
  • Developer
  • PlatinumQuest Programmer
More
10 Feb 2011 00:50 #170 by Jeff
Replied by Jeff on topic Basic Marble Blast Coding Q&A
Ontopic: If there were not to be any particle trail or extra particle shape ect. could you just put the powerupId equal to 0?

Offtopic: I am now an intermediate marbleler!

I am a programmer. Most here know me for being one of the major contributors to Marble Blast Platinum and PlatinumQuest.

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

  • Jeff
  • Jeff's Avatar
  • Offline
  • Developer
  • Developer
  • PlatinumQuest Programmer
More
12 Feb 2011 00:11 #171 by Jeff
Replied by Jeff on topic Basic Marble Blast Coding Q&A
Bump:

I am having a problem. When I click the button in the playmission gui, the console displays the message of :

setContent(): Invalid control: HelpGui

I have built a HelpGui.gui and a helpgui.cs file. They both contain no errors because they have compiled into .dso

here is the button in playmissiongui.gui


Quote:
new GuiBitmapButtonCtrl(PM_HelpGui) {
profile = GuiButtonProfile;
horizSizing = right;
vertSizing = bottom;
position = 527 60;
extent = 100 50;
minExtent = 8 8;
visible = 1;
command = Canvas.setContent(HelpGui);;
helpTag = 0;
text = Help;
groupNum = -1;
buttonType = PushButton;
repeatPeriod = 1000;
repeatDecay = 1;
bitmap = ./home/help.png;
};

I am a programmer. Most here know me for being one of the major contributors to Marble Blast Platinum and PlatinumQuest.

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

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • Rewrite it in Rust
More
12 Feb 2011 00:21 #172 by HiGuy
Replied by HiGuy on topic Basic Marble Blast Coding Q&A
Whats the name of the root GuiControl in your HelpGui.gui file? Try recompiling.

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

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

  • Jeff
  • Jeff's Avatar
  • Offline
  • Developer
  • Developer
  • PlatinumQuest Programmer
More
12 Feb 2011 00:24 #173 by Jeff
Replied by Jeff on topic Basic Marble Blast Coding Q&A
I will have to check. Go on ggtalk so I wont have to post it here. I dont want anybody to steal my code. I did not even know that there is a root.

Sorry for going off topic.

BTW what the heck is a root?

I am a programmer. Most here know me for being one of the major contributors to Marble Blast Platinum and PlatinumQuest.

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

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • Rewrite it in Rust
More
12 Feb 2011 01:28 #174 by HiGuy
Replied by HiGuy on topic Basic Marble Blast Coding Q&A
The first GuiObject

Example:
(I boldfaced the name)

Quote:

new GuiControl(CustomMarbleDlg) {
profile = GuiDefaultProfile;
horizSizing = center;
vertSizing = center;
position = 0 0;
extent = 640 480;
minExtent = 8 8;
visible = 1;
helpTag = 0;


heh seiz, can you read it now?

HiGuy

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

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

  • Jeff
  • Jeff's Avatar
  • Offline
  • Developer
  • Developer
  • PlatinumQuest Programmer
More
19 Feb 2011 19:47 #175 by Jeff
Replied by Jeff on topic Basic Marble Blast Coding Q&A
bump:

yah, my roots probebly off. Thanks Higuy

I am a programmer. Most here know me for being one of the major contributors to Marble Blast Platinum and PlatinumQuest.

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

  • Jeff
  • Jeff's Avatar
  • Offline
  • Developer
  • Developer
  • PlatinumQuest Programmer
More
21 Feb 2011 23:22 #176 by Jeff
Replied by Jeff on topic Basic Marble Blast Coding Q&A
Bump: Sorry for the double post

I am coding a secondary time for a friend of mine (kind of like ultimate time)

I keep getting an error report and everytime I try to fix it, it doesnot work.

Here's the code:


Quote://Qualification Time
if($Game::Qualified)
{
if(MissionInfo.goldTime)
{
%text = %text @ <color:FFFF00> @ ((MissionInfo.goldTime && $Game::ScoreTime < MissionInfo.goldTime)You beat the <color:FFFF00><font:Times New Roman>GOLD<color:FFFF00> time!);
}
else if(MissionInfo.siverTime)
{
%text = %text @ <color:888c8d> @ ((MissionInfo.silverTime && $Game::ScoreTime < MissionInfo.silverTime)You beat the <color:888c8d><font:Times New Roman>SILVER<color:888c8d> time!);
}
else if(MissionInfo.Time)
{
%text = %text @ <color:888c8d> @ ((MissionInfo.Time && $Game::ScoreTime <= MissionInfo.Time)You've Qualified);
}
}
else
%text = %text @ <color:ff0000>You failed to qualify!;

I am a programmer. Most here know me for being one of the major contributors to Marble Blast Platinum and PlatinumQuest.

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

  • HiGuy
  • HiGuy's Avatar
  • Offline
  • Administrator
  • Administrator
  • Rewrite it in Rust
More
22 Feb 2011 04:10 #177 by HiGuy
Replied by HiGuy on topic Basic Marble Blast Coding Q&A
@Jeff: I answered on the MBOpal boards already.

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

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

  • Jeff
  • Jeff's Avatar
  • Offline
  • Developer
  • Developer
  • PlatinumQuest Programmer
More
26 Feb 2011 23:06 #178 by Jeff
Replied by Jeff on topic Basic Marble Blast Coding Q&A
Bump:

I am trying to code so that you can choose which audio music file you would want to play on your level for Joey's mod.

Here's my code, but it wont work

No santax errors present.


Quote:function playGameMusic()
{
if(!$musicFound)
{
$NumMusicFiles = 0;
for(%file = findFirstFile(*.ogg); %file !$= ; %file = findNextFile(*.ogg))
{
if(fileBase(%file) !$= Shell)
{
$Music[$NumMusicFiles] = fileBase(%file) @ .ogg;
$NumMusicFiles++;
}
}
$musicFound = true;
}
if($NumMusicFiles)
{
playMusic($Music[MissionInfo.level % $NumMusicFiles]);
}
else
{
playMusic(Shell.ogg);
}
if(%MusicProfile.fileName)
{
playMusic(%file @ $currentMusicBase);
}

}


whats in bold is my new code.

this is in audioprofiles.cs

I am a programmer. Most here know me for being one of the major contributors to Marble Blast Platinum and PlatinumQuest.

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

  • IsraeliRD
  • IsraeliRD's Avatar
  • Offline
  • Project Manager
  • Project Manager
  • Dragon Power Supreme
More
26 Feb 2011 23:13 #179 by IsraeliRD
Replied by IsraeliRD on topic Basic Marble Blast Coding Q&A
1) syntax
2) putting in

/ format does not work with bold well, its not easy at all. you need [u], would be easier[code] format does not work with bold well, its not easy at all. you need , would be easier


"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.

  • dobrakmato
  • dobrakmato's Avatar
  • Offline
  • Experienced Marbler
  • Experienced Marbler
More
27 Feb 2011 01:06 #180 by dobrakmato
Replied by dobrakmato on topic Basic Marble Blast Coding Q&A
In wich file i can found function used for jump?

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

Moderators: AayrlKalle29Regislian