Raul Posted March 23, 2010 Share Posted March 23, 2010 This is first time I used the editor in order to create a scene for myself and I have some questions: 1. I understand the "vegetation" does not have a physic model. So it's good to be used only for 3D grass, bushes, trees outside the "playing area", etc. 2. How to enable the wind effect which I can see in the editor? 3. How can I enable in my game the vegetation shadow? 4. I have added some trees (GMF files) on my map. If I enable the "Physics" I can see they have a physic model. In my game my character (which is made by a Controller) can simply walk through them. I also enabled the PhysicsDebug in the game and I can see the red lines.. 5. Is somewhere here a "tutorial" or anything like that regarding how to load and manipualte a SBX file? Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Canardia Posted March 23, 2010 Share Posted March 23, 2010 1. It will have in the next update. 2. There is no wind effect in editor. You can make wind by adding a force to all physics bodies. You can make it a simple function like DoWind() which loops through all physics bodies using ForEachEntityDo(..., ENTITY_BODY ). 3. http://www.leadwerks.com/wiki/index.php?title=Terrain#SetVegetationShadowMode 4. You need to assign a collision number to the trees, and tell the engine that this number collides with your player collision number (Commands needed: EntityType(), Collisions() ). 5. The best way to manipulate a sbx file is using Editor. The LoadScene() command loads a sbx file pretty well when you have the required engine folders in your project (entities, scripts). Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Raul Posted March 23, 2010 Author Share Posted March 23, 2010 Regarding point no.4: "You need to assign a collision number to the trees".. I assume I have to loops through all trees and set the EntityType to 2 lets say, but how can I do this? I need to use same technique to retrieve the terrain for no.3 I think. Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Canardia Posted March 23, 2010 Share Posted March 23, 2010 It's a bit complicated to get the terrain by default, you need to loop through all entites which are child of the loaded scene entity and search for an entitykey called "class"="Terrain". Gamelib does this automatically when you use game.scene.LoadMap(), and then you have the terrain entity in game.scene.terrain. To set the entitytype of all trees to 2, you just need to select all trees in Editor (root entity -> select all) and change their entitytype in the property box (it applies to all selected entities then). So it's just 7 mouseclicks (root entity -> select all, instance entity -> properties -> physics -> collision -> Apply) to change the entitytype for all models of the same class. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Raul Posted March 23, 2010 Author Share Posted March 23, 2010 I cant do it I have selected all the trees from the Scene Root and here I stop. How do I select "instance entity" I cannot understand that.. Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Canardia Posted March 23, 2010 Share Posted March 23, 2010 Oh, you need to have LE 2.3 which has Editor. It's a improved and completely rewritten Sandbox from LE 2.2. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Raul Posted March 23, 2010 Author Share Posted March 23, 2010 I see.. So with the 2.28 Sandbox i can do anything ?? Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Canardia Posted March 23, 2010 Share Posted March 23, 2010 Sure, it's just different there. You need to press the "Select Instances" button, and then set the properties. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Raul Posted March 24, 2010 Author Share Posted March 24, 2010 http://yfrog.com/0k11433244p I have no property. Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
macklebee Posted March 24, 2010 Share Posted March 24, 2010 for 2.2X, just create an INI text file with the same name as the GMF, and write this in it: collisiontype=2 and save it in the same place as the tree's GMF file. when you upgrade to 2.3, you can replace the need for INI files with lua script ..or you can just do like lumooja was saying to do, select all the instances, then open up the properties window and hit the New button and create a new key/value of collisiontype/2... Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Raul Posted March 24, 2010 Author Share Posted March 24, 2010 Thanks. I tried with "collisiontype=2" in the ini file but nothing happens. In the same INI file there is a LODdistance="20 140" so I tried writing "2" between "" too and also nothing happens. I have in my code the following lines: LoadScene("map.sbx"); Collisions(); Collisions(1,2,1); Before calling the LoadScene I create the Controller also with type = 1 EDIT: In the properties window now I can see the "collisiontype" and the value 2... Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Raul Posted March 24, 2010 Author Share Posted March 24, 2010 Please guys help me. I rechecked the whole things. I have the collisiontype=2 in the ini file but IS NOT WORKING. This is my code: EntityType(PlayerController,1); SetBodyMass(PlayerController,80); myMap.CreateMap(); Collisions(1,1,1); Collisions(1,2,1); Also I have added some boxes in the scene (from my code not from Sandbox) and they are falling on the terrain, so there is no mistake in my code.. Quote i5 2.7Ghz, GTS 450, 8GB Ram, Win7 x64; Win8 x64 rvlgames.com - my games RVL Games Facebook Page, YouTube Channel Blitzmax Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.