View Full Version : SWeD Bug

06-19-2003, 11:28 PM
After realizing that Teenage Lawnmower doesn't require an active internet connection to run, I decided to start on a new TLM mod. However... I ran into a bug in SWeD.

I created a new invisible entity, and attached this script to it to move the camera to an exact position to take screenshots:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">void OnCreate&#40;&#41; //always put this FIRST in your script if you are going to use it. Declare script-wide globals here.
Vector3 vec_cam;
int id_cam;

void Main&#40;&#41;
//don&#39;t actually do anything when loaded
id_cam = EntGetByName&#40;&#34;Main Camera&#34;&#41;;
vec_cam = MakeVector3&#40;497.055, 494.389, -209.215&#41;;
EntSetPosition&#40;id_cam, vec_cam&#41;;
EntSetDirection&#40;id_cam, 0.785&#41;;
EntSetTilt&#40;id_cam, 2.785&#41;;
}[/QUOTE]However... EntSetTilt and EntSetDirection don&#39;t work correctly in SWeD. EntSetDirection actually controls the Tilt, and EntSetPosition actually controls the Roll (nothing visible happens, just the Roll number at the top changes). At first I was hoping that EntSetRoll would control the Direction, but that function doesn&#39;t exist.

The reason why I did the whole weird script-to-change-camera position is its hard to move the camera to an exact position, or maybe I&#39;m just completely missing something.

06-19-2003, 11:34 PM
SWED uses completely different camera code then the main TLM .exe. Does the camera work as expected in TLM itself?

06-20-2003, 10:47 PM
Yeah, but I really wanted to move the camera in SWeD http://www.rtsoft.com/iB_html/non-cgi/emoticons/smile.gif It isn&#39;t really that big of a deal though, I was just trying to move the camera to an exact angle to take screenshots for a map for use in-game.