Jump to content

SteveV

Members
  • Posts

    19
  • Joined

  • Last visited

Everything posted by SteveV

  1. This is how I tried to replicate my objects: 1. Create an entity (oildrum) 2. Add the CloneObject entity (just a cube to which I can attach a script) 3. Name the object to clone and the number of clones in the CloneObject parameters 4. Apply, and allow the script to clone away. The script that is triggered follows: function object:CloneMe() SourceObject = object.model:GetKey("ObjectName") found = 0 count = 0 for k,v in pairs(objecttable) do if SourceObject == GetEntityKey(v.model, "name") then found = 1 tempModel = v.model end end if found == 1 then for i = 1, object.model:GetKey("ObjectCount") do newObj=tempModel:Copy() newObj:Move(3,0) end else Notify("Failed to find object " .. SourceObject,1) end end end As you can see in the screenshot the extra oildrum is not "registered" in the list of scene entities. The other problem I have is that the copy works, but trying to move the copy fails - object not found. This could be a simple logic error, or related to the entity not existing in the system.
  2. I put this request in a while ago but i seem to have lost it. I'm still trying to work out if it's possible to programmatically add a road in the editor. I want to create a road several kilometres long with many nodes, and it would be great if I could start by scripting the placement of, for example, 20 nodes in a circle on the terrain. Any ideas anybody? I made an attempt earlier to replicate entities, but they never got saved. Maybe there is something I can do to register the entities/nodes in the saved world file?
  3. I don't think it would be possible based on my experiences of trying to update dialogue box scripts under "normal" circumstances. If you hit <CTRL>-<S> to save your script, it doesn't take effect in the editor. You have to take the file/save option from the menu. Based on this, I would assume there is something behind this that "activates" the new version of the script, and so you couldn't dynamically code new options.
  4. I found that if you use File | Save you don't need to restart. If you close the editor, and save when it asks as you exit, the new script is not loaded.
  5. I bought this for the family a couple of months ago (for homework etc), and it turned out to run Leadwerks very well too... http://www.acerdirect.co.uk/Acer_Aspire_5740G_Laptop_LX.PMF02.061/version.asp
  6. Hi all, is it correct that after editing the InitDialog() script I have to restart the editor? Specifically, if I add/remove/change custom properties. This is what I seem to have to do right now, even if I delete in-world entities and create new ones. I'm editing using the inbuilt script editor.
  7. I'm playing with LE so I can be more familiar with it when I write about it in the newsletter. I've only just made it to the world of Shader Model 4 (and like it so much I went and bought another graphics card for a second machine!). As my interest is in track-based projects (think racing, it's the closest description of what I'm dabbling with), I'm looking at getting some nice roads and some AI racers on it. A lot of what I do can be pre-processed, such as racing lines, so the realtime processing is about half a dozen racers getting around a track with some nice eye candy to spice it up.
  8. I managed to find out a lot of what I needed to know by watching the windmill video...
  9. You are not mistaken Thanks for all the replies, I'll be pondering them while I get to grips with Lua for the editor scripting.
  10. That's good to know. I went looking for associated scripts but couldn't find them, I need to look a little harder Maybe if I elaborate on my ideas, it might prompt some more discussion and ideas, I think it will be useful to many people. This is something I've done in DarkBASIC Professional, and would be fantastic if I can achieve it an editor thingoid. I call this concept Rails. It's nothing new, I'm sure lots of engines use them. The main rail is your road, track, river, whatever you need. It's made as a C-spline so it's very flexible. Each node has 2 handles which you drag around to form the path. Now you can start adding secondary rails, that run parallel to the primary one. The first could be used to contain walls, another for street lighting, and so on. As you fine tune your primary rail, each secondary rail repositions to suit the first. Does this make any sense? I'm talking about making a road/track system that is intelligent enough to simplify the design process. If anyone has manually laid down a road they'll know how powerful such a system would be to any terrain editor. I can possibly post some screen shots of the DBP prototype.
  11. This might get you started... http://bmp.thefloatingwidget.net/heightmaps/
  12. This is good, I'm not sure of the best way to do this, but I'm guessing I need to create some kind of dummy object (or thingoid?) with scripts attached. As long as there is some kind of hook that triggers (and I guess that's how it all works, I haven't got that far just yet) then I can adjust it's state (via a custom property window?) to perform various actions. Now I'm wondering if I can create new road nodes with a script, or if this part has to be done manually? Do thingoids exist yet, or is it still a concept?
  13. Hi all, I understand the concept of links, so I have a few road links, and I now have a few camera node links. Is there any other way to link other than dragging from one camera node to the next? I am unable to see the camera nodes at the same time, and therefore I can't link them. I've checked all of the properties, and there is nothing in there that helps me to make the link.
  14. Thank you for the response. Now C++ Express is free, I may just try it along with Leadwerks.
  15. Thanks for the response. I think I am asking for something a little different. I'd like to be able to run a script once to create a strip of road, and then end. It's not a continuously running script, just a one-off action.
  16. Hi All, is it possible to script the editor itself? To give you a specific example, I'd like to lay out road nodes programmatically, rather than lay them out one by one and adjust them manually. If the answer is yes you can, look at page x on the manual, then I'm happy with that. I'm trying to find my way around the many resources available. Thanks in advance.
  17. Hi all, I'm looking for some recommendations on which language you would recommend. My background is in programming, using VB.net and DBPro regularly, along with a number of other standard and proprietary languages. So coding techniques and standards isn't an issue, it's just a case of which one of the supported languages is easiest/most appropriate to get started with. Unfortunately 20 years of programming has never lead me to C/C++. Thanks in advance.
  18. Thanks for the quick reply. I found the info on creating links and experimented. I need to experiment a little more, I think I'm confusing myself over which section of the road belongs to which node. It's no surprise, I have a road editor in the application I wrote myself, and still forget which is which! Thanks again.
  19. Hi all, I'm playing with LE to see what can be achieved. Right now I'm creating roads, and have hit a slight problem. I'm adding road nodes one by one, which is nice and easy. I deleted a node - the last one I dropped onto the terrain - and then created a new one. The road is now disconnected at his point and I can't work out how to reconnect it. I've used the rebuild road option, and also browsed through the node properties but I can't get around the problem. You can see in the screen shot the missing link and also that my node numbering highlights where I made the delete. Any ideas? Thanks in advance.
×
×
  • Create New...