Jump to content


  • Posts

  • Joined

  • Last visited

Everything posted by irei1as

  1. Let's say I have a set of variables I want to save for later called "$score::XXX" (XXX being different variables). For saving that data I'm doing right now: export("$score*","score"); //create uncompiled score file compile("./score",true); //create compiled score.dso fileDelete("./score"); //deletes the intermediate uncompiled file And then when I restart the game and I want to load the scores I do: (pseudocode) if(isFile("score.dso")) exec("score.dso"); else save not found, show warning can't load; ... but I'm not very comfortable with having to use fileDelete and intermediate uncompiled files. Is there any way to directly use export() towards a compiled dso? Or better, is there a resource about saving and loading data files? I'm not having luck with google.
  2. Thanks for the tip. It's good to know. And the idea of setting the schedule first sounds quite sweet. Now I wonder if the error is related to http://forums.torque3d.org/viewtopic.php?t=12 . I'll have to check.
  3. This TorqueScript code: function serverCmdorbitCam(%client) { %client.setFirstPerson(false); %client.setCameraObject(%client.camera); %client.setControlObject(%client.camera); //just in case %client.camera.setOrbitObject(%client.player, "0 0 " @ -mDegToRad(90), 15, 25, 25, false, "0 0 1", true); %client.setControlObject(%client.player); } fails setting the camera with the correct angle. While: function serverCmdorbitCam(%client) { %client.setFirstPerson(false); %client.setCameraObject(%client.camera); %client.setControlObject(%client.camera); //just in case %client.camera.setOrbitObject(%client.player, "0 0 " @ -mDegToRad(90), 15, 25, 25, false, "0 0 1", true); schedule(0, 0, commandToServer,'ctrlobj'); } function serverCmdctrlobj(%client) { %client.setControlObject(%client.player); } works correctly. (Note: using commandToServer('orbitCam'); just before the closing "}" of GameConnection::onClientEnterGame(%this) inside game.cs) Well, can I change a non-player camera -OrbitObject this case- without having to rely on camera control? I guess I'm doing something wrong. Or, is it possible to make the camera change be instantaneous so I don't have to worry about the client losing the player control? If it's important: I'm using a very weak computer for this so if you tell me it works for you it may be just this low end machine. Sorry for the trouble.
  4. I'm checking that resource. I don't know how I missed it. Thanks a lot for pointing it. But I did a thing of my own at the end. I should have informed of that here, sorry. It works for easy things like echo variables so if you want to check it, the documentation I did is: http://pastebin.com/4z5jbspn http://pastebin.com/syssW88r (Sorry for the constant commenting with irei1as_ in the code. It was a keyword to find the changed lines. Feel free to delete those comments if you want to try it and they annoy you.) Err, well, it's the animation trigger thing plus something related to sprites I'm playing with. Feel free to ignore anything that says 'Sprite'. It works for TsStatic and normal shapebases (like the coin example) but I have to test it more with the special ones like the player and vehicles. Also it's not elegant at all. I wasn't able to make it work with DECLARE_CALLBACK() -it made me an error- so I forced a Con::executef(). But, well, in the chat I was told it was alright.
  5. With my old computer Project Manager 2.2 doesn't work. It's because the new VisualStudio suits (2012-2013) from where it is compiled(PM2.2 asks for MSVCR110.dll to work and that file is from those -adding that dll thows an error with FlsGetValue in Kernell32-) don't go very well with WindowsXP. But, well, WindowsXP isn't supported anymore so I won't cry much over it. And if it isn't a WindowsXP issue then it's a problem with the old graphics card and the newest qt. I just grabbed the source of PM2.2 from https://github.com/GarageGames/Torque3D-ProjectManager/releases/tag/v2.2-beta and compiled it myself with VS 2010 Express and the old qt 4.8.2 (I wasn't able to make it work with the newest qt5, probably because I did something wrong). I had to make a few changes in the code to compile correctly. Let me point them here for if anybody wants to do it themselves: Changed #include <QtWidget> with #include <QtGui>. And changed mSrcDirs.cbegin() mSrcDirs.cend() with mSrcDirs.begin() mSrcDirs.end() By the way, the README.md of that ProjectManager2.2 says to use qt 4.8.2 (that's why I've used it). But I suspect that's a mistake as the .dll provided are for qt5. Well, after that workaround I haven't found any issues with the engine. If anything, for me at least, audio goes $pref::SFX::device = "SFX Null Device"; as default from a new project unlike the 3.6 version that starts with a working audio channel. As personal opinion I'd rather the default audio to throw sound without having to change the game options first. But that's kind of a small issue as it's easy to change it manually.
  6. I liked the access to the code while still being full free -don't hit me yet- but that exclusivity kind of changed recently. I think I have choosen Torque because it's naked. I like the engine hidding nothing... even if that may be counterproductive as more freedom means you lose focus on basics -I come from old RPGMakers and I did nothing on those because I played with scripting too much-. But if you ignore the juicy core you can still play with the editors easily. With zero coding you can make a FPS but that's not unique right now, I think. Less frequent, 3D RPG, racing and RTS need just small pieces of code. If I'm not mistaken about its engine, there's "AX:EL", a game about plane dogfights. So, except for a lack of easy sprite work, Torque 3D can make a lot of genres potentially. Hmm, it's quite hard to sell Torque3D to other people compared to the other juggernaut engines.
  7. Unfortunately those are not related, even if they share the name. These are more key-frame markers than classical triggers. You can check these animation triggers in the shape editor->properties->Seq tab->at the bottom. The soldier shape from the Full template uses #1 and #2 to mark the aparition of the footsteps decals and dust inside the walking animations. "Trigger" is used a lot around some different objects inside Torque3D. Maybe the use of "trigger" to name this feature wasn't very lucky.
  8. In the full template so far I've only found a pair of animation triggers being used for the player footsteps. Its functionality is "hard coded" in the engine source in player.cpp. So, are those animation triggers only usable through C++? Is there any inconvenience for using a callback from tsThread.cpp (they start there, don't they?) to use torque script to define changes instead? I suspect there is an issue with client/server behaviour but as I only want to toy around with single player I hope that won't be a problem for now. If that's possible, I plan on sending to the .cs file the animated object name and the animation sequence name along with the animation trigger number so I can have more flexibility. So, for example, the trigger#3 of limping_animation of peasant_object -result: damage to the peasant each time the foot touches gound- can give a different result that another trigger#3 but for long_shot of cannon_n3 -result: if bullet>0 make some blast far away-. This way I don't need to change the small number of animation triggers (30 for each animation sequence is more than enough). My second question, is that too complex and inconvenient? Should I just stick with classic conditionals and timed intervals and leave animation triggers alone? Thanks for your help. There is almost no documentation for animation triggers around (or it's very hard to find because trigger is too common of a name) so any input on this subject is welcome.
  9. irei1as

    About localization

    The default manual of Torquescript for "Localization" mentions the use of a tool for compiling the language files called langc. But it seems that file isn't included anymore. The first search with google for a fix shows this 2010 thread: https://www.garagegames.com/community/forums/viewthread/114207 There, there is a change of the C++ code to use as substitute of langc. I guess -I haven't tested- the codified/open issue with the .lso files could be changed using them inside a zip with a password. It seemed to work but it's a fix of the code from over four years ago. Do you think anything should be changed or added or is it alright like this? Will any issue arise if the language files are too big (like the ones from a RPG or a VisualNovel)? Or should I use another way for localization? I wasn't able to find many support for that.
  • Create New...