|
Post by Seizure22 (Witty Title) on Jun 25, 2011 22:24:16 GMT
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)
|
|
whirligig
Experienced Marbler
[ss:Phil'sEmpire Skin]
Posts: 168
|
Post by whirligig on Jun 25, 2011 22:54:53 GMT
Are you talking about this?
// 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.
|
|
Explode
Professional Marbler
I like C4 . :D
Posts: 482
|
Post by Explode on Jul 8, 2011 0:27:05 GMT
Where are the codes that declare the phrases like "You've found a gem"?
|
|
|
Post by Tech Warrior on Jul 8, 2011 0:52:41 GMT
Marble/server/scripts/game.cs
|
|
Explode
Professional Marbler
I like C4 . :D
Posts: 482
|
Post by Explode on Jul 8, 2011 1:15:30 GMT
Okay thanks!!
|
|
|
Post by Ian Cordle on Jul 8, 2011 1:22:55 GMT
Why didn't you just ask lamp?
|
|
|
Post by Tech Warrior on Jul 8, 2011 1:24:58 GMT
Just a wild guess here but maybe it's lamp that wanted the information... Or he didn't know.
|
|
Explode
Professional Marbler
I like C4 . :D
Posts: 482
|
Post by Explode on Jul 8, 2011 1:42:38 GMT
Lamp was brain dead.
|
|
Explode
Professional Marbler
I like C4 . :D
Posts: 482
|
Post by Explode on Jun 3, 2012 20:04:26 GMT
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
|
|
|
Post by Jeff on Jun 3, 2012 20:56:48 GMT
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
|
|
|
Post by Aayrl on Jun 4, 2012 13:26:08 GMT
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.
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
|
|
|
Post by IsraeliRD on Jun 4, 2012 13:47:30 GMT
Aayrl: the rotate option (Alt in windows) doesn't exist in Mac. You can't add it.
|
|
Explode
Professional Marbler
I like C4 . :D
Posts: 482
|
Post by Explode on Jun 4, 2012 18:59:11 GMT
@ Jeff, Do I add that to the item data?
|
|
|
Post by Jeff on Jun 4, 2012 20:42:41 GMT
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.
|
|
Explode
Professional Marbler
I like C4 . :D
Posts: 482
|
Post by Explode on Aug 15, 2012 18:33:15 GMT
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.
|
|
|
Post by Jeff on Aug 15, 2012 19:43:31 GMT
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.
|
|
|
Post by Aayrl on Aug 16, 2012 21:54:52 GMT
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
|
|
|
Post by Seizure22 (Witty Title) on Aug 18, 2012 18:32:30 GMT
.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)
|
|
Ben
Beginner Marbler
Happy Roll Level Buider & Programmer
Posts: 72
|
Post by Ben on Aug 21, 2012 3:13:08 GMT
How can I shake the camera when triggering a landmine?
|
|
|
Post by Jeff on Aug 21, 2012 3:34:23 GMT
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.
|
|
Ben
Beginner Marbler
Happy Roll Level Buider & Programmer
Posts: 72
|
Post by Ben on Aug 21, 2012 6:58:17 GMT
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.
|
|
|
Post by Alexis on Aug 24, 2012 13:46:07 GMT
I have a question, when i type:
$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.
|
|
Explode
Professional Marbler
I like C4 . :D
Posts: 482
|
Post by Explode on Aug 24, 2012 17:46:03 GMT
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.
|
|
|
Post by Alexis on Aug 24, 2012 18:30:12 GMT
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?
|
|
Explode
Professional Marbler
I like C4 . :D
Posts: 482
|
Post by Explode on Aug 24, 2012 19:18:08 GMT
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.
|
|
|
Post by Alexis on Aug 24, 2012 19:27:45 GMT
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.
|
|
Explode
Professional Marbler
I like C4 . :D
Posts: 482
|
Post by Explode on Aug 24, 2012 19:36:19 GMT
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.
|
|
|
Post by Jeff on Aug 24, 2012 19:45:05 GMT
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
|
|
|
Post by Alexis on Aug 24, 2012 20:15:37 GMT
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: export("$pi:[img]http://i92.photobucket.com/albums/l14/Perishingflames/happy.gif[/img]","~/blah/pi.cs",False); //Plus, why "false" as a second argument? It's still very confusing to me.
|
|
|
Post by Jeff on Aug 24, 2012 20:18:53 GMT
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
|
|