Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by fLUnKnhaXYU

  1. with this little line you can hold freelook , move the camera , excute this line and it will apply impulse to the player in the direction of the camera view , I guess the program adds the player rotation to the camera . %player.applyimpulse(%player.getposition(),vectorscale(%player.geteyevector(),"10000 10000 10000"));
  2. I got this little excerpt from some notes Id made . My notes titled TSoverview but I didnt see it at GG , Its probably there somewhere . I dont think it exactly addresses your question to which Id say that I dont think that TS uses some of those commands . If you find it interesting just Google or whatever " torque script " //The Excerpt : Objects Having covered the basics of the language, it's time to examine some of TorqueScript's more interesting details. In Torque, every item in the game world is an object, and all game world objects can be accessed via script. For example, Player, WheeledVehicle, Item, etc are all accessible via script, though they are defined in C++. Objects are created in TorqueScript using the following syntax: // In TorqueScript %var = new ObjectType(Name : CopySource, arg0, ..., argn) { [existing_field0 = InitialValue0;] ... [existing_fieldM = InitialValueM;] [dynamic_field0 = InitialValue0;] ... [dynamic_fieldN = InitialValueN;] }; This syntax is simpler than it looks. Let's break it down: %var- Is the variable where the object's handle will be stored. new- Is a key word telling the engine to create an instance of the following ObjectType. ObjectType- Is any class declared in the engine or in script that has been derived from SimObject or a subclass of SimObject. SimObject-derived objects are what we were calling "game world objects" above. Name (optional)- Is any expression evaluating to a string, which will be used as the object's name. CopySource (optional)- The name of an object which is previously defined somewhere in script. Existing field values will be copied from CopySource to the new object being created. Any dynamic fields defined in CopySource will also be defined in the new object, and their values will be copied. Note: If CopySource is of a different ObjectType than the object being created, only CopySource's dynamic fields will be copied. arg0, ..., argn (optional)- Is a comma separated list of arguments to the class constructor (if it takes any). datablock- Many objects (those derived from GameBase, or children of GameBase) require datablocks to initialize specific attributes of the new object. Datablocks are discussed below. existing_fieldM- In addition to initializing values with a datablock, you may also initialize existing class members (fields) here. Note: In order to modify a member of a C++-defined class, the member must be exposed to the Console. This concept is discussed in detail later. dynamic_fieldN- Lastly, you may create new fields (which will exist only in Script) for your new object. These will show up as dynamic fields in the World Editor Inspector. ***************************** Due to the way Torque parses script files, the ObjectType must be known at compile time. In order to create types that are only known post compile, use the eval() function. For example, this will not compile: new %myObjectType(SomeObjectName); Place this in an eval() function to force Torque to evaluate it properly: eval("new %myObjectType(SomeObjectName);"); Let's create one object that doesn't use a datablock and one that does: // create a SimObject w/o modifying any fields $example_object = new SimObject(); // create a SimObject w/ dynamic fields $example_object = new SimObject() { a_new_field = "Hello world!"; }; // create a StaticShape using a datablock datablock StaticShapeData(MyFirstDataBlock) { shapeFile = "~/data/shapes/player/player.dts"; junkvar = "helloworld"; }; new StaticShape() { dataBlock = "MyFirstDataBlock"; position = "0.0 0.0 0.0"; rotation = "1 0 0 0"; scale = "1 1 1"; }; //END OF EXCERPT
  3. Brings up an interesting idea . Perhaps set the trigger at the level start where you could set the player already in crouch or prone . If during the exit then Id guess some time after "exit yes / no dialog" would be OK .
  4. Im just a hobbyist , I read these posts often and am happy to try and help if I think that I can . Theres a discord here in which I think the real experts gather .After re-reading what I wrote to you I see that I left out an important step which is after you chose the bitmap click the perform operation button , that applies the bitmap . Then you can save the level .
  5. Sry I have no idea what Teamview is . This is the process that I think should work . 1 Make sure you have the folder . common/editor/heightscripts/ . If you dont have it then create the heightscripts folder there . I think that the editor looks there by default some way , by scripting or in the engine source code . 2. Place the heightmap in the heightscripts folder . 3. Start a mission , Click on "window' , choose terrain terraform editor . 4. Click the operations tab , choose bitmap . It should show the file in a list . Once youve done that it and saved the level it should save the info to the .trn file which will be given the same name
  6. Are you asking about using a height map other than one created in the editor ? Or are you having trouble using the editor ? If its made in a different program then its possibly in the wrong format . I could be wrong but its like a 16bit JPG or something . If your not finding the right one that you've saved in the editor then your just probably pointing to the wrong one in the MIS file .
  7. this is a somewhat similar thread on these forums by Steve YorkshireRifles https://forums.torque3d.org/viewtopic.php?f=23&t=1392&p=10388#p10388
  8. this is in the scripts/server/projectile .cs file , dealing with the projectile collision . I think youll find the $typemask of interest . The radiusDamage file in the same folder also has good stuff to check out . Maybe it'll help , just get what info that you need from the %col (the object that the projectile is colliding with) variable . This is just an example to study . function ProjectileData::onCollision(%data, %proj, %col, %fade, %pos, %normal) { //echo("ProjectileData::onCollision("@%data.getName()@", "@%proj@", "@%col.getClassName()@", "@%fade@", "@%pos@", "@%normal@")"); // Apply damage to the object all shape base objects if (%data.directDamage > 0) { if (%col.getType() & ($TypeMasks::ShapeBaseObjectType)) %col.damage(%proj, %pos, %data.directDamage, %data.damageType); } } function ProjectileData::onExplode(%data, %proj, %position, %mod) { //echo("ProjectileData::onExplode("@%data.getName()@", "@%proj@", "@%position@", "@%mod@")"); // Damage objects within the projectiles damage radius if (%data.damageRadius > 0) radiusDamage(%proj, %position, %data.damageRadius, %data.radiusDamage, %data.damageType, %data.areaImpulse); }
  9. using $mvTriggercount4++ , placing the character in prone , if you use the getControlObject().getPose() , or the like , will return " prone " but , if while in prone you also set $mvTriggercount2++ , your character begins jumping and the pose will be "standing" and after another $mvTriggercount2++ (stop jump) will return to "prone" . So . I guess that while prone + jumping that an upPose would not result in crouch yet , a downpose should result in crouch . anybody got change for 2 cents ? Sir_Skurpsalot , I don't know if you can pass arguments to those key bind functions other than the one for %val . I see in the demo that some gamepad binds use "if" statements with serverConnection methods , but I don't have one , and I haven't messed with them . But i cant get serverconnection.getID() so , IDK .
  10. A couple of things today that I think you'll like or maybe someone will find interesting . Im not sure of the usefulness as my understanding of the lower knowledge of inner-working may lend it all to naught . So , first thing is taking the Torque3D soldier approach for the animations . I export a character model to a folder . This DAE file contains the armature , mesh , materials and T-Pose . no additional sequences . example ; export to art/shapes/actors/MyNewCharacter After that export a DAE with only the armature , animations and all actions , to wherever , such as art/shapes/actors/myNewCharacter/myNewCharacter_anims . You can then add the sequences to your meshed model from the other file . these are the files I used . this one is for the meshed model with only the tstance . You can see where it adds sequences from the other file . And shows my breakthrough with the groundSpeed method which is explained below , singleton TSShapeConstructor(frozen_character_BigS_tstanceCDAE) { baseShape = "./frozen_character_BigS_tstanceC.DAE"; loadLights = "0"; unit = "1.0"; upAxis = "DEFAULT"; lodType = "TrailingNumber"; ignoreNodeScale = "0"; adjustCenter = "0"; adjustFloor = "0"; forceUpdateMaterials = "0"; }; function frozen_character_bigS_tstanceCDAE::onLoad(%this) { %this.addSequence("./BigS_anims/frozen_character_bigS_poseLib.DAE back", "back", "0", "-1", "1", "0"); %this.addSequence("./BigS_anims/frozen_character_bigS_poseLib.DAE root", "root", "0", "-1", "1", "0"); %this.addSequence("./BigS_anims/frozen_character_bigS_poseLib.DAE run", "run", "1", "-1", "1", "0"); %this.addSequence("./BigS_anims/frozen_character_bigS_poseLib.DAE side", "side", "0", "-1", "1", "0"); %this.setSequenceGroundSpeed("back", "0 -1.5 0"); %this.setSequenceGroundSpeed("root", "0 0 0"); %this.setSequenceGroundSpeed("run", "0 2.7 0"); %this.setSequenceGroundSpeed("side", "3 0 0"); this one imports the file with the actions in it . There are a few more actions in the file and I only used these few to test it . singleton TSShapeConstructor(frozen_character_BigS_poseLibDAE) { baseShape = "./frozen_character_BigS_poseLib.DAE"; loadLights = "0"; unit = "1.0"; upAxis = "DEFAULT"; lodType = "TrailingNumber"; ignoreNodeScale = "0"; adjustCenter = "0"; adjustFloor = "0"; forceUpdateMaterials = "0"; }; function frozen_character_bigS_poseLibDAE::onLoad(%this) { %this.setsequenceCyclic("ambient", "false"); %this.setsequencecyclic("back", "true"); %this.setsequencecyclic("root", "true"); %this.setsequencecyclic("rUN", "true"); %this.setsequencecyclic("side", "true"); } This worked great from the start but , I continued having problems with setGroundSpeed . Finally I tried something that so far has worked . You can see it in the file with the setGroundSpeed commands . for "back" the Y is a negative number , for "run" Y is a positive number , for side the X is used , assuming that they are X,Y,Z , i really dont know :? . Anyway , seems to be working fine .+ for what its worth , Im not a pro so this isnt professional and is subject to improvment . thanks
  11. the only advantage i might see would be in a slightly simpler creation process where adding sequences to a timeline , adding and naming markers would be eliminated . Also , today I did the export new again with the proper names . All of the animations ran straight from the first import however all of the sequences looping had to be set . this is the resulting file . And editing the file causes the sequences to get mixed up , backwards in reverse for forward. and even forward for side > IDK . This works fine function frozen_character_BigS_tstanceCDAE::onLoad(%this) { echo("\c2TSSHAPECONSTRUCTOR ID = " @ %this);,-this is edited in and doesnt cause any problem %this.setSequenceCyclic("Crouch_Forward", "1"); %this.setSequenceCyclic("crouch_Root", "1"); %this.setSequenceCyclic("prone_Root", "1"); %this.setSequenceCyclic("root", "1"); %this.setSequenceCyclic("Run", "1"); %this.setSequenceCyclic("Side", "1"); %this.setSequenceCyclic("sitting", "1"); } This is after editing the 2 lines in forward key causes Back in reverse in a forward direction and side keys are using forward in a sideways direction . ??? function frozen_character_BigS_tstanceCDAE::onLoad(%this) { echo("\c2TSSHAPECONSTRUCTOR ID = " @ %this); %this.setsequencegroundSpeed("run", "-1 0 0", "0 0 0");<--------these get added and the animations get mixed up %this.setsequencegroundSpeed("side", " 0 -0.3 0", "0 0 0");<---- %this.setSequenceCyclic("Crouch_Forward", "1"); %this.setSequenceCyclic("crouch_Root", "1"); %this.setSequenceCyclic("prone_Root", "1"); %this.setSequenceCyclic("root", "1"); %this.setSequenceCyclic("Run", "1"); %this.setSequenceCyclic("Side", "1"); %this.setSequenceCyclic("sitting", "1"); }
  12. Duion - before I retartget a BVH file , I set the model to a T-pose using a T-pose action I saved earlier . then clear the action field . Re-targeting a file will create a new action in the stack . youll have to save the blend file in order to save any new actions . export with the options "Export Animations" and "All Actions" checked I cleared out the characters folder in order to show the process start to finish . This is just after the export . I exported to the characters folder in Torque3D I already have a spawn sphere for this character and this is the first import .It shows the crouch position which is one of the first sequences listed in the shape editor . The character stays in this static pose throughout all of the movements .Nevermind the mess , Duion , some sorta city scape This is the first look at the model in the shape editor . It shows that all of the actions have been imported from the DAE file. I exited without changes and nothing was saved to the CS file . restarted in a different level . Nothing has changed then I made changes to all of the sequences . The names that Torque3D engine uses , the loop box and priority then save the changes one at a time . Check to be sure that the name has changed , if you type in a name then do other things like check a box the name will revert to its original . after going through and saving them all in the shape editor , I leave the level , start a new level and they are ready for action!. :) . root run and since this was all done froma fresh start it all works nicely , now some ground speed changes are necessary ,,, TO BE CONTINUED Thank you for your files as examples Duion , I used to make animations for TGE and I remember the timeline method and Im learning what I can about the Torque3D method .
  13. !NEW DEVELOPEMENT! So, I have a little to add to this today . After I edit the models CS file , with setSequenceGroundSpeed , problems occurred as before , with very mixed up movement sequences . If I remove the edited line things return to normal . It looks as if Ill need delete the DTS again and do everything at once in the shape editor . I think that seems a bit odd and I am wondering what could be going wrong with editing the CS file . Heres the file , as you see all i had to to was REM out the new line for it to work properly again . If I un-REM it things become mixed up again . function frozen_character_BigS_tstanceCDAE::onLoad(%this) { %this.setNodeTransform("mount0", "-0.771502 0.0319379 1.43147 -0.548273 0.534602 -0.643116 1.99253", "1"); %this.setSequenceCyclic("FrozbigS_CrouchF", "1"); %this.renameSequence("FrozbigS_CrouchF", "crouch_forward"); %this.setSequenceGroundSpeed("crouch_forward", "1 1 1", "0 0 0"); %this.setSequenceCyclic("FrozbigS_CrouchR", "1"); %this.renameSequence("FrozbigS_CrouchR", "crouch_root"); %this.renameSequence("Frozbigsroot01", "root"); %this.setSequenceCyclic("root", "1"); %this.setSequenceCyclic("FrozbigS_walk2", "1"); %this.renameSequence("FrozbigS_walk2", "__backup__FrozbigS_walk2_1"); %this.addSequence("__backup__FrozbigS_walk2_1", "run", "1", "43", "1", "0"); %this.setSequenceCyclic("Frozbigs_side", "1"); %this.setSequencePriority("Frozbigs_side", "1"); %this.renameSequence("Frozbigs_side", "side"); %this.setSequenceGroundSpeed("SIDE", "0.2 0 0", "0 0 0"); %this.setSequenceCyclic("FrozbigSback_01", "1"); %this.renameSequence("FrozbigSback_01", "back"); %this.renameSequence("Frozproneroot", "prone_root"); %this.setSequenceCyclic("prone_root", "1"); %this.renameSequence("Frozsitting_01", "sitting"); %this.setSequenceCyclic("sitting", "1"); %this.removeSequence("__backup__FrozbigS_walk2_1"); // %this.setSequenceGroundSpeed("run", "0.5 0 0", "0 0 0"); }
  14. GEE WIZ , I deleted the .CS and and .DTS . Then reloaded The model , re-did the sequence set-ups and everything works perfectly . here's a copy of the new CS file . I added the setSequenceGroundSpeed though . So I guess its more like "SOLVED SORTA" I dont know what the problem was but re-loading worked this time . Come to think of it , Its worked before ! :o majic? function frozen_character_BigS_tstanceCDAE::onLoad(%this) { %this.setNodeTransform("mount0", "-0.771502 0.0319379 1.43147 -0.548273 0.534602 -0.643116 1.99253", "1"); //just pasted this from the old one %this.setSequenceCyclic("FrozbigS_CrouchF", "1"); %this.renameSequence("FrozbigS_CrouchF", "crouch_forward"); %this.setSequenceGroundSpeed("crouch_forward", "1 1 1", "0 0 0") ;//added this %this.setSequenceCyclic("FrozbigS_CrouchR", "1"); %this.renameSequence("FrozbigS_CrouchR", "crouch_root"); %this.renameSequence("Frozbigsroot01", "root"); %this.setSequenceCyclic("root", "1"); %this.setSequenceCyclic("FrozbigS_walk2", "1"); %this.renameSequence("FrozbigS_walk2", "__backup__FrozbigS_walk2_1"); %this.addSequence("__backup__FrozbigS_walk2_1", "run", "1", "43", "1", "0"); %this.setSequenceCyclic("Frozbigs_side", "1"); %this.setSequencePriority("Frozbigs_side", "1"); %this.renameSequence("Frozbigs_side", "side"); %this.setSequenceCyclic("FrozbigSback_01", "1"); %this.renameSequence("FrozbigSback_01", "back"); %this.renameSequence("Frozproneroot", "prone_root"); %this.setSequenceCyclic("prone_root", "1"); %this.renameSequence("Frozsitting_01", "sitting"); %this.setSequenceCyclic("sitting", "1"); %this.removeSequence("__backup__FrozbigS_walk2_1"); }
  15. "back " is doing what its supposed to do for backward movement , but , torque is using the "back" sequence for forward movement instead of the previously added "run" animation . Also the combination of forward key plus right side key is the only thing which uses the "run" sequence , a forward animation
  16. UPDATE So today , after I'd added "side" , the side animations are right , however , still forward is "back " in reverse and forward + right = "run" moving in a forward right diagonal as if a strafe sequence might be expected but , none are mentioned in the documentation Ive looked at , so far . All animations I have so far are these , in this order in the models CS file saved from the shape editor , in fact heres a copy of it so far in TorqueScript syntax , no less function frozen_character_BigS_tstanceCDAE::onLoad(%this) { %this.setSequenceCyclic("FrozbigS_walk2", "1"); %this.renameSequence("FrozbigS_walk2", "__backup__FrozbigS_walk2_1"); %this.addSequence("__backup__FrozbigS_walk2_1", "run", "1", "43", "1", "0"); %this.setSequencePriority("run", "1"); %this.setSequenceCyclic("Frozbigsroot01", "1"); %this.renameSequence("Frozbigsroot01", "__backup__Frozbigsroot01_1"); %this.addSequence("__backup__Frozbigsroot01_1", "root", "0", "150", "1", "0"); %this.removeSequence("__backup__FrozbigS_walk2_1"); %this.removeSequence("__backup__Frozbigsroot01_1"); %this.setSequencePriority("root", "1"); %this.setSequenceGroundSpeed("run", "1 1 1", "0 0 0"); %this.setNodeTransform("mount0", "-0.771502 0.0319379 1.43147 -0.548273 0.534602 -0.643116 1.99253", "1"); %this.renameSequence("Frozsitting_01", "sitting"); %this.setSequenceCyclic("sitting", "1"); %this.setSequenceCyclic("FrozbigSback_01", "1"); %this.renameSequence("FrozbigSback_01", "back"); %this.setSequencePriority("back", "2"); %this.setSequencePriority("sitting", "1"); %this.setSequenceCyclic("FrozbigS_CrouchR", "1"); %this.renameSequence("FrozbigS_CrouchR", "crouch_root"); %this.renameSequence("FrozbigS_CrouchF", "crouch_forward"); %this.setSequenceCyclic("crouch_forward", "1"); %this.setSequenceCyclic("Frozproneroot", "1"); %this.renameSequence("Frozproneroot", "prone_root"); %this.setSequenceCyclic("Frozbigs_side", "1"); %this.renameSequence("Frozbigs_side", "side"); %this.setSequencePriority("prone_Root", "1"); } So , if I need mention , I'm not following any any special pattern for adding things here and I screw up , forgetting to rename or set the priority ,etc then have to redo things . The first couple of animations that you see ,the shape editor made backup copies of the sequences , perhaps due to changing the in and/or out frame and adds the frame numbers and padRot and PadTrans values while the animations after are simply renamed with the other values omitted . I hope I haven't bored or annoyed or wasted any ones time , often times my problem is some minute error on my part ..Sooo , Preesh (<-an English colloquial meaning Thanks..
  17. UPDATE the side left and right movement is using the run sequence . while pressing the forward and right keys the model is using the run sequence , While pressing forward and Left keys together the model uses the back sequence .. I'm in the process of adding animations . I noticed the "forward + side" thing after adding a crouch forward that didn't work correctly , I removed the crouch root , added crouch which worked fine then afterward re-added the crouch forward . After that crouch and crouch_forward worked fine . My workflow with this is rather quick now so Ill add more animations and see if its some sort of dependency issue . for anyone interested , its a BVH Hacker with CMU Hahne MOCAP files , Make Human , Blender ,Torque3d 3.9 workflow .
  18. Ive made this new character , I export all actions from blender , set them up using the shape editor in version 3.9 . Its been working great except for a problem I'm having with the run and back sequences . It worked fine before I added the back animation and was using "run" in reverse for backward movement . After adding back animation it wants to use "back" , in reverse , for forward movement . Both are priority 1 . So far the model has , root , run , back sitting and a t-pose , all are set to priority 1 .. These sequences aren't on a single ambient track with markers , Torque just imports the actions from the DAE . Its a BVH rig and mocap animations but I don't think that really matters .
  19. This is strange as it only is happening in 1 of my levels in 3.9 , so far , in other level that are using the same terrain textures this situation doesnt occur . The player is prone , looking down , when the player looks up it rises above the decal .
  20. Excuse me Bloodknight , I think what I meant to say is , not that many versions back . The problems mentioned above appear in 3.10 too . That is to say if you would see them as problems and not just limitations and I thank you for your suggestions .
  21. Im sorry Duion , yes it isnt glass but it is transparent , a transparent energy field and there is no compromise . as for the splash or foam textures I guess they must be transparent as well . seems the only resolution at the moment is no underwater action in close proximity to transparent objects , but what about other crafts with widows or glass or windows and glass!?? But really I know this version is getting old , Im not really concerned .
  22. maybe I spoke too soon . I just tried to to duplicate the problem and couldnt . I didnt really try many things , I was trying to make some fake specular like highlights . i used thresh hold and levels in gimp trying to isolate some highs to use for the macro map . I dont recall doing anything at all with alpha or transparency though . Maybe it sort of hiccuped as my technisc proved to be intolerable ? the 512s Ive used today have looked great . I feel kind of as someone who has made a false accusation . sorry
  23. I played with the transparency settings in the material editor with no beneficial results , I tried making a couple images using more grey , jpeg and png no benifit . so I dont know .
  24. what you said made me think Duion , I did another using 512 and I couldnt see any problem ?? none , it looked great to me / I still dont know whats up with that 1 though .
  25. seems a lot of things are attainable through scripting I would agree if I could , but nice smooth interaction with water seems standardand equipment these days , maybe Im wrong , and since 3.9 , which is the version Im using , isnt very many updates back Id be concerned for the status of such matters as these .Dont get me wrong , for the money's worth Im certainly not complaining . but is there some issue with transparency here . Is it still a problem ? this is a walkway using transparency , more than a hundred meters away SunFlare player showing through the splash image player showing through the splash images and specular this is straight down and looks good to me however a view straight ahead from the player is ver clear for tens of meters as seen in the first couple of images .
  • Create New...