|
Post by IsraeliRD on Feb 5, 2011 2:14:42 GMT
That I don't know. Wait for someone else to respond I don't think it would though.
|
|
|
Post by Jeff on Feb 5, 2011 2:14:32 GMT
Thanks anyways, Matan.
Edit: Thats odd, I posted this after you matan, but it showed up before (sorry for going off topic.)
|
|
dobrakmato
Advanced Marbler
C# Code master[ss:Default Skin]
Are you a XNA developer? Contact me!
Posts: 314
|
Post by dobrakmato on Feb 5, 2011 8:03:46 GMT
|
|
|
Post by picklecow10 on Feb 5, 2011 8:26:06 GMT
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 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.
|
|
dobrakmato
Advanced Marbler
C# Code master[ss:Default Skin]
Are you a XNA developer? Contact me!
Posts: 314
|
Post by dobrakmato on Feb 5, 2011 10:56:51 GMT
I know but playmissiongui.gui.dso is compiled file... and when i open it show me this: ! \ 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 ð? @¨ ™ A QE PE P ÿ¬ D-I/0 N7:DKI/0 N7:D\I/0 N7:DlI/0 N7:DwI/0 N7:D‰I/0 N7:D•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‰I/0 N7:D•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‰I/0 N7:D•I/0 N7:Dÿ< I/0 N7:D¼I/0 N7:Dÿh 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‰I/0 N7:D•I/0 N7:Dÿª I/0 N7:D¼I/0 N7:DÿÚ I/0 N7:D•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‰I/0 N7:D•I/0 N7:Dÿ I/0 N7:D¼I/0 N7:Dÿ= I/0 N7:D¼I/0 N7:Dÿ 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‰I/0 N7:D•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‰I/0 N7:D•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‰I/0 N7:D•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‰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:DlI/0 N7:Dÿ I/0 N7:D‰I/0...........
|
|
|
Post by IsraeliRD on Feb 5, 2011 11:32:33 GMT
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.
|
|
|
Post by Seizure22 (Witty Title) on Feb 5, 2011 18:38:44 GMT
@ 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)
%file = %mission.file; getBestTimes(%file, %mission);
|
|
|
Post by picklecow10 on Feb 5, 2011 19:01:39 GMT
@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.
|
|
|
Post by Jeff on Feb 6, 2011 0:37:51 GMT
it is still not working
|
|
|
Post by phil on Feb 6, 2011 2:33:45 GMT
@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.
|
|
dobrakmato
Advanced Marbler
C# Code master[ss:Default Skin]
Are you a XNA developer? Contact me!
Posts: 314
|
Post by dobrakmato on Feb 6, 2011 10:10:51 GMT
Seizure22 (Witty Title)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: 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 - 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?
|
|
|
Post by IsraeliRD on Feb 6, 2011 10:36:07 GMT
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 )
|
|
dobrakmato
Advanced Marbler
C# Code master[ss:Default Skin]
Are you a XNA developer? Contact me!
Posts: 314
|
Post by dobrakmato on Feb 6, 2011 11:22:51 GMT
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 "}"...
|
|
|
Post by Seizure22 (Witty Title) on Feb 6, 2011 18:49:16 GMT
You need to add the word function before playmissiongui::onwake:
function playmissiongui::onwake() { ....
|
|
|
Post by picklecow10 on Feb 7, 2011 2:31:02 GMT
Removing the extension doesn't work. I guess I may just use different colors instead of badges
|
|
|
Post by IsraeliRD on Feb 7, 2011 2:42:26 GMT
Extention? but both mbg and mbp use it...
Anyway, here is MBP's, modded a bit for you:
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;
|
|
|
Post by Hi Guy on Feb 8, 2011 23:02:07 GMT
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:
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?
|
|
|
Post by Seizure22 (Witty Title) on Feb 9, 2011 18:33:11 GMT
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).
|
|
|
Post by IsraeliRD on Feb 9, 2011 20:07:01 GMT
Nope, but you can add in tags
Uses size=4.
|
|
|
Post by Jeff on Feb 9, 2011 21:50:26 GMT
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!
|
|
|
Post by Jeff on Feb 11, 2011 21:11:44 GMT
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
|
|
|
Post by Hi Guy on Feb 11, 2011 21:21:43 GMT
Whats the name of the root GuiControl in your HelpGui.gui file? Try recompiling.
|
|
|
Post by Jeff on Feb 11, 2011 21:24:00 GMT
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?
|
|
|
Post by Hi Guy on Feb 11, 2011 22:28:01 GMT
The first GuiObject Example: (I boldfaced the name) heh seiz, can you read it now? HiGuy
|
|
|
Post by Jeff on Feb 19, 2011 16:47:21 GMT
bump:
yah, my roots probebly off. Thanks Higuy
|
|
|
Post by Jeff on Feb 21, 2011 20:22:34 GMT
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:
|
|
|
Post by Hi Guy on Feb 22, 2011 1:10:15 GMT
Jeff: I answered on the MBOpal boards already.
|
|
|
Post by Jeff on Feb 26, 2011 20:06:40 GMT
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.
whats in bold is my new code.
this is in audioprofiles.cs
|
|
|
Post by IsraeliRD on Feb 26, 2011 20:13:29 GMT
1) syntax 2) putting in
|
|
dobrakmato
Advanced Marbler
C# Code master[ss:Default Skin]
Are you a XNA developer? Contact me!
Posts: 314
|
Post by dobrakmato on Feb 26, 2011 22:06:16 GMT
In wich file i can found function used for jump?
|
|