Birdman Posted March 9, 2012 Share Posted March 9, 2012 I have and old project i made a few months ago in LE1, when i compile with LE 2 it compiles, but running the project will crash. Any basic function like AppLog, or SetZipStreamPassword will crash my project. Did this changed that much? do i have to make a new VS Project and put my source files in there? Thanks a lot in advance. Quote Link to comment Share on other sites More sharing options...
Birdman Posted March 9, 2012 Author Share Posted March 9, 2012 Yes, indeed i had to create a new Project from the Template to make this work. Still im having some problem. I used this code in a vehicle Lua: function class:CreateObject(model) .. SetGlobalObject("vhcobj",entity.vehicle); The problem is that now CreateObject don't exist in the new vehicle lua, instead it was replaced with SPAWN. I have no idea how to call SPAWN from c++ (My project runs a vehicle from C++, so what i do is, make a global object so i can control the car from Code). When i used LoadModel() in c++ CreateObject() was called from the LUA, so idk what to do now. Thanks a lot in advance. Quote Link to comment Share on other sites More sharing options...
Birdman Posted March 12, 2012 Author Share Posted March 12, 2012 Anybody knows how to call the Spawn function? or anybody have a c++ vehicle working propertly? I used this c++ and lua hybrid couse it was the solution that worked best for me. Quote Link to comment Share on other sites More sharing options...
macklebee Posted March 12, 2012 Share Posted March 12, 2012 The spawn function was from the old baseclass lua script from back in the original LE2.3 came out with multi-state lua. Since it was changed over to single state in 2.31, the object scripts essentially use the class script for its setup, which is what most people here are used to... which is what the inherent object script for the viper scout uses... 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...
Birdman Posted March 12, 2012 Author Share Posted March 12, 2012 My problem is, i want to implement the last version of vehicle script, but i need to add a few stuff, and spawn is not being called with my c++ project. A fully scripted vehicle wasn't controllable by c++ so i made an hybrid project in which i use a 5 global objects, 1 for the vehicle, and 4 for the wheels. Then i control em. I have no idea what's the best practice to handle vehicles, maybe there is a better way to do this. Quote 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.