MrIslomaniac Posted December 8, 2009 Share Posted December 8, 2009 Hey fellas Has anyone yet been able to script a ladder in lua? Or do you guys have an idea how to script it? Looking forward to it Cya Dustin Quote Link to comment Share on other sites More sharing options...
Niosop Posted December 8, 2009 Share Posted December 8, 2009 I would think something like. When in walking state: Check for forward key, if they're moving forward: Do either raycast forward or check for physics collision against the ladder. If it's determined that they're in position to get on the ladder: Switch to a climbing state and position the character on the ladder but above the ground. When in climbing state, if a forward raycast doesn't collide with the ladder, place them at the exit point of the ladder (either marked by a pivot or calculated) and switch back to walking state. If you get a collision with the floor it means they're at the bottom of the ladder, so switch them to walking state and move them slightly backwards. In climbing state disable left/right movement, translate forward movement to upward movement, backwards to down, and disable gravity. There may be better ways, and may even be some built in ladder code in the engine that I'm not aware of, I'm pretty new to LWE. Quote Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX ZBrush - Blender Link to comment Share on other sites More sharing options...
Scott Richmond Posted December 8, 2009 Share Posted December 8, 2009 Unfortunately Josh has yet to implement volume triggers in LE, otherwise it'd be as simple as creating a LUA script attached to a volume trigger. Quote Programmer, Modeller Intel Core i7 930 @ 3.5GHz | GeForce 480 GTX | 6GB DDR3 RAM | Windows 7 Premium x64 Visual Studio 2008 | Photoshop CS3 | Maya 2009 Website: http://srichnet.info Link to comment Share on other sites More sharing options...
macklebee Posted December 8, 2009 Share Posted December 8, 2009 Unfortunately Josh has yet to implement volume triggers in LE, otherwise it'd be as simple as creating a LUA script attached to a volume trigger. You can create your own volume trigger right now, however a limited simplified version. Have a dummy gmf with a script that creates a cube that can be scaled based on your property selections and with a trigger collision. Place it wherever you need it. 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...
Canardia Posted December 8, 2009 Share Posted December 8, 2009 In the gamelib demo you can find a volume trigger. It's used to change the ambient light inside/outside the pyramid, and its placed at the entrance of the pyramid. 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...
cocopino Posted December 8, 2009 Share Posted December 8, 2009 I remember good old Moose saying stuff about ladders: http://www.leadwerks.com/forum/viewtopic.php?f=31&t=3676&hilit=ladder I tend to agree with him Quote desktop: Quad core Q6600 + 4GB + ATI HD4890 + XP laptop: Dual core T6400 + 4 GB + NVidia 9600M GT + Vista 32 Link to comment Share on other sites More sharing options...
Marleys Ghost Posted December 9, 2009 Share Posted December 9, 2009 An idea I was toying with,in my mind only, was a simple ladder node, when at the node forward/backward would become up/down until reaching another ladder node when this would revert back .. then simply place the nodes at the bottom and top of the ladder in scene and let the code handle it. But thats as far as I got .. its #729 on my to do list Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" 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.