Game Development Community

Dynamic interiors

by Riccardo Berta · in · 10/16/2006 (12:51 am) · 1 replies

I have a little piece of road (.dif) with its own lights: I want to create dynamically a new piece of road.

The problem is that Torque crashes when the player enters in the trigger that creates the new interior.

This is a little report of my tests:

1. If the first piece of road is in the mission file, it is correctly lighting but Torque crashes if I create a new piece of road.

2. If the first piece of road is dynamically creates at the beginning of the game, it is not correctly lighting (it appears too bright and without its dynamic lights), but Torque doesn't crash and a new piece of road is created --> but if do a relight of the scene the lights of roads re-appear correctly but Torque re-crashes if it creates a new piece of road.

I can't understand where I'm wrong...
I'm using this simple code to create a new interior:

%newstrada=new InteriorInstance() {
position = $position_strada;
rotation = "0 0 1 89.9544";
scale = "1 1 1";
interiorFile = "~/data/Strade/rettilineo.dif";
useGLLighting = "0";
showTerrainInside = "0";
};

I'm using Torque 1.4 + TLK.

Thanks

#1
10/16/2006 (12:33 pm)
Try running in debug mode to see where it's crashing - Visual Studio will show you the code location and the call stack, which shows the path the code took to get to the crash. Please post this info in the TLK Private Forums and we can figure out whats happening.