Results 1 to 3 of 3

Thread: SWeD Bug

  1. #1
    Lesser Wizard
    Join Date
    Jul 2002
    Location
    MI, USA
    Posts
    169

    Unhappy

    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.

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,340

    Post

    SWED uses completely different camera code then the main TLM .exe. Does the camera work as expected in TLM itself?
    Seth A. Robinson
    Robinson Technologies

  3. #3
    Lesser Wizard
    Join Date
    Jul 2002
    Location
    MI, USA
    Posts
    169

    Post

    Yeah, but I really wanted to move the camera in SWeD  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.




Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •