Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Sir_Skurpsalot

  1. Where is the script/functions that are used by joinServerDlg.gui?? I can't find them anywhere for some reason.
  2. I'm in the process of re-doing the options gui and while I've been able to figure out how 90% of it works but I cannot find where the sim groups that contain the graphics quality preference level array objects that are used in scripts/gui/optionsGui.cs are defined. I am talking about MeshQualityGroup, TextureQualityGroup,LightingQualityGroup,and ShaderQualityGroup. I've searched a ton of the scripts and have yet to find out where these are defined. I don't necessarily want to change them it just bothers me that I can't find them. Anyone know?
  3. figured it out, neverImport only works if the model is already under the node limit. Just have to exclude bones on export instead.
  4. So I modified one of my models and now it is over the 70 node limit and won't import, so I'm trying to use TSShapeConstructor::neverImport to get it to ignore some nodes so it will import but it does not seem to work. I added it to the singleton declaration at the beginning of my model's cs file, but torque still crashes and gives me the "Too many bones are here" error when I try to import the model. singleton TSShapeConstructor(Player1DAE) { baseShape = "./Player1.dae"; loadLights = "0"; neverImport = "IK*"; }; Is there any reason this shouldn't work?
  5. Fixed it. If I have the raycast scanning function that is looping on a schedule call an outside serverCmd function that sets the imageGenericTrigger, it works like a charm.
  6. The intended outcome of all this is to have it when a teammate crosses your line of sight within a certain distance it triggers a transition to a weapon state where it shows your character taking their muzzle offline so as to not flag them. I'm using setImageGenericTrigger(0,3,true) to accomplish the transition. It would work if it would just not get set to false as soon as you press a key. Even just pressing shift causes it to break. It's really strange.
  7. Continuing on from my previous post, It seems that any trigger that is set on a weapon image that is called from a scheduled function does not stay applied upon input. What I mean is that I have a function that is shooting a raycast at regular intervals, making use of a schedule. When it hits a "friendly" it sets genericTrigger3 on the weapon image in slot 0 to true. If I stay looking at this object and touch any movement key the trigger sets itself to false. For debugging purposes I have removed anything from this function that returns the trigger to false, and it still happens. I tried using different genericTriggers and also setImageTarget instead and they all behave the same. If I write a simple function to toggle the generic trigger on and off with the press of a key it works fine as intended. There is something about the fact that it was called from a scheduled function that I think is making it not stay applied.
  8. My application is that I need to check for "friendlies" in the player's line of sight, I don't think it can be done without constant ray casting.
  9. How do I get started setting up functions that need to be done constantly at an interval? Other engines have update functions that run every frame, how is that sort of stuff done in Torque? Specifically I want to shoot a raycast from the player LOS constantly every so many milliseconds. Thanks for reading.
  10. I have not, but on here https://torque-3d.readthedocs.io/en/latest/script/class/ShapeBaseImageData.html?highlight=firstperson It says "set to true to render the image in first person". I guess a workaround might be to use an empty DAE as the shapefileFP to stop the third person model from rendering.
  11. Does setting firstperson = false not actually do anything in a ShapeBaseImageData datablock? This came up because I am mounting a ShapeBaseImage to the players chest to show your rifle as slung when it is not being used and you can still see it in first person view, which I don't want.
  12. I see, I was afraid that it was just really one camera... Yeah it's aiming related... I should be able to come up with something that just zooms/unzooms you upon toggling cameras then.. thanks.
  13. I noticed setFov changes the fov of both the first and third person cameras. Is there any way to independently change the fov of the first person camera? Thanks for reading.
  14. I wound up calling a function from disconnectedCleanup() in scripts/client/serverConnection.cs that does the trick.
  15. I noticed that If you exit a level while a trigger is applied, such as the crouch or prone trigger, and then reload it, the trigger is still applied. What would be the most appropriate place to begin in the scripts to release all triggers upon exiting a mission?
  16. So I figured some things out... there are both arrays and then ArrayObjects in Torque. arrays you can't really do much with except loop through I suppose. ArrayObjects which are declared like %testArray = new ArrayObject(); can use all those functions from the link I posted earlier.
  17. Having trouble using arrays like you do in other engines.... the documentation only seems to show how to declare and access specific indexes. trying to use any of the array methods on this page https://torque-3d.readthedocs.io/en/latest/script/class/ArrayObject.html gets me an "Unable to find object: ''" warning. How would I declare an array, and then use one of the functions on that page? I would like to be able to do something like this: %testArray = [2,1,6]; %testArray.sortD(); %testArray.echo(); and have it show [6,2,1] But things don't seem to work like that.
  18. So I've been working on my own script the past few days and I've got something I'm pretty happy with for now that adds about 60 lines to ProjectileData::onCollision in server/projectile.cs. It's pretty simple but you can set different "armor" ratings for objects and penetration ratings for projectiles, and max allowable thickness to penetrate. Does decals and dust "explosions" on both sides. Can penetrate multiple objects. Still uses projectiles. Have not tested it on players though, just TSStatic objects. That other resource, while appreciated, was many pages of C++ that I did not understand and I'd rather just do what I need and do it myself. @Caleb thanks that's what I needed to know, I'll be sticking with projectiles then.
  19. Thanks for the replies. I'm in the process of working on something based on my second idea which is progressing good so far and is actually pretty simple. One thing to ask before I continue down this route is: How reliable are fast moving projectiles in Torque3D? If you give them the muzzle velocities of real guns, does it have problems missing collisions? I've gotten a handle on how raycasts work in Torque, and am considering just having my guns shoot raycasts instead of projectile objects.
  20. I'm looking for a way to do bullet penetration. The way I've done it in other engines is basically: 1.Projectile (or raycast) hits object, gets variable (an armor rating) from object it collides with so it knows it can penetrate (no problem in Torque). 2.Get point of impact, spawn another projectile of same type at that point (again should be no problem) 3.Set projectile to ignore the previously collided with object and fire it off in the same direction the previous one was going. <--- this I do not know how to do in Torque This is the way I would like to do it, I don't need things to be as specific as getting materials and all that. Alternative idea is this: 2.Spawn a raycast a set short distance ahead of the impact point, and shoot it back towards the front impact point so it collides with the backside of the object. Ideally I would be able to set the raycast to ignore all collisions except for this specific object so I do not run into problems if objects are close together. 3.Spawn the duplicate projectile at that impact point with the same heading as the previous one and send it on it's way.
  21. Any method for making a projectile ignore a collision with a specific object? Looking through the scripts/script manual not finding any hints
  22. Azaezel - ok so return statements do not work with server functions is what you are saying? I found a way to do this without bothering with any server functions, just made a global variable to track pose without actually getting the pose. Any downside to doing it this way from a client-server relation perspective? $pose = "Standing"; function stanceDown(%val) { if (%val) { if($pose $= "Standing") { $mvTriggerCount3++; $pose = "Kneeling"; } else if ($pose $= "Kneeling") { $mvTriggerCount3++; $mvTriggerCount4++; $pose = "Prone"; } } } function stanceUp(%val) { if (%val) { if($pose $= "Kneeling") { $mvTriggerCount3++; $pose = "Standing"; } else if ($pose $= "Prone") { $mvTriggerCount4++; $mvTriggerCount3++; $pose = "Kneeling"; } } }
  • Create New...