file Basic Marble Blast Coding Q&A

  • Seizure22
  • Seizure22's Avatar
  • Offline
  • Intermediate Marbler
  • Intermediate Marbler
  • Posts: 79
  • Thank you received: 0
26 Jun 2011 00:24 #241
if you want an easy hacky way, just map the mine's texture to a bounce material

if you want a real way, mod the explosion force on the explosion datablocks (there are subexplosions too, but I don't think they have force by default)

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

  • whirligig
  • whirligig's Avatar
  • Offline
  • Professional Marbler
  • Professional Marbler
  • Posts: 444
  • Thank you received: 261
26 Jun 2011 00:54 #242
Are you talking about this?

Code: // Impulse
impulseRadius = 10;
impulseForce = 15;


Because I tried changing those, and the mines still had the same amount of force with both of them set to 0.

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

  • Posts: 219
  • Thank you received: 1
08 Jul 2011 02:27 #243
Where are the codes that declare the phrases like You've found a gem?

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

  • Joey
  • Joey's Avatar
  • Offline
  • Senior Marbler
  • Senior Marbler
  • Doer of things.
  • Posts: 882
  • Thank you received: 191
08 Jul 2011 02:52 #244
Marble/server/scripts/game.cs

I love you, but your attitude is like that of a shrew. Your options? Take a pill or be my kill. Might I suggest that you wear a vest. Perish in class or be banished to the land of bluegrass, where dreams don't exist as you'll be eternally pissed.

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

  • Posts: 219
  • Thank you received: 1
08 Jul 2011 03:15 #245
Okay thanks!!

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

  • Ian_Cordle
  • Ian_Cordle's Avatar
  • Offline
  • Advanced Marbler
  • Advanced Marbler
  • eSports Director
  • Posts: 247
  • Thank you received: 10
08 Jul 2011 03:22 #246
Why didn't you just ask lamp?

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

  • Joey
  • Joey's Avatar
  • Offline
  • Senior Marbler
  • Senior Marbler
  • Doer of things.
  • Posts: 882
  • Thank you received: 191
08 Jul 2011 03:24 #247
Just a wild guess here but maybe it's lamp that wanted the information... Or he didn't know.

I love you, but your attitude is like that of a shrew. Your options? Take a pill or be my kill. Might I suggest that you wear a vest. Perish in class or be banished to the land of bluegrass, where dreams don't exist as you'll be eternally pissed.

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

  • Posts: 219
  • Thank you received: 1
08 Jul 2011 03:42 #248
Lamp was brain dead.

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

  • Posts: 219
  • Thank you received: 1
03 Jun 2012 22:04 #249
Sorry for the double post but.....

Where is the command Rotate defined. (I am trying to get an object to rotate on the y axis)


Thanks

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

  • Jeff
  • Jeff's Avatar
  • Offline
  • Elite Marbler
  • Elite Marbler
  • PlatinumQuest Programmer
  • Posts: 1680
  • Thank you received: 205
03 Jun 2012 22:56 #250
woot! A question!

Um...i dont think there is a rotate function that i know of, just use

%matrix = getWords(%obj.getTransform(),3,6);

returns the 4 point rotation vector in radians^
x y z theta

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.

  • Aayrl
  • Aayrl's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Big Deal!
  • Posts: 1118
  • Thank you received: 368
04 Jun 2012 15:26 #251
If you're looking to rotate an object in the GUI, follow the code in the help/credits gui. Here's an example of the super speed gui item.

Code:new GuiObjectView(HC_SuperSpeed) {
profile = GuiDefaultProfile;
horizSizing = right;
vertSizing = bottom;
position = 30 73;
extent = 79 66;
minExtent = 8 8;
visible = 0;
helpTag = 0;
cameraZRot = 0;
forceFOV = 0;
model = ~/data/shapes/items/superspeed.dts;
skin = base;
cameraRotX = 0.35; // Rotate the object around the x axis (Spinning effect)
cameraZRotSpeed = 0.001; // Speed of rotation
orbitDistance = 2;
autoSize = 0;
};

If you're trying to rotate an object in a specific Marble Blast level, simply open the level editor and click on the object you wish to rotate. While your mouse is highlighting the axis you wish to rotate the object about, hold down ALT (CMD for Macs?) and then click and drag that axis. The object will rotate about that axis.

~Aayrl

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

  • IsraeliRD
  • IsraeliRD's Avatar
  • Offline
  • Project Manager
  • Project Manager
  • Dragon Power Supreme
  • Posts: 3502
  • Thank you received: 912
04 Jun 2012 15:47 #252
Aayrl: the rotate option (Alt in windows) doesn't exist in Mac. You can't add it.

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

  • Posts: 219
  • Thank you received: 1
04 Jun 2012 20:59 #253
@ Jeff, Do I add that to the item data?

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

  • Jeff
  • Jeff's Avatar
  • Offline
  • Elite Marbler
  • Elite Marbler
  • PlatinumQuest Programmer
  • Posts: 1680
  • Thank you received: 205
04 Jun 2012 22:42 #254
um what I said was more for manual rotation. If you are rotating an item, well, I believe that rotation is from the engine. If you wanted it to be on the Y axis, then just change its rotation field in the level editor. The field is X Y Z A, where A is the theta measurement angle in degrees. If you want to rotate a static shape, then you have to make a recursive schedule, and make updates to its rotation vector.

@Whirligig (even though this was one year ago and i fixed this for him....anybody else if you were still wondering)

you need to delete the subexplosions because @Seizure they do have forces to them. Once you kill those then you can change those properties.

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.

  • Posts: 219
  • Thank you received: 1
15 Aug 2012 20:33 #255
I have a question about engine limitations:

Is it possible to make a gui profile that has the ability to display video content in .rec or file format?

I would like to know this before I waste any time working on an impossible project.

Thanks,

Explode.

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

  • Jeff
  • Jeff's Avatar
  • Offline
  • Elite Marbler
  • Elite Marbler
  • PlatinumQuest Programmer
  • Posts: 1680
  • Thank you received: 205
15 Aug 2012 21:43 #256
um..you should try to attempt to use a GuiTSControl() which is found in playGui.gui. Then, you can use that to play the .rec considering that the demo player just uses playGui.

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.

  • Aayrl
  • Aayrl's Avatar Topic Author
  • Offline
  • Administrator
  • Administrator
  • Big Deal!
  • Posts: 1118
  • Thank you received: 368
16 Aug 2012 23:54 #257
MBP was able to accomplish this using a similar method to what Jeff mentioned above for their demo player in-game. Depends on where you're playing the .rec file and what else would be running on that GUI page.

~Aayrl

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

  • Seizure22
  • Seizure22's Avatar
  • Offline
  • Intermediate Marbler
  • Intermediate Marbler
  • Posts: 79
  • Thank you received: 0
18 Aug 2012 20:32 #258
.rec is a recording of input and/or additional gameplay data, it contains no video data

the GameTSCtrl gui object renders the game world, though. (it's what playgui uses)

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

  • UN1C0DE
  • UN1C0DE's Avatar
  • Offline
  • Beginner Marbler
  • Beginner Marbler
  • Happy Roll
  • Posts: 61
  • Thank you received: 5
21 Aug 2012 05:13 #259
How can I shake the camera when triggering a landmine?

Member of Roll Game Team
Programmer / Level Modeller / Background Music Designer
MarbleBlast::HappyRoll YEAH!!!!!!!!

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

  • Jeff
  • Jeff's Avatar
  • Offline
  • Elite Marbler
  • Elite Marbler
  • PlatinumQuest Programmer
  • Posts: 1680
  • Thank you received: 205
21 Aug 2012 05:34 #260
Not sure of this works, but on the landmine's explosion datablock it has camera shaking properties, try modifying that. If that does not work, you will have to use a hackish way by modifying the player's field of view, and using a series of schedules to shake it quickly.

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.

  • UN1C0DE
  • UN1C0DE's Avatar
  • Offline
  • Beginner Marbler
  • Beginner Marbler
  • Happy Roll
  • Posts: 61
  • Thank you received: 5
21 Aug 2012 08:58 #261
Aug 20, 2012, 10:34pm, jeff wrote:Not sure of this works, but on the landmine's explosion datablock it has camera shaking properties, try modifying that. If that does not work, you will have to use a hackish way by modifying the player's field of view, and using a series of schedules to shake it quickly.

Sadly, modifying camera shaking properties doesn't work.

Member of Roll Game Team
Programmer / Level Modeller / Background Music Designer
MarbleBlast::HappyRoll YEAH!!!!!!!!

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

  • Posts: 240
  • Thank you received: 0
24 Aug 2012 15:46 #262
I have a question, when i type:

Code:$prefs::variable = 2

In a file, and open the game, the variable is saved and its value too, in prefs.cs, how is it possible? And what does :: mean?

EDIT: After some thinking... i guess :: mean we're adding/modifying a variable of the $prefs class? Just a guess. I'm not sure they are class in TS.

I still don't see what black magic is used to put automatically all $prefs variable into the prefs.cs file. I just want to know how it works. But BTW it's really useful to add an info on the hard drive without using any function to write into a file.

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

  • Posts: 219
  • Thank you received: 1
24 Aug 2012 19:46 #263
To my understanding, the reason that happens is: the game compiles the changed file, it sees that a new variable was created, it analyzes a the variable's name ($ means global, Prefs means the file, :: divides the file and variables name, variable gives a place to find it, = 2 gives value, ; ends line. Thus, it is a Global variable in the prefs.cs name variable and it has a value of two) then copies it to the location it needs to go to. So, if you made a variable: $pi=3.14159265359; it wouldn't sync with the prefs.cs.

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

  • Posts: 240
  • Thank you received: 0
24 Aug 2012 20:30 #264
That's odd, i don't think it was in the TS syntax guide i've read some months ago. It's really confusing to me.

So, can i create my own file which act like $prefs, but with a different name? And could you be more precise on the way it actually works?

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

  • Posts: 219
  • Thank you received: 1
24 Aug 2012 21:18 #265
Trying it out in T3D...


Edit: Yep, in T3D at least. I made a variable : $Pi::variable=1; and a pi.cs, exec it and it worked.

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

  • Posts: 240
  • Thank you received: 0
24 Aug 2012 21:27 #266
Wow...

So, there's no limit, you can put the pi.cs where you want and create the variable where you want? I think you can be more precise.

I'm still wondering how it works. I don't get what TS get.

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

  • Posts: 219
  • Thank you received: 1
24 Aug 2012 21:36 #267
I personally don't know why it does that. I just knew for some random reason it did. My guess it that it works as a classification (not unlike $ that tells the engine it is a global variable, where pi:: tells the engine it is a pi variable and to store it in pi) Now I only tried this within the folder. So, the way the engine takes it from client to server, idk. It may still work, but the engine knows in MB to put it in the client copy of prefs.

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

  • Jeff
  • Jeff's Avatar
  • Offline
  • Elite Marbler
  • Elite Marbler
  • PlatinumQuest Programmer
  • Posts: 1680
  • Thank you received: 205
24 Aug 2012 21:45 #268
Actually, the engine has no idea where prefs is stored. its all torquescript based with a c++ console function.

:: means nothing, its for a matter of programmer organization. Its just the namespace operator, which has no effects on variables in TorqueScript.

You can export any $global to any file with the export method

export($variablename,marble/blah.cs,False);

how prefs does it, they use the * (wildcard) operator, which exports any variable to the file that begins with the wildcard. How prefs was made:

export($pref::*,~/client/prefs.cs,False);

Variables in torque are easier than you think, probably the easiest i've ever seen in a language compared to others where you have to define them with the specified type and scope, U or S for integers, ect.

Hope this helps! Any questions feel free to post or ask me!

Jeff

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.

  • Posts: 240
  • Thank you received: 0
24 Aug 2012 22:15 #269
Aug 24, 2012, 2:45pm, jeff wrote:How prefs was made:

export($pref::*,~/client/prefs.cs,False);


Well, it looks more interesting, thank you Jeff, but i'm not sure to get it... where is the function export() called? And why did the $pi::blah variable worked for Explode, since you just said that it's how prefs was made? I doubt Explode typed:

Code:export($pi::*,~/blah/pi.cs,False); //Plus, why false as a second argument?

It's still very confusing to me.

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

  • Jeff
  • Jeff's Avatar
  • Offline
  • Elite Marbler
  • Elite Marbler
  • PlatinumQuest Programmer
  • Posts: 1680
  • Thank you received: 205
24 Aug 2012 22:18 #270
False is so that it don't keep adding to the file, and instead erases it then exports it. Export is called in marble/main.cs in the function onExit()

And you can do that with any variable, you don't have to just export prefs. Also lamp could have also just made a new .cs file too

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.

Moderators: Doomblah
Time to create page: 0.969 seconds
We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.