Jump to content

Home

First Script: Not liking what I see


StaffSaberist

Recommended Posts

Posted

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?

Posted

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.

Posted

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?

Posted

Why did you change the PAN command to get the angles from "cin1" instead of the camera "cam1" you still had in the first, albeit otherwise faulty script? What is "cin1"?

Posted

Kengo uses "Cin1" as the scripts name in the tutorial. I'll bet you just confused the two and accidentally wrote "cin1" correct? Change it to cam1 and your script is fixed :)

 

Keep in mind info_player_starts don't show up in cutscenes ;)

Archived

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

×
×
  • Create New...