Jump to content

Problems with LE1 C++ Project in LE2


Birdman
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

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

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...