PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Camera system working



zapp
19.04.2003, 08:14
Sorry guys I dont speak German sorry.. anyways my friend Rayne figured out how to make cameras... its very simple actually. Ill show you.

Open radiant, Open the map you want the camera on, click on new camera. For me its the fourth to last button on the right side of the toolbar. New Camera > Fixed. Once its open give it a name. The name of mine is bridge. The click on add points. Its a small white circle slightly under EDIT>. Then Where it says Length (seconds) there is a white box next to it it has the ammount of seconds the camera will last. Set it to how long you want the camera animation to last. Mine is set to 30 seconds. After you set it click apply.Then go to your radiant and give the target to aim at. Make sure its slightly above the target. If you want to see what the camera is looking at just move the Current Time SLider slightly to the right. The 3d view will show you what the camera is looking at. Once your happy with what the camera does click on the Save button in the camera inspector box.


The coding. Make a script and this to it.

void camera_1()

{
sys.setCamera( $bridge);
//$bridge.pathfile( "cameras/bridge.camera" );
$bridge.start();
sys.waitFor($bridge);
$bridge.stop();
sys.return($1)

}

once that is set go back to your radiant, highlight a peice of worldspawn, press N to go to the entities box, add this to it.

Key: Script
Value: scriptname.script

Now make a "func_camera_spline" add these command to the entity options. Name it Bridge or whatever you want, but if your using my code you will name it bridge.


Key: Call
Value: Camera_1

Key: Name
Value: bridge

Key: Pathfile
Value: cameras\yourcameraname.camera

now have something trigger that entity (func_camera_spline)

If you did everything correctly it should open your camera and animate it. Well thats how you get cameras to work. What I really came here for was to find out how to make it so when the camera is done it goes back to the game. With my current script...the game displays the camera but never returns back to the game. Any ideas on how i should modify the code so it will return?



Yay 1st post...long one...see ya :hammer:

zapp
20.04.2003, 03:36
Traurig für den wirklich schrecklichen Tutorial. Ist hier eine playable Version des Kameradiagramms.

Camera (http://www.geocities.com/mrl180)

Onan
21.04.2003, 22:28
THANKS A LOT!!! :daumen: :daumen: Now I know why my camera didn't work. I forgot the :fuck: -ing func_camera_spline. Would you allow us to add your tutorial to our tutorials-section (and also add a german translation)? Of course you will be mentioned as the author.

BTW: To change back to 1st-person-view, add the following line at the end of your script:

sys.firstPerson();

To wait for the camera don't use the command waitfor(), but wait(15), otherwise it won't change back to 1st person view. I don't know why it doesn't work with waitfor(), but idsoftware does it the same way: the last animation has always a wait() instead of waitfor().