coldfire Posted November 6, 2010 Share Posted November 6, 2010 Well, its been quite some time since I've messed with LUA-based entities and I've noticed quite a lot has changed. I am curious if you would set it up like: function class:Update(model) Or if there was a different way of doing it. If its not too much to ask, I'm sure a simple example of rotating the model would show me exactly what I need to know. I've searched through several other script to find an example with no luck. Thanks in advance. Quote AMD 64 X2 3800+ | 3G DDR2 667 | Windows 7 Ultimate 64 Bit | Nvidia Geforce 9800 GT 512MB DDR3 Link to comment Share on other sites More sharing options...
macklebee Posted November 6, 2010 Share Posted November 6, 2010 there are several examples in the lua forum... but here is a quick and dirty script to rotate the model: require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function object:Update() object.model:Turn(Vec3(0,1,0)) end end this assumes that you have downloaded at least the oldest version of 2.30, since there was a change from multi-state to single-state lua and inherent scripts have changed since LE 2.3 was first released 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...
coldfire Posted November 6, 2010 Author Share Posted November 6, 2010 there are several examples in the lua forum... but here is a quick and dirty script to rotate the model: require("scripts/class") local class=CreateClass(...) function class:CreateObject(model) local object=self.super:CreateObject(model) function object:Update() object.model:Turn(Vec3(0,1,0)) end end this assumes that you have downloaded at least the oldest version of 2.30, since there was a change from multi-state to single-state lua and inherent scripts have changed since LE 2.3 was first released Yup, i was using the multi-state system before, so this was completely new to me, lol. Thank you so much for the snippet. Its just what I needed. I didn't realize it was inside the class:CreateObject(model) function. Thanks a ton! Randy Quote AMD 64 X2 3800+ | 3G DDR2 667 | Windows 7 Ultimate 64 Bit | Nvidia Geforce 9800 GT 512MB DDR3 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.