The Dink Network

Reply to Re: Dink Cut-scenes

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
May 23rd 2008, 11:04 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
A simple cutscene can be made using very basic DinkC commands. So you could use the say(); and move(); commands to make a primitive cutscene already.

For example these lines of code will first freeze Dink, then make Dink say someting and walk down (to <newy> which hasn't been defined yet...), finaly we'll unfreeze him so he can continue doing what he wants:

freeze(1);
say_stop("Wow I'm saying something",1);
move_stop(1,2,<newy>,1);
unfreeze(1);

instead of 1 (which is Dink) you could also use other sprites. For example &current_sprite, which is the sprite to which the script is attached to, so you could do something like this:

freeze(1);
freeze(&current_sprite);
say_stop("Hi there, sprite!",1);
say_stop("`7Welcome Dink",&current_sprite);
unfreeze(1);
unfreeze(&current_sprite);

So as you see, it works just like in-game. The difference is that in a cutscene you often don't have a suitable &current_sprite to work with. So let's create a new sprite!

freeze(1);
int &sprite;
&sprite = create_sprite(x,y,brain,pseq,pframe);
say_stop("Nice weather isn't it?",&sprite);
say_stop("Nah, it's better outside...",1);
unfreeze(1);

In the above example I defined a new variable (which is &sprite). To this variable I attached a sprite, so I can use the &sprite variable to make this sprite talk, walk or whatever I want it to do.

So that should be enough to make your first cutscenes...

Oh, and one final comment: If you like a sprite to move make sure it has a speed value higher than 0. It might sound stupid but many people (including me) tend to forget it sometimes. (You can set the speed with the sp_speed(); command)