Jump to content

Home

First Script: Not liking what I see


StaffSaberist

Recommended Posts

Where do I learn to script? KIDDING, DON'T FLAME ME!

 

I am using Kengo's tutorial to create simple scripting. My first cutscene is a scene that loads on start. It should simply enable, stay in one spot for 8000 milliseconds, and disable. I have:

 

//Generated by BehavEd

camera ( /*@CAMERA_COMMANDS*/ ENABLE );
camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "cam1", ORIGIN)$, 0 );
camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "cam1", ORIGIN)$, < 0.000 0.000 0.000 >, 0 );
wait ( "8000" );
camera ( /*@CAMERA_COMMANDS*/ DISABLE );

 

My two problems:

 

1 - It's at a very loopy angle. It's almost on it's side.

 

2 - It never ends! Isn't that what disable should do?

Link to comment
Share on other sites

1. Your PAN is faulty. It should be using ANGLES, not ORIGIN.

 

2. You use wait("task") instead of wait(milliseconds). And since there is no task defined called "8000", the script will wait for the completion of a nonexistent task for all eternity - or at least until you quit the game.

Link to comment
Share on other sites

Okay, now it's better, but still not what I want. I fixed the angle of the camera, and the wait is, I suppose, 8000 milliseconds. Though that 8000 went by rather fast. Anyway, my camara did a complete 180. It's like this:

 

As of now, I have the info_playerstart, the camera, and a door in a line. The camera points at an info_null just above the playerstart.

X ___________<-__________O

Player_________Cam1_______Door

 

When the cutscene plays, the camera looks like this:

 

X______________->_________O

Player_________Cam1_______Door

 

Here is the code now:

 

//Generated by BehavEd

camera ( /*@CAMERA_COMMANDS*/ ENABLE );
camera ( /*@CAMERA_COMMANDS*/ MOVE, $tag( "cam1", ORIGIN)$, 0 );
camera ( /*@CAMERA_COMMANDS*/ PAN, $tag( "cin1", ANGLES)$, < 0.000 0.000 0.000 >, 0 );
wait ( $8000$ );
camera ( /*@CAMERA_COMMANDS*/ DISABLE );

 

What may be the problem now?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...