Movie Levels (Are They Even Possible)

Post topics regarding Level Building/Design and Entity Usage with Reality Factory
User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Movie Levels (Are They Even Possible)

Post by metal_head » Thu Oct 16, 2008 2:15 pm

What I mean under "movie level" is a level,where you can't control the player,or there's no player,instead of that the camera flies arround the level.For example I need this for a level where a small spaceship - fighter lands near the entrance of a hidden laboratoru,than from the spaceship three guys to come out and walk towards the entrance,than the camera to look upwards or something and the level to change to the next one where you are in the hiden laboratory. I have no clue how to make such thing,maybe scripting will be needed,so please if the question requires scripteng,move the topic.
Also I want several cameras to be switched etween like in the Genesis 3D demo.Otherwise,I'll have to make lots of AVI movies for each cutscene,and this will take much more time and will be with a terrbile resolution.So that way,for cutscenes I'll make levels,not movie files.

Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: Movie Levels (Are They Even Possible)

Post by Danimita92 » Fri Oct 17, 2008 4:17 pm

Just make pawns and fixed cameras in a level, and script the scene

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Movie Levels (Are They Even Possible)

Post by metal_head » Fri Oct 17, 2008 4:27 pm

Soo,that will require scripting...damn I suck at this.

Well,till now I've made some cutscenes if I could say it like that with fixed cameras,but it's only in game (when the player pushes a button or something,the camera which is attatched to an animated model,flys through the level and shows the door that the player has activated,but with scripting...no idea how to do it.And how do I make the cameras to switch between?
Also how can I trigger the LevelChange entity once the whole action in the level is over?
IF anybody has done that,please help me (if there's a template for that or something? )

OH,ad please move the topic to where it really belongs,my apologies.

Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: Movie Levels (Are They Even Possible)

Post by Danimita92 » Fri Oct 17, 2008 4:45 pm

Okay, look. Try having an invisible pawn, use AttachCamera on it, and give it a PositionToPawn with coordinates. Depending on the coordinates, it's either in one place or the other

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Movie Levels (Are They Even Possible)

Post by metal_head » Fri Oct 17, 2008 5:00 pm

Didn't quite get what you ment,but I'll try making something,the biggest problem now is the camera - how to make it fly in the level and capture what's going on.

Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: Movie Levels (Are They Even Possible)

Post by Danimita92 » Fri Oct 17, 2008 5:27 pm

That's what I was talking about. Use a pawn with an attached camera, that positiontopawn's to an important pawn like a player, with offsets X Y and Z separating it from this pawn. Like that you can make the camera look at a pawn, as close or far away as you want. You want to see only a character's face? You add the positiontopawn to the character, and make offset Z very small to get closer, offset X to be anything you want, and offset Y as high as you need it to be, until you can see the face.

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Movie Levels (Are They Even Possible)

Post by metal_head » Fri Oct 17, 2008 5:35 pm

thanks,I'll post simillar topic in scripting after my current two qustions are answered (or not answered :D ) and see if I could get any help with all this,thanks Danimita!

User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: Movie Levels (Are They Even Possible)

Post by Juutis » Sun Oct 19, 2008 4:45 pm

metal_head wrote:Well,till now I've made some cutscenes if I could say it like that with fixed cameras,but it's only in game (when the player pushes a button or something,the camera which is attatched to an animated model,flys through the level and shows the door that the player has activated
Alright, so you have done it before? In a smaller scale, but still you've done it. I'm sorry, but I don't see the problem here. Can't you just do the same thing but instead of waiting until the player does something (pushes a button) start the cut scene when the level starts?

I've got a feeling I'm not getting something here. Granted, I haven't really done any in-game cut scenes, but what's the difference between a cut scene level and a level that has a short cut scene in the middle?

metal_head wrote:Also how can I trigger the LevelChange entity once the whole action in the level is over?
You could use a CountDownTimer entity. If you know how long the cut scene is going to last you can just set a CountDownTimer that activates the LevelChange entity when enough time has passed.
Pain is only psychological.

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Movie Levels (Are They Even Possible)

Post by metal_head » Sun Oct 19, 2008 5:16 pm

Alright, so you have done it before? In a smaller scale, but still you've done it. I'm sorry, but I don't see the problem here. Can't you just do the same thing but instead of waiting until the player does something (pushes a button) start the cut scene when the level starts?

I've got a feeling I'm not getting something here. Granted, I haven't really done any in-game cut scenes, but what's the difference between a cut scene level and a level that has a short cut scene in the middle?
Well,first of all when I make something ike this the view doesn't switch to a different camera,so the cutscene is made only by one camera,attatched to an animated model,and I want the views to be switched,for example when the characters talk to each other the views to switch between the main character and his friends,I know that this could be done only by moving the model,but actually that's harder,because I won't know how to animate the mode (how much time the model to stay in position before it starts moving again to the other character).

The other thing is that I can't make the model rotate,if I do that the model starts moving all over the level and even outside in the black void,I want the camera to be like in the Genesis 3D demo,where the camera rotates and with animated model I can only make the camera move up,down,left,right,forward and backward,but I cannot rotate the model :(.
So I was thinking that maybe the camera can be made to follow a path or something?


And the problem is not only the camera! I'll have to make the characters follow a path then when they reach for example pathpoint 3 to stop,play and idel animation,that play a talk animation and play a sond,than continiue to walk.

Or for example how can I make this:
I want to make a cutscene where a fighter ship falls and crashes...but how can I make the fighter ship explode when it touches the ground for example?

Other: I want to make a character open a door in the cutscene,is this even possible :D?
But firstly I'll have to make the camera stuff and I'll need help.

I hope that makes it clearer,I didn't explain very well in the previous post :) , sorry.

User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: Movie Levels (Are They Even Possible)

Post by Juutis » Mon Oct 20, 2008 4:50 pm

Ah, OK. Thanks for the clarification, now it makes more sense.

In the 075 manual there was a whole section for cut scenes. I couldn't find it in the new manual. I think it's pretty informative, though:
Making InGame Movies (Real-time Cutscenes)


In order to make ingame movies you must make a level where everything is self running and the camera moves about on its own. Some special things are required to make this happen.
Actors

The actors in the movie are Pawns, scripted to carry out the actions you wish and responding to various triggers set and reset by other entities and Pawns. See the document on scripting Pawns to see how this is done. One note: when you are in movie mode the sounds made by the Pawn's script actions are played as if they occurred at the camera, rather than at the Pawn's location. This gives a uniform volume level for all Pawn sounds.
Cameras

In order to move cameras around the level and switch between them you must set, in the PlayerSetup entity, LevelView to 3 (Fixed Camera mode). Cameras that are to move can be attached to specially setup Pawns, which then can be scripted to move along a path of ScriptPoints. A good type to use for moving cameras would be defined in Pawn.ini as:

[MovingCamera]
actorname = proj.act
actorrotation = 0 180 0
actorscale = 1
fillcolor = 255 255 255
ambientcolor = 255 255 255
subjecttogravity = false
boundingboxanimation = nocollide
shadowsize = 0

It would be invisible and have no bounding box to affect collisions. When attaching the FixedCamera entity to one of these Pawns leave the BoneName blank and it will attach to the root bone at the center of the actor. The camera will follow the movement and rotation of the Pawn as it steps through its script.

The first camera to be used when the level starts should have its UseFirst entry set to true. No other camera should have this flag set to true.
Switching Cameras

By setting up the Pawns and attached cameras correctly you can make it easy to switch between them. A Pawn that is not yet being used should have as its SpawnOrder something like this:

Start2[ ()
{
AddTriggerOrder("Camera2", "eventstart2", 0);
RestartOrder();
} ]

This loops around waiting for a trigger called 'eventstart2' to go on. When it does it will run the Order called 'Camera2'. The attached FixedCamera should have its triggers set this way:

TriggerName - eventstart2
ForceTrigger - eventstart2

This will cause the Pawn and attached camera to be activated at the same time. When you wish to switch to another camera use these actions in the Pawn's script:

SetEventState("eventstart2", false);
SetEventState("eventstart3", true);

This will deactivate the current FixedCamera and start up some other Pawn and camera that is waiting for the trigger 'eventstart3' to go on.
Exiting the Movie

When the movie is about to be ended and you are switching to another level for the user to play, you must do certain things. One of the Pawns, either an actor or a camera mover, must set a trigger to on when the movie is to end by running the following in its script:

SetEventState("movieend", true);

The name of the trigger, called 'movieend' here, can be any thing you wish. Add a LogicGate entity to the level with its entries set as follows:

szEntityName - EndMovie (or anything else you like)
Trigger1Name - movieend
Trigger2Name - MovieMode
Type - 3

Then add your ChangeLevel entity and set

ForceTrigger - EndMovie

Lastly, in the PlayerSetup entity, set the entry MovieMode to true. This will cause a level change when the script reaches the end or when the user presses the ESC key.

BTW, I just realized this is an excellent way to learn scripting. It's all about the very very basics: moving pawns around, playing animations, setting triggers etc.
Pain is only psychological.

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Movie Levels (Are They Even Possible)

Post by metal_head » Mon Oct 20, 2008 6:00 pm

You're Right! It is a great way to learn the basic movements!
Now,before I get started,I have some questions,that are stopping me from starting:

Start2[ ()
{
AddTriggerOrder("Camera2", "eventstart2", 0);
RestartOrder();
} ]
This loops around waiting for a trigger called 'eventstart2' to go on. When it does it will run the Order called 'Camera2'. The attached FixedCamera should have its triggers set this way:

TriggerName - eventstart2
ForceTrigger - eventstart2
Now,I didn't really get this one,Camera2 is the camera entity,that's attatched to the pawn with this script,right? Or is the camera that should be triggered after the trigger "eventstart2" is activated?

Amm,I didn't get this also,the pawns,holding the cameras will be moving using script points,right?

And could this count as a simple script for a camera holding pawn?:

Code: Select all

{


Spawn[ ()
{
Console(true);
LowLevel("start");

start[ ()
{
MoveToPoint("2",100,"");
MoveToPoint("3",100,"");
MoveToPoint("4",100,"");
MoveToPoint("5",100,"");
Rotate(130, 0, 90, 0, "");  
Delay(2);
Rotate(150, 0, -90, 0, "");
MoveToPoint("6",100,"");
NewOrder("stop");
} ]

stop[ ()
{
SetEventState("eventstart2", true);
Remove(true);
} ]

}
Now what the script should do (at least I think it should do this :D :D ) is to make the pawn follow 4 script points in the level,than at the forth point stop,rotate to the left,than to the right and proceed to the last script point,than activate the trigger "eventstate2" and get itself removed.
I'm sure there are mistakes,I'm counting on you and whoever canhelp to tell me where they are,sorry that I haven't tested it, I'm in the middle of making the game menu,because my team and I decided to chang the conception a little bit :). I'll be ready after an hour an I'll immediately start work on a cutscene level :).

User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: Movie Levels (Are They Even Possible)

Post by Juutis » Tue Oct 21, 2008 12:32 am

metal_head wrote:Now,I didn't really get this one,Camera2 is the camera entity,that's attatched to the pawn with this script,right? Or is the camera that should be triggered after the trigger "eventstart2" is activated?
In this case 'Camera2' is the order that the pawn starts executing once it sees that the trigger 'eventstart2' is on. The manual is very helpful when you are unsure of what a command does:
AddTriggerOrder(string Order, string Trigger, float Time);
Add to list of triggers being checked by the Pawn a trigger called Trigger. When the state of this trigger goes to on the Script Order called Order will be executed by this Pawn. If Time is greater than 0 then the Script Order will wait this number of seconds before being executed. When the trigger goes on it is removed from the list of active triggers. Any number of triggers can be added to the trigger list of a Pawn.
metal_head wrote:Amm,I didn't get this also,the pawns,holding the cameras will be moving using script points,right?
Yes, exactly. But I'm afraid that script is not how you do it. Once again, the manual comes handy:
MoveToPoint(string Animation, float Speed, string Sound);
Move the actor to the current valid ScriptPoint at Speed texels per second while playing the actor's Animation animation.
So the script would be:

Code: Select all

start[ ()
{
MoveToPoint("",100,"");
NextPoint();
MoveToPoint("",100,"");
NextPoint();
MoveToPoint("",100,"");
NextPoint();
MoveToPoint("",100,"");
NextPoint();
Rotate(130, 0, 90, 0, ""); 
Delay(2);
Rotate(150, 0, -90, 0, "");
MoveToPoint("",100,"");
NewOrder("stop");
} ]
Or something similar.
Pain is only psychological.

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Movie Levels (Are They Even Possible)

Post by metal_head » Tue Oct 21, 2008 2:55 pm

Thanks,I'm starting to work on this now! Only one more thing,what about if I want to make the camera strafe without rotating to the next point?

I'm sorry,it looks like I've never opened the manual,I just can't find the right command,and even if I find it,I won't know I've found it :D,I'm using the manual for something like a dictionary,when there's a command that I don't know what is and it's important of a script.


Ammm,a little problem,I started making the cutscene level and I did everything,but when I loaded the level,the game crashed and threw me out...I removed the movie mode,so I'll be able to see if there's wrong with the player,and the pawn wasn't even spawned... I had set the pawn to spawn at the script point "spawn1",which leads to the next script point -"1" so I decided it's because of the spawn point,so I made the pawn to spawn at the place the pawn entity is,but the pawn wasn't spawning again...I'm using the script,we talked about above...

EDIT,and I found out that there are two commands:
MoveToPoint
and RotateMoveToPoint,so I can use the MoveToPoint command to make the camera strafe,right?

User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: Movie Levels (Are They Even Possible)

Post by Juutis » Tue Oct 21, 2008 3:39 pm

metal_head wrote:I'm sorry,it looks like I've never opened the manual
To be honest, yeah, I'm starting to get that impression. :)

MoveForward(string Animation, float Speed, float Distance, string Sound);
Move the actor forward for Distance texels at Speed texels per second while playing the actor's Animation animation.

MoveBackward(string Animation, float Speed, float Distance, string Sound);
Move the actor backward for Distance texels at Speed texels per second while playing the actor's Animation animation.

MoveRight(string Animation, float Speed, float Distance, string Sound);
Move the actor right for Distance texels at Speed texels per second while playing the actor's Animation animation.

MoveLeft(string Animation, float Speed, float Distance, string Sound);
Move the actor left for Distance texels at Speed texels per second while playing the actor's Animation animation.

***EDIT***
Seems you edited just when I posted.
Yeah, I suppose MoveToPoint() makes the pawn strafe if the script point isn't straight in front of the pawn.
metal_head wrote:pawn wasn't even spawned... I had set the pawn to spawn at the script point "spawn1",which leads to the next script point -"1" so I decided it's because of the spawn point,so I made the pawn to spawn at the place the pawn entity is,but the pawn wasn't spawning again...I'm using the script,we talked about above...
You're missing '} ]' in the spawn order.

***EDIT2***
Oh, and the commands you're using in the 'start' order are high level commands. So in 'Spawn' you should have 'NewOrder("start");' instead of 'LowLevel("start);'.
Pain is only psychological.

User avatar
metal_head
Posts: 1244
Joined: Sat Jan 05, 2008 8:31 pm
Location: Bulgaria,Sofia
Contact:

Re: Movie Levels (Are They Even Possible)

Post by metal_head » Tue Oct 21, 2008 4:15 pm

Thanks,I didn't see that I have missed this,also I was missking a "{" at the beginning. Now I have another problem,when spawned the pawn just stands and doesn't follow the script points...
Here are the first script point that the pawn should be spawned at and the pawn entity:

I still can't figure out where's the problem...
Attachments
pawn1.jpg
pawn1.jpg (14.19 KiB) Viewed 1007 times
spawn1.jpg
spawn1.jpg (6.94 KiB) Viewed 1008 times

Post Reply