Quantcast

Jump to content

» «
Photo

How to make some cool moving cutscenes

  • This topic is locked This topic is locked
15 replies to this topic
Manfred Von Karma
  • Manfred Von Karma

    Trick

  • Members
  • Joined: 16 Jun 2009
  • None

#1

Posted 30 March 2012 - 08:18 PM Edited by Fable11, 31 March 2012 - 06:20 PM.

Hey , im back with a tutorial that is easy but just a little pain to the brain ...

So , you dont need to be a professional Cleo programmer , you can be a noob like me and still make some cool intros . I figured this out by exploring Sanny builder's opcodes a little bit and grabing some of them from the main.scm file and of course adding some texting using the GXThook plugin , but the best thing i added is the soundtrack to the Cutscene ! so here are the results :

CODE

//-------------MAIN---------------
thread 'Movie'
$A = 12000
$B = 32000
$PLAYER_ACTOR = Actor.EmulateFromPlayer($PLAYER_CHAR)
Actor.StorePos($PLAYER_ACTOR, $X, $Y, $Z)
$ONMISSION = 0

:Movie_56
wait 0
if
 $ONMISSION == 1
else_jump @Movie_56
wait 2000
02A3: enable_widescreen 1
015D: set_gamespeed 1.0
0952: load_soundtrack 13
0954: start_playing_loaded_soundtrack
0936: set_camera 212.1185 -1733.208 4.3946 position_to 250.1185 -1733.208 4.3946 time $A drop_mode 0
0920: point_camera 212.1185 -1733.208 4.3946 transverse_to 212.1185 -1733.208 4.3946 time $A mode 0
wait $A
0936: set_camera 250.1185 -1733.208 4.3946 position_to 320.1185 -1733.208 10.3946 time $B drop_mode 0
0920: point_camera 212.1185 -1733.208 4.3946 transverse_to 212.1185 -2933.208 15.3946 time $B mode 0
wait $B
0955: end_playing_loaded_soundtrack
02A3: enable_widescreen 0
Camera.Restore
wait 1000
fade 1 2000
wait 4000
0A93: end_custom_thread


Here you go , an exemple of the moving cutscene with an incomplete mission :
DOWNLOAD THE MISSION EXEMPLE

PREVIEW:(This GIF image is laggy)

user posted image

This is not the perfect mission , i just wanted to show you how the moving cutscene works with DYOM .


*****How this works :


-thread 'Movie' : a thread is like a big building with a name ( like the Twins) i called my building Movie , the building holds many levels , the thread is used to organize your project.

- $A = 12000
$B = 32000
$ONMISSION = 0 : Everything that starts with a '$' is a variable , we use variables for easy and fast edit of opcodes , exemple :
****0936: set_camera 212.1185 -1733.208 4.3946 position_to 250.1185 -1733.208 4.3946 time $A drop_mode 0 *****

the variable $A is linked to the time of the camera movement , how much time will the movement take to move from a position to another , you can write a number instead of using a variable like :
**0936: set_camera 212.1185 -1733.208 4.3946 position_to 250.1185 -1733.208 4.3946 time 12000 drop_mode 0 **
time 12000 ===> means that the movement will take 12 secs (12000 ms)
So why did i use $A instead of 12000 ? ===> im too lazy to search for the opcode and then search for the time and then erase ... , so instead , i can edit the time directly from $A = 12000.

Note : $A and $B are variables named by me , you can name it whatever you want ( $timespent , $cameraduration , $rofl ...)

But , $ONMISSION isn't named by me as it is an original variable from GTA San Andreas's main.scm , we cant rename it , the Game will recognize it as a = If the player joined a mission .

Note: Each variable must be given a value that is a number in this case, you cant write : $A = . or $A = blahblah or $A = 12+20 , or $A = $B+$C . the $ONMISSION knows two values , 1 ( The player has just started a new mission ) or 0 (The player is not on a mission). ===> $ONMISSION = 0 is not $ONMISSION == 0 ,
°°we use the double = in the : if $ONMISSION == 0.
°°the single = is used one time when you create a thread , why ? as i said before "Each variable must be given a value".


-:Movie_56 : This is a level of the building , the level begins with a ":", we can jump from a level to another from the balcony using ===> jump @Movie_56

-wait 0 : This one tells the Game to wait 0 ms , then continue to the next opcode , wait 2000 ==> the game will wait 2 seconds.

- if : Obviously means if this or that is true .

- if $ONMISSION == 1 : If the player is on a mission.

-else_jump @Movie_56 : Else (If the player isn't on a mission ) then go back to :Movie_56 and try again ...

-02A3: enable_widescreen 1 : Enables the widescreen mode

-015D: set_gamespeed 1.0 : Sets gamespeed to normal ( 1.0 ) , if the value is under 1.0 , then the game will be in slow motion ( Matrix effect )

-0952: load_soundtrack 13 : loads ( not play ) soundtrack n° 13 of the library , n° 13 is the California knows how to party music .

-0954: start_playing_loaded_soundtrack : Starts playing the soundtrack .

-0936: set_camera 212.1185 -1733.208 4.3946 position_to 250.1185 -1733.208 4.3946 time $A drop_mode 0 : Moves the camera from x y z to a new x y z , the duration is $A and the drop mode is the movement type ( there are 5 drop modes as far as i know )

-0920: point_camera 212.1185 -1733.208 4.3946 transverse_to 212.1185 -1733.208 4.3946 time $A mode 0 : This one sets where the camera must look at .

-fade 1 2000 : fades the screen out.

-wait 4000 : wait 4 secs .
-0A93: end_custom_thread : ends the project





NothingSpecial
  • NothingSpecial

    2spooky4me

  • Members
  • Joined: 22 Nov 2009
  • Indonesia

#2

Posted 30 March 2012 - 10:29 PM

Wow...

Shahonix
  • Shahonix

    Li'l G Loc

  • Members
  • Joined: 09 Nov 2011

#3

Posted 30 March 2012 - 11:40 PM

Good job dude. icon14.gif

IX-MJ-XI
  • IX-MJ-XI

    Creations

  • Members
  • Joined: 31 Jan 2011
  • Philippines

#4

Posted 31 March 2012 - 02:00 AM

How the hell on earth.....

Damn, you've been sent by GOD here to help us with the moving cutscenes!
panic.gif

NothingSpecial
  • NothingSpecial

    2spooky4me

  • Members
  • Joined: 22 Nov 2009
  • Indonesia

#5

Posted 31 March 2012 - 04:04 AM

Man you should help Dutchy and Patrick, too icon14.gif

_Ghost97
  • _Ghost97

    This is 'Nam, baby!

  • Members
  • Joined: 02 Feb 2012

#6

Posted 31 March 2012 - 06:26 AM

Awesome!

KaRzY6
  • KaRzY6

    ♧ Sick Kunt ♤

  • Members
  • Joined: 24 Oct 2011

#7

Posted 31 March 2012 - 06:40 AM

Neat! You, my friend, give great tutorials. And you only just joined!?! Good work biggrin.gif

AnDReJ98
  • AnDReJ98

    Soldier

  • Members
  • Joined: 18 Oct 2011
  • Serbia

#8

Posted 31 March 2012 - 11:03 AM

I'll try to talk with PatrickW and Dutchy3010 about you. You found much mods which should be in a next version!!!
Will use your mods! wink.gif

Rewas514
  • Rewas514

    Derp™

  • The Yardies
  • Joined: 14 Aug 2010
  • Lithuania

#9

Posted 31 March 2012 - 06:28 PM

W.O.W.... I agree with everyone's comments.

Manfred Von Karma
  • Manfred Von Karma

    Trick

  • Members
  • Joined: 16 Jun 2009
  • None

#10

Posted 31 March 2012 - 10:14 PM

Thank you for the replies ...
Next stop ===> How to make some cool sound dialogues with mouth moving .

Canadian Scrotum
  • Canadian Scrotum

    .

  • Members
  • Joined: 23 Sep 2010
  • None

#11

Posted 01 April 2012 - 06:17 AM

Congratulations! icon14.gif

You found what everybody else already found... Oh, wait... It's true! No one else found it yet! Rare for an old game. tounge2.gif

Dutchy3010
  • Dutchy3010

    Female SCM coder!

  • Moderator
  • Joined: 30 Jul 2006
  • Netherlands

#12

Posted 01 April 2012 - 09:33 AM

QUOTE (Secronom President @ Sunday, Apr 1 2012, 08:17)
You found what everybody else already found... Oh, wait... It's true! No one else found it yet! Rare for an old game.  tounge2.gif

Do you really think that nobody found that opcode? wow.gif

I'm sorry to say that the script isn't stable. Never use a global variable in a CLEO script (except the ones used in the original main.scm), it can cause (random) bugs/crashes. It isn't difficult to make a CLEO mod like this, to make it compatible with/integrated in DYOM is far more difficult.

We don't support cleo mods as an add-on to DYOM made by others. We don't want to keep checking the additional cleo scripts. Also, you have to distribute the cleo mod too, else others can't play the mission. And we can't promise that it won't give any conflicts with the DYOM code. Especially when they are messing with variables like $ONMISSION.

I can understand that you all want additional functions, but it's fully at you own risk. We won't allow other cleo mods to be uploaded at the DYOM website.

Manfred Von Karma
  • Manfred Von Karma

    Trick

  • Members
  • Joined: 16 Jun 2009
  • None

#13

Posted 01 April 2012 - 02:31 PM

QUOTE (Dutchy3010 @ Sunday, Apr 1 2012, 09:33)
QUOTE (Secronom President @ Sunday, Apr 1 2012, 08:17)
You found what everybody else already found... Oh, wait... It's true! No one else found it yet! Rare for an old game.  tounge2.gif

Do you really think that nobody found that opcode? wow.gif

I'm sorry to say that the script isn't stable. Never use a global variable in a CLEO script (except the ones used in the original main.scm), it can cause (random) bugs/crashes. It isn't difficult to make a CLEO mod like this, to make it compatible with/integrated in DYOM is far more difficult.

We don't support cleo mods as an add-on to DYOM made by others. We don't want to keep checking the additional cleo scripts. Also, you have to distribute the cleo mod too, else others can't play the mission. And we can't promise that it won't give any conflicts with the DYOM code. Especially when they are messing with variables like $ONMISSION.

I can understand that you all want additional functions, but it's fully at you own risk. We won't allow other cleo mods to be uploaded at the DYOM website.

Yes i know , im not intrested in putting this to your website nor joining any kind of group , im just trying to help mission designers to add something that takes their missions to a new level . So , i will continue puting tutorials .

Dutchy3010
  • Dutchy3010

    Female SCM coder!

  • Moderator
  • Joined: 30 Jul 2006
  • Netherlands

#14

Posted 02 April 2012 - 10:38 AM

Yes, but they have to distribute those CLEO mods too, else people can't play the whole mission. We won't allow any cleo mods uploaded to our website. Then we can't guarantee safety.

And please, make your scripts more stable.

Manfred Von Karma
  • Manfred Von Karma

    Trick

  • Members
  • Joined: 16 Jun 2009
  • None

#15

Posted 02 April 2012 - 12:39 PM

QUOTE (Dutchy3010 @ Monday, Apr 2 2012, 10:38)
Yes, but they have to distribute those CLEO mods too, else people can't play the whole mission. We won't allow any cleo mods uploaded to our website. Then we can't guarantee safety.

And please, make your scripts more stable.

Yes you are right ,i will do my best to improve my scripts ...

Stromae
  • Stromae

    Mi Na Badman

  • Members
  • Joined: 16 Dec 2011
  • Netherlands

#16

Posted 02 April 2012 - 01:40 PM

Morocco, Morocco, Morocco.
Great to see someone from Morocco here smile.gif (even though I live in Belgium tounge.gif )
Awesome mod man icon14.gif




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users