Jump to content

xetra11

Members
  • Posts

    12
  • Joined

  • Last visited

xetra11's Achievements

  1. Hey guys! The doc of GuiTreeViewCtrl tells me that there is a way to insert a SimGroup / SimSet as the tree for the whole. Where its been written down -> http://torque-3d.readthedocs.io/en/latest/script/class/GuiTreeViewCtrl.html There is a function "open" which is described as So what I now did is created a SimXmlDocument and parsed in a XML File. This works fine. But when I want to open this file with this function: Things go wrong? Thats because it awaits a SimSet as first param - but the SimXmlDocument is a SimObject...so what to do now? Is there a factory function to create a SimGroup/Set out of that? Charlie
  2. The code: http://hastebin.com/fivudaraje.coffee When trying to run this script - the program crashes. When I ommit the inserting to the 9th child element it works fine. That tells me - that adding new subitem only works on the last created child to the root node. Is that expected behavior and I just missed to realise it? But how can I add a subitem to, let say, the 5th root element or the 9th like in the example? Please give me a hint what I'm missing here! greets Charlie!
  3. Thanks to the guys in the chat XmlEditorGui.buildVisibleTree(1); was needed to actually force a redraw of the tree! thanks!
  4. Hey guys, I just played around a bit with Gui Controls and now used the "GuiTreeViewCtrl" which seems best for my XML Editor GUI I try to create. Using this Container Control was okay while adding buttons and Text Labels (Controls). But when I call the API of the GuiTreeViewCtrl for inserting an item XmlEditorGui.insertItem(0, "FirstItem", "100"); The item gets inserted which I evaluated with some echoes and calling "getItemValue(1)" function but I do not see any elements in the Gui itself like the adding of buttons etc did. I'm sure I'm missing something here. Can you guys tell me what little trick I need to do to actually see that tree structure? EDIT: I thought about hooking onto the event for adding an item and then dynamically add a GuiTextCtrl with the values of that added field - but I could not find an event for the adding of an item, only one for removing. Greets Charlie!
  5. Thanks a ton for those tips!
  6. Hello Peoples! I need to create a XMLEditor within T3D and visualize it with a GUI and make it functional there as well. Therefore I need some informations regarding the backend library "tinyxml" which is already available and how to get backend logic into the scripts. My prerequisite is the "Coin Collection Tutorial" which gave me a good, crude understanding in how the Script and GUI works. In fact I just want to ask if it is trivial to accomplish following specifications: - Load an xml file out of the project folder - visualize it in a tree dom within the GUI - manipulate those tree nodes - and save it as a new XML / update the old XML afterwards I would appreciate any guidance you guys can give me to have a quicker start, since I only have 2 weeks left for that task. EDIT: To make things clear - I don't need a guide how to use the api of tinyxml or streams in c++ etc. I more need a entry point on where to add a new class to create my api and how to connect it to the gui scripts greets Charlie! 8-)
  7. Ok thanks for the help. Hope I could help out to strengthen the tutorial that way ;)
  8. I changed that to 180 as I read the log by myself - I really need to read logs more frequently ^^ But I cannot fix that bug: core/art/datablocks/CoinDatablock.cs (0): Unable to find parent object DefaultEmitterNodeData for ParticleEmitterNodeData. Because its what the tutorial tells me - I don't know what to replace it with then, even autocomplete in torsion tell me to use DefaultEmitterNodeData
  9. Nah I'm running on Windowns hasebin: http://hastebin.com/imapitilaq.vhdl
  10. Heya yea its pretty good! // Common Marker's exec("./markers.cs"); exec("./defaultparticle.cs"); exec("./CoinDatablock.cs"); Here I added the exectionn statement
  11. I'm going through the Coin Collector Tutorial Project and it went pretty fluent until some issue I come over now. The tutorial tells me to add the following code within the collision callback to spawn an emitter-node Coins.cs: function Coin::onCollision(%this, %obj, %col, %vec, %len) { %emitterNode = new ParticleEmitterNode(){ datablock = CoinNode; emitter = CoinEmitter; position = %obj.getPosition(); }; %obj.delete(); $CoinsFound++; if(Coins.getCount() <= 0) { commandToClient(%col.client,'ShowVictory',$CoinsF[/code]ound); } } CoinDataBlock.cs: datablock ParticleData(CoinParticle : DefaultParticle){ lifetimeMS = 1000; gravityCoefficient = 0; dragCoefficient = "2"; sizes[0] = 1; sizes[1] = 1; sizes[2] = 1; sizes[3] = 1; inheritedVelFactor = "0"; }; datablock ParticleEmitterData(CoinEmitter : DefaultEmitter){ particles = CoinParticle; ejectionPeriodMS = "10"; ejectionVelocity = "4.167"; ejectionOffset = "0.625"; thetaMax = "360"; softnessDistance = "1"; lifetimeMS = "200"; }; datablock ParticleEmitterNodeData(CoinNode : DefaultEmitterNodeData){ timeMultiple = 1.0; }; Following error occurs now when I run into a "Coin": Does anyone know what typo or semantically wrong situation I have here? Thanks in advance!
×
×
  • Create New...