Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by Sir_Skurpsalot

  1. Never did that one. Didn't realize echo is supposed to take a second argument until just now... might have to find it in the source code to see how the second argument really works, tutorial must be outdated. To get Hello World3 in a similar fashion I would type echo("Hello World"@3); @ concates strings I "hacked" it by doing echo("Hello World", "3"); :p It worked, but I don't think I've actually solved anything. :lol: Seems putting a number directly into echo() makes it print twice unless you pre-convert it to a string with "" or another string operator.... weird. I've used echo to print tons of numbers from variables and never ran into this though.
  2. Never did that one. Didn't realize echo is supposed to take a second argument until just now... might have to find it in the source code to see how the second argument really works, tutorial must be outdated. To get Hello World3 in a similar fashion I would type echo("Hello World"@3); @ concates strings
  3. That works... I reference this site a lot: https://torque-3d.readthedocs.io/en/latest/script/languageref.html
  4. Going to Color --> Levels and moving the middle triangle slider in input levels to the tallest part of the graph and clicking ok, and repeating 2 more times, then changing the output levels to min 108 max 148 seems to work pretty well.
  5. Does anyone have a method (doable in GIMP) for preparing a texture to be used as a terrain detail texture? Trying to find a method for consistently and accurately centering an image's color levels around 128 that I can repeat for each of my textures. Thanks for reading.
  6. Putting the finishing touches on a tree model and am following the wind effects tutorial from the art primer. I have been applying one vertex color at a time and then testing and red and green values work as they are supposed to, but upon adding blue values to my vertex colors to get the leaf flutter effect it causes the faces the vertex is connected to to separate.... anything I could try? I have made sure in blender that there are not duplicate vertices.
  7. Figured it out.. apparently simply not having the png within the torque directory structure makes it fail.
  8. How to successfully get a terrain heightmap from GIMP 2.10.20 into Torque? I keep getting the error "Heightmap failed to load!" when I try. Size 1024 x 1024, mode is set to grayscale, precision is set to 16 bit integer / linear light, tried in png and bmp format. I am not attempting to load any texture maps yet along with the heightmap. What am I missing here?
  9. Been messing with these a lot today and the AI does not seem to be able to choose the correct one based on the direction of the threat... even though the source code shows that the angle is what they are scored by first. Also, do the peek left / right/ over properties actually effect anything?
  10. Looked at the source code and figured it out.... you have to use setPathDestination() instead of setMoveDestination() and then he uses the navmesh and finds his way there. I guess the navPath object is pretty pointless.
  11. If I try to tell my bot to just move directly to a location he just runs into a mountain and does not navigate.... is there something I am forgetting in order to get the bot to acknowledge the NavMesh? Because in the navigation editor if I spawn the test bot and click around at various points that one works great.
  12. Trying to learn to use navmesh and navpath, but I keep getting this error. "No NavMesh polygon near visit point (105.3, 88.7, 513.094) of NavPath 21142" There are indeed blue navmesh polygons around it according to the editor. This is all that is needed to create a navpath from script right? [code2=BBCODE40_TORQUESCRIPT ]%navPath1 = new NavPath() { mesh = Nav; from = %demoAI.getPosition(); to = NavTest.getPosition(); }; %navPath1.plan();[/code2]
  13. Your second solution applies to what I was talking about, and after much experimentation today seems to be the only way to reset the players animation back to a root pose after playing a non-blend sequence set by stateShapeSequence.... thanks
  14. If playing a non-blended sequence on a player called from a weapon image's stateShapeSequence, is there any good method to stop it and return to the normal engine-selected looping pose animations? They seem to just stay stuck on the last frame.
  15. It's a good function. You always have to bitch, don't you?
  16. Stopping glitches / exploits is pretty simple. I have a function called "DeniedStateCheck" that I use for many things, including reloads, to lock out certain behaviors like switching weapons in the middle of reloading for example. Basically it gets the player's weapon image state, loops through an array of state names to see if the name matches any of the denied state names, and then returns a 1 or 0. As in your example, if the player requests to change weapons and the current image state name matches "CombatReload" or "TacReload", the loop will return 0 to the changing weapon function that called it and the request will be denied. Otherwise, it returns a 1 and the request proceeds. It is a very useful function. My function currently looks like this: function deniedStateCheck(%player) { %stateName = %player.getImageState(0); %deniedState[0] = "FireBranch"; %deniedState[1] = "Fire"; %deniedState[2] = "AimFire"; %deniedState[3] = "CombatReload"; %deniedState[4] = "TacReload"; %deniedState[5] = "ToKneeling"; %deniedState[6] = "ToProne"; %deniedState[7] = "Activate"; %deniedState[8] = "Release"; %deniedState[9] = "Draw"; %deniedState[10] = "NoDraw"; for(%i = 0; %i < 11; %i++) { if (%stateName $= %deniedState[%i]) { echo("Denied State: " @ %stateName); return 0; } } return 1; }
  17. engine/source/t3d/player.cpp is where you will find the footprint stuff, around line 3949. Those are some good points you bring up about animation triggers and looping animations. I am more interested in them for one shot action animations. My application that caused me to look into this was I wanted to use an animation trigger to create an empty mag "debris" object that would be created at a certain frame in a reload animation. Since I can't do that I just scheduled a function that does that with a delay in the weapon's reload state instead, but being able to use an animation trigger would have been nice because it takes the trial and error out of getting the timing right. I could see them being useful for knife/melee attack or grenade throwing as well in, where you want something to occur midway in an animation and not right at the beginning.
  18. "there can be up to 30 independent trigger states each with their respective on (1 to 30) and off (-1 to -30) states. You decide what each of those trigger states means" But it seems states 1 and 2 are hard coded for footprints and you can't actually define any other states yourself. I was wanting to know if it was possible to actually define more states as the documentation says and have triggers that can do anything, not just make footprints/dust.
  19. Are animation triggers set by TSShapeConstructor not actually fully implemented contrary to this documentation https://torque-3d.readthedocs.io/en/latest/artist/playercharacter.html?highlight=trigger This post from 2015 seems to suggest so : https://forums.torque3d.org/viewtopic.php?f=12&t=156&p=1712&hilit=animation+trigger#p1712 is this outdated or can you now actually define these supposedly available 30 triggers somewhere?
  20. Ok cool, I'll have to try compiling that branch.
  21. So does the soundAmbience property for a waterplane not actually work? I selected AudioAmbienceUnderwater and nothing sounds any different...
  22. Yeah I use Jedit and can do mass search-in-files with that but didn't realize at the time I needed to be looking in .gui files also.... now I know
  23. Found them. Opened up the gui file itself in a text editor and found the functions hidden at the bottom of the gui file itself... could they really not be bothered to put them in a cs file?!?? Only wasted like 4 hours on this today
  • Create New...