Beginning Scene!

Started by ktalebian, Mon 27/02/2006 01:16:25

Previous topic - Next topic

ktalebian

Heeey
how do I make a beginning scene and cut scenes? Thank you

quixotecoyote

<grin>  I'm a newbie but I just finished doing this.

Just make a room, have the player character start there,  and script out what you want to happen just like you would in-game events, making sure you use eBlock parameters where applicable so the player can't interrupt.

ktalebian

thxx! Now lets say the beginning scene happens in in three different rooms! What do I do then?

Ishmael

See StartCutscene and EndCutscene in the manual for added user-friendlyness :)
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

quixotecoyote

"thxx! Now lets say the beginning scene happens in in three different rooms! What do I do then?"

I ran cEgo.changeroom (x) to move to the new room and just started scripting again.  The room interaction 'first time player enters room' was a good starting point.

ktalebian

This, manual! It's so hard to find something on it! And the manual that comes with the program, it says it cannot connect to the internet! So I can't use it!

Scorpei

I'm also not sure how to make my beginning scene, I can make characters, make them do things, make text appear.
But for example I want to place an animation that looks like you're opening your eyes, I've got the bmp's ready, I've made a view of it and even a character, but I can't get it to display (in the correct place, nor getting it to run/animate).
I've been trying to find out what it is but I just can't find it.

Scor

quixotecoyote

Hey, I know this one too.  I feel so smart. 

I'm assuming you want one of the characters to open its eyes.  Don't bother with your special eye-opening animation character, your normal one is fine.  Assume X is the view number of the animation and Y is the loop number.

character[EGO].LockView(X);
character[EGO].Animate(Y, 0, eOnce, eBlock, eForwards);
character[EGO].UnlockView();

Learning as I go,
QC

Scorpei

So will have to start scripting for this :) (however I do recognise all the commands from the interaction menu, so maby not), a well, got a holiday so I can look into it.
But I don't want the character itself to open his eyes, I want to maar some kind of first person view, if you get what I mean.
So It will have to be a different view or something.
Also I want text to be displayed at the same time, not after the eyes are open.
It looks screwed but this is al I've gotÃ,  at the moment (it's more to learn how to work with the engine, don't look at the graphics to much :)):

http://www.simonvandeberg.be/Compiled.zip

If you walk to the edge on the right, you'll get what I wanted my cutscene to look like (it still isn't much, but thats beside the point :).

Scor

Ashen

Without having played that test game:
Try making an object and assigning the view to / animating that, instead of a character. If you position it right (bottom left corner of the first screen) it should give the effect you want. The script commands you'd need are: Object.SetView, Object.Animate, and the Object.Visible property. (Although, as with the character animation commands QC gave, there're Interaction Editor equilvalentss for these if you don't want to script yet. They're quite clearly named.)
I know what you're thinking ... Don't think that.

Scorpei

#10
I've placed a cup :) at the left lowest corner, should I now add the view and animate commands at the room script menu? or is there a special object script location?

Thanks for your help!

If in the room menu, it would become this?

// room script file
object[0].SetView (0)
object[0].Animate(1, 4, eOnce, eNoBlock, eForwards)

and then set the text that should be displayed?

Scor

Ashen

No, it definately DOESN'T want to go just in the room script like that, but that's basically right. (You're missing the ; at the end of the lines, though.) Read this BFAQ entry for some hints on placing code.

I'd recommend changing the object's image to the first frame of the animation in the editor, then putting your code in 'Player enters screen (after fadein)'.

Also, please don't double post - use the 'Modify' button to edit your post.
I know what you're thinking ... Don't think that.

Scorpei

#12
Sorry about the double post, simply forgot to use edit the first time :(.
Image has been changed.
So should this bit of code be placed here then?

Ã,  // script for Room: First time player enters room
object[0].SetView (2);
object[0].Animate(0, 4, eOnce, eNoBlock, eForwards);
display ("Wake up!");

This is after going to the room option, then going to the interactions menu, then at First time player enters room. Right mouse click, then Run script.
After run script I added Go to other room.

Seems like it might work to me.
I've edited the code a bit, because it doesn't seem to operate the way I want, perhaps this way is better?

  // script for Room: First time player enters room
object[1].SetView (2);
object[1].Visible = true;
object[1].Animate(0, 10, eOnce, eNoBlock, eForwards);
object[1].Visible = false;
Display("Wake up Brother");
Display("Wake up, we're going to the moon!");

Ashen

Sounds like it should work to me, too.

One thing to watch out for is the capitalisation - Display("Hi!"); works, display("Hi!"); doesn't. (Although, that might just be how you've typed it HERE, and not in the game itself. The autocomplete function should take care of most of it for you, anyway.)
I know what you're thinking ... Don't think that.

Scorpei

#14
It doesn't want to start the animation   :'(.
I know C is case sensitive (and I use linux a lot so I have to be precise in casing :)) but thanks :) it wasn't the problem though :(.
I've updated the compiled.zip on my site, but perhaps the source will be more usefull.
It displays the text nice and fine, and it does seem to show the last slide of the animation..

Ashen

object[1].Visible = true; shouldn't be needed, unless you've un-checked 'Object is initially visible' in the editor. Since the animation is non-blocking, the object[1].Visible = false; line will probably run before it's complete, which isn't good.
Display(..) commands ARE blocking, so they'll probably interfere with the animation as well.

The source would be useful, yes. I take it the 'complied' link a few posts up now links to the new version? I had to use Ctrl-X to get to the 'Wake Up' room. It doesn't look like there's actually a background there, so I'm a little confused about what's meant to be happening.
I know what you're thinking ... Don't think that.

Scorpei

#16
hehe, the last room has a background, but it is no longer visible because of the first frame of the animation.
If you walk to the outermost egde (on the right) you should get into the wakeup room.
I'll put the source up:

http://www.simonvandeberg.be/test.zip (NO LONGER AVAILABLE)

I'll remove the object visible lines, and test it, if it still doesn't work (I've tried it before adding them so I don't think it will) I'll put the zip online, it'll be up in less then 5~10 minutes.

____________________________________________EDIT_______________________
It's up, the source I mean :), removing the visible lines didn't work.

____________________________________________EDIT________________________
That might be the problem, the first frame (that is now also the OBJECT image, is full black (no background visible) maybe it displays it aswel as the animation, but the animation isn't visible because of it.
I can't test it now, in an hour I can, maybe you can?

Ashen

OK, there're a couple of things, from looking at the source.

1) The object is positioned wrong. It's bottom left corner needs to be at the bottom left of the screen (Object position = 0, 300). Currently, you're not seing the object AT ALL.

2) You've got a character (openingeyes) in the room, that's takinging up the whole screen. I guess this is left over from when you tried using character animation, but it's now why the screen stays fully black. Set it's starting room to 0 in the editor to get rid of it.

3) The animation setup is a little off. For one, the delay seems high, making it very jerky (this could just be personal preference, though). Also, what I said about the Display(..) commands before - with them in place, and the animation set to eNoBlock you don't actually get to see the anim before the room changes. the easiest way 'round it would probably be to split the animation into a few loops, make them blocking and mix in the Display(..) commands, e.g.:
         Animation - Eyes open a sliver.
         Display - "Wake Up Brother."
         Animation - Eyes half open, close.
         Display - "Wake up, we're going to the moon."
         Animation - Eyes fully open.
         Change room.
I know what you're thinking ... Don't think that.

Scorpei

#18
Thanks!
I'm gonna test it in an hour, when I'm back at my pc, I'll let you know if I get it working.

_______edit_________
It works now, still looks like crap because of small amount of frames, but it does work now, and kinda like the way I want.
Thanks!
For the sake of the forum I'll place the code I used now here:

Ã,  // script for Room: First time player enters room
object[1].SetView (2);
object[1].Animate(0, 5, eOnce, eBlock, eForwards);
Display("Wake up Brother");
object[1].Animate(1, 5, eOnce, eBlock, eForwards);
Display("Wake up, we're going to the moon!");

I've updated the ( http://www.simonvandeberg.be/Compiled.zip )compiled zip on my site.
And removed the source, if anyone wants source or graphics, mail me via my site, everything is released under creative commons.

SMF spam blocked by CleanTalk