Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Pages: 1 2 [All]

Author Topic: Second actor creation and cutscene  (Read 14755 times)

0 Members and 1 Guest are viewing this topic.

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Second actor creation and cutscene
« on: November 09, 2017, 11:11:38 AM »

Hey Wintermute community,

I am really excited with the chance to finally explore WME and try making the 2D game demo. However, since I am still new to the engine and particularly scripting, I get stuck every now and then. Have got three questions and will try to explain them in a brief and clear way.

This time I tried to add second character named Sally into my scene following WME tutorial. Here is what I did:

1. In "actors" folder created "sally" subfolder and copied files from "molly"
2. In "sally" subfolder renamed "molly.actor" to "sally.actor" and "molly.script" to "sally.script"
3. Opened "molly.actor" file and changed the beginning this way:

Code: [Select]
ACTOR
{
  NAME = "sally"
  CAPTION="Sally"
  SCALABLE = TRUE
  INTERACTIVE = TRUE
  X = 460
  Y = 400
  SCRIPT="actors\sally\sally.script"

Also changed the subfolder name in "sally.actor" from "molly" to "sally" everywhere in animations (idle, walk, talk etc.).

4. Opened "data\scripts\base.inc" and added this:

Code: [Select]
global molly;
global sally;

5. Opened "game.script" and added new lines. Now the script looks this way:

Code: [Select]
// load our main actor
actor = Game.LoadActor("actors\molly\molly.actor");
Game.MainObject = actor;
// load our main actor
molly = Game.LoadActor("actors\molly\molly.actor");
sally = Game.LoadActor("actors\sally\sally.actor");
actor = molly;
Game.MainObject = actor;

6. Opened "data/scenes/Room/scr/scene_init.script" and added lines about Sally with her position coordinates from SceneEdit:

Code: [Select]
#include "scripts\base.inc"

// here comes the stuff which initializes the scene

actor.SkipTo(206, 582);
actor.Direction = DI_RIGHT;
actor.Active = true;

sally.SkipTo(288, 575);
sally.Direction = DI_RIGHT;
sally.Active = true;

However, when I run the game, I get this:



As you can see, the main actor (silhouette that is turned to the right) is there and she can move, alright. Sally, which is the silhouette that is facing us, is there too, and she doesn't move. However, there is a third actor that has Molly's graphics, is turned left and floats in the air. How do  I get rid of her? What is wrong?

My second question is - Can the floor (walking area) have only two vertices? Because I'd like actors to only move left and right in a staight line, without any depth, yet currently the main actor changes her track a bit within the walking zone (floor). This change of course is very slight, but still... not in a straight line.

The third question is about actors again. I want them to talk with each other and move together to the right in a cutscene. How is it possible to create such cutscene animation? Sally, the second actor in the scene, does not move. Shall I make individual floor for her? Am I right?

Please share your experience in this regard!

THANK YOU very much for your kind help!

P.S. The opportunity to make games is breathtaking. THANK YOU, Mnemonic!
« Last Edit: November 09, 2017, 11:16:16 AM by Indra Anagram »
Logged
Owls are not what they seem...

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Re: Second actor creation and cutscene
« Reply #1 on: November 09, 2017, 05:32:30 PM »

Well, I have solved #1! It seems there were certain lines in "game.script" that I should have removed from the file:

Code: [Select]
// load our main actor
actor = Game.LoadActor("actors\molly\molly.actor");
Game.MainObject = actor;

At least at the moment there is no any 3rd actor floating in the air. Just main actor and Sally.

As for question #2, I tried to remove two vertices of the floor region, but only managed to erase one. Then I recalled this information from WME Documentation:

Quote
Regions must have at least three vertices.

This is useful to keep in mind, but it doesn't answer my question, though... How do I get actors in the scene to move left and right in a straight line, without sliding up and down within the floor region? Could waypoints be the solution?

And #3 remains as something I am currently not able to find solution for. How exactly is it possible to create a cutscene as in-built sequence in the scene? Like two characters talk and then Sally walks to the right and main actor follows her. 

Big Thanks to anyone, who finds time and knowledge to help me!
Logged
Owls are not what they seem...

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Second actor creation and cutscene
« Reply #2 on: November 09, 2017, 10:44:20 PM »

#2:
You have created walking regions. Maybe you have noticed that you can also create a block region (just create a region and in the options set it as Blocked). Perhaps you can create your walking region and set it up around the floor and then create two very thin horizontal blocking regions around the area you want your actor to move. I guess the area must be very small to completely avoid the actor going up and down.

I am not  sure whether you can achieve this with waypoints.

#3:
There is not eaxctly a built-in cut-scene mechanism in Wintermute, because a cut-scene, if it is not a video, is just commands executed in sequence with the user having no control. What I mean is that you can simply code your cut-scene any way you want.

The secret to achieve this is to simply do the following:
Code: WME Script
  1. Game.Interactive = false;
  2.  
This piece of code will remove the control from the user. You can code your cut-scene after this command and the use this:
Code: WME Script
  1.  
to give back control to the user.
Logged

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Re: Second actor creation and cutscene
« Reply #3 on: November 11, 2017, 12:17:50 AM »

Hey anarchist!

Hearty THANKS to you for your attention and friendly advice!  ::thumbup

#2
I have created two horizontal blocking regions around the area the actor moves. It took some fine-tuning, yet in the end the actor could walk in more or less straight line. You were right about the move area being pretty narrow. I think this part is solved now.

#3
Quote
is just commands executed in sequence with the user having no control. What I mean is that you can simply code your cut-scene any way you want

You got it right! This is exactly what I meant (sorry, I am not a native English speaker), but wasn't able to express in proper terms. Yes, coded actors' actions with temporary lack of interactivity for the player))

Look, I came up with the following content for scene_init.script after several hours of looking at WME 2D demo files. It seems to work, however I don't know if the script is syntactically correct (if it is clean) and if something must be erased here...

Also how do I set speed of replies (time between actors' sentences)?

Code: WME Script
  1. #include "scripts\base.inc"
  2.  
  3. // here comes the stuff which initializes the scene
  4.  
  5. actor.SkipTo(183, 578);
  6. actor.Direction = DI_RIGHT;
  7. actor.Active = true;
  8.  
  9. sally.SkipTo(260, 576);
  10. sally.Direction = DI_RIGHT;
  11. sally.Active = true;
  12.  
  13. ////////////////////////////////////////////////////////////////////////////////
  14. // scene state
  15. global StateRoom;
  16.  
  17.  
  18. // default values
  19. if(StateRoom==null)
  20. {
  21.   StateRoom.Visited = false;
  22.   // add scene states here
  23. }
  24.  
  25.  
  26.  
  27. ////////////////////////////////////////////////////////////////////////////////
  28. // setup scene according to state variables
  29. if(StateRoom.Visited==false)
  30. {
  31.   Game.Interactive = false; // We remove the control from the user.
  32.   Sleep(3000); // Wait for three seconds before Sally says her line.
  33.   sally.Talk("Have you ever played billiard?"); //Sally asks her question.
  34.  
  35.   // and let the dialogue begin
  36.   SallyDialogue();
  37.  
  38.   StateRoom.Visited = true;
  39.   Game.Interactive = true;
  40. }
  41.  
  42. ////////////////////////////////////////////////////////////////////////////////
  43. function SallyDialogue()
  44. {
  45.   var Responses;
  46.   var Selected;
  47.  
  48.   var Loop = true;
  49.  
  50.   while(Loop)
  51.   {
  52.     // prepare the sentences
  53.     Responses[0] = "Yes, I have.";
  54.     Responses[1] = "Maybe...";
  55.     Responses[2] = "No, I haven't.";
  56.     Responses[3] = "Can I leave?";
  57.  
  58.     // fill the response box
  59.     Game.AddResponse(0, Responses[0]);
  60.     Game.AddResponse(1, Responses[1]);
  61.     Game.AddResponse(2, Responses[2]);
  62.     Game.AddResponse(3, Responses[3]);
  63.  
  64.     // let the player choose one
  65.     Selected = Game.GetResponse();
  66.  
  67.     // let the actor say the selected sentence
  68.     // (that's why I use the array for storing the sentences)
  69.     actor.Talk(Responses[Selected]);
  70.  
  71.     // now let Sally reply depending on the selected sentence
  72.     if(Selected==0)
  73.     {
  74.       sally.Talk("Great, let's play.");
  75.       actor.Talk("You're gonna lose.");
  76.     }
  77.     else if(Selected==1) sally.Talk("What does it mean? Your answer is kinda vague.");
  78.     else if(Selected==2)
  79.     {
  80.       sally.Talk("It's never late to learn.");
  81.       actor.Talk("I am too old for that.");
  82.     }
  83.     else if(Selected==3)
  84.     {
  85.       sally.Talk("I've swallowed the key. You can't leave.");
  86.       Loop = false; // we want to end the dialogue
  87.     }
  88.   }
  89. }
  90.  
  91. //Here my corrections to the scene end.
  92.  
  93.  
  94. ////////////////////////////////////////////////////////////////////////////////
  95. if(!StateRoom.Visited)
  96. {
  97.   StateRoom.Visited = true;
  98.  
  99.   // this is our first visit in this scene...
  100. }
  101.  
  102.  

My intention for this scripted cut-scene has been:

Step 1) In 3 seconds from the game start Sally asks main actor if she ever played billiard
Step 2) Several reply options appear at the bottom of screen and main actor can choose between those
Step 3) Dialogue


It seems, with your help, steps 1 - 3 are achieved. But I don't know yet how do I get other 4 steps working... Since one animation changes another, my guess was PlayAnimAsync() should be applied... Am I right?

Step 4) Sally goes to the right, main actor follows her and the scene scrolls with them

Should I use following script here?

Code: WME Script
  1. actor1.GoToAsync(X, Y);
  2. Sleep(1000);
  3. actor2.GoToAsync(X, Y);
  4. Sleep(1000);

Step 5) They both stop where the floor (walking area) ends

Can it be achieved with simple GoToObject?

Step 6) Actor 3 is visible now. He makes a simple movement (sprite animation I guess) and says his scripted line
Step 7) The screen scrolls further to the right and we see Actor 4. He replies Actor 3, and the screen returns to previous position, hiding Actor 4 and showing main actor, Sally and Actor 3.

Have got absolutely no ideas how the last step could be achieved :-\

Pretty much long scripted cut-scene you might say. Please don't be angry - I am SOOO excited with what Jonathan Boakes could make with WME. My game demo is 2D, yet I see making it is no way easier than 2.5D game production...

THANK YOU for your help, anarchist!
« Last Edit: November 11, 2017, 12:30:56 AM by Indra Anagram »
Logged
Owls are not what they seem...

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Second actor creation and cutscene
« Reply #4 on: November 11, 2017, 01:11:29 AM »

About the scrolling, I don't know how much you have learned so far. I haven't used scrolling in my game. I suggest that you take a look at the basics if you are not certain:

http://docs.dead-code.org/wme/inside_scenes_step1.html

Search for
Quote
OK, when we tested the scene, it didn’t scroll, right? Let’s fix it.
And make sure you follow the rules of scrolling, which is setting the main layer dimensions to be larger than the game's resolution.

Apart from that, in order for the actor to move beyond the edge and for scrolling to start, you have to extend your floor region to the whole scene. Furthermore, you can force the scene to scroll by using Scene.ScrollTo() or Scene.SkipTo().

For reference to the possible commands for each entity type, I suggest that you go to http://docs.dead-code.org/ and go to Scripting in WME -> Script language reference and always have it available for reference. I use the online documentation because I can use the Chrome's search functionality to quickly find what I want.

For Step 4 It seems you have the right idea here. Some testing will help you with the timings i.e. how much you Sleep().

Finally, for my cutscenes I used PlayAnim instead of PlayAnimAsync because, since it is a cutscene, I want the game to continue only after the animation has finished. For instace:

Code: WME Script
  1. actor1.PlayAnim('anim1');
  2. actor1.PlayAnim('anim2');
  3.  

will result to actor1 doing anim1 and after the animation is finished he does anim2. This should apply to two different actors, though I haven't tried this in my game:

Code: WME Script
  1. actor1.PlayAnim('anim1');
  2. actor2.PlayAnim('anim2');
  3.  

For new actors you can use Scene.LoadActor(). This will create actors that will appear only in this scene. From what I see, actor and sally must have been loaded in game.script, using the command Game.LoadActor() which creates actor visible in every scene.
Logged

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Re: Second actor creation and cutscene
« Reply #5 on: November 11, 2017, 08:41:11 PM »

Hey anarchist!

Great insights/pieces of advice! THANK YOU for such detailed recommendations.

You wrote:

Quote
About the scrolling, I don't know how much you have learned so far. I haven't used scrolling in my game. I suggest that you take a look at the basics if you are not certain:

http://docs.dead-code.org/wme/inside_scenes_step1.html

And make sure you follow the rules of scrolling, which is setting the main layer dimensions to be larger than the game's resolution.

I already made this in the very beginning, because my background image is 2347 X 600 and yes, I was following the lesson that you recommended. Whenever the main actor walks to the right, the scene scrolls perfectly, yet you understood this wasn't the objective this time:

Quote
Apart from that, in order for the actor to move beyond the edge and for scrolling to start, you have to extend your floor region to the whole scene. Furthermore, you can force the scene to scroll by using Scene.ScrollTo() or Scene.SkipTo().

I needed the actor to stop, actor 3 (let's call him "guy") makes a simple animation, says his words and then the scene scrolls sidewards on its own, as if camera was moving to the right without the actor walking there.

I found the method that you kindly told me about - Scene.ScrollTo() in Script Language Reference, however neither Documentation nor WME Book Online contained any examples of its practical use. Script Langeage Reference -> Scene object says:

Quote
ScrollTo(X, Y)
ScrollTo(Object)
ScrollToAsync(X, Y)
ScrollToAsync(Object)

Scrolls the scene to the given point / object.
Parameters
X
X coordinate of the target scroll position
Y
Y coordinate of the target scroll position
Object
An object (actor/entity) to be used as a new target scroll position
Remarks
The Scene.AutoScroll attribute must be set to true for this method to work. ScrollTo method blocks the script execution until the scrolling is over, while the ScrollToAsync method returns immediately.

I don't quite understand what the code could look like  :-\ Can you please share your ideas on this method? Step 7 is all about this scroll. Should I use actor 4 as Object parameter? Is that possible? Maybe guy.Talk triggers this scrolling?

As for other custscene steps:

Step 4) Sally goes to the right, main actor follows her and the scene scrolls with them
Step 5) They both stop where the floor (walking area) ends
Step 6) Actor 3 is visible now. He makes a simple movement (sprite animation I guess) and says his scripted line

It looks like these are achieved. Modified scene_init.script. Please view this script:

Code: WME Script
  1. // setup scene according to state variables
  2. if(StateRoom.Visited==false)
  3. {
  4.   Game.Interactive = false; // We remove the control from the user.
  5.   Sleep(3000); // Wait for three seconds before Sally says her line.
  6.   sally.Talk("Have you ever played billiard?"); //Sally asks her question.
  7.  
  8.   // and let the dialogue begin
  9.   SallyDialogue();
  10.  
  11.   //Sally and actor go to the right
  12.   sally.GoToAsync(800, 576);
  13.   Sleep(1000);
  14.   actor.GoToAsync(750, 578);
  15.   Sleep(2000);
  16.  
  17.   //4 seconds before Guy's animation, so that actor and Sally had enough time to get there.
  18.   Sleep(4000);
  19.  
  20.   //Guy makes his simple movement, waits for 2 seconds and asks a question.
  21.   guy.PlayAnim("actors\guy\play\play.sprite");
  22.   Sleep(2000);
  23.   guy.Talk("So, what's up?");
  24.  
  25.  
  26.   StateRoom.Visited = true;
  27.   Game.Interactive = true;
  28. }
  29.  
  30.  

PlayAnim worked like magic! Brilliant idea of yours, anarchist.

Earlier in the code, right after loading actor and sally, I loaded guy (actor 3). Have I done it correctly?

Code: WME Script
  1. //load Guy
  2. guy = Scene.LoadActor("actors\guy\guy.actor");
  3. guy.SkipTo(953, 536);
  4. guy.Direction = DI_DOWN;
  5. guy.Active = true;

I have a problem with guy and billiard table, though. The table is an entity on a separate layer and it has parallax effect. In the screen below you can see it overlaps guy. I see the guy sprite must be a bit bigger, but it would be better if the cue was over the table, not behind it, lol) I don't know how to make this either.



Honestly, without your help I wouldn't have managed a thing.
« Last Edit: November 11, 2017, 08:43:03 PM by Indra Anagram »
Logged
Owls are not what they seem...

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Re: Second actor creation and cutscene
« Reply #6 on: November 13, 2017, 10:54:59 AM »

Furthermore, you can force the scene to scroll by using Scene.ScrollTo() or Scene.SkipTo().

anarchist, I added this to scene_init.script:

Code: WME Script
  1.   //load husband
  2.   husband = Scene.LoadActor("actors\husband\husband.actor");
  3.   husband.SkipTo(1541, 535);
  4.   husband.Direction = DI_LEFT;
  5.   husband.Active = true;
  6.  
  7.   Scene.AutoScroll = true; //The scene can scroll automatically.
  8.   Scene.SkipTo(husband); //Scroll the scene to husband.

The reason for Scene.SkipTo() is that Scene.ScrollTo() does not work at all. With Scene.ScrollTo() everything freezes without any change. However, Scene.SkipTo causes view to jump to "husband" and then slowly scrolls to the left till we see three previous actors again  ;D While it is supposed to be vice versa: from those three actors the view should slowly scroll to "husband".

I don't know how to fix this... Guess Scene.SkipTo() is not what I need, but Scene.ScrollTo() does not work... Or I write something in a wrong way ((

Please help me to solve this. And a question from my previous post about the "table" entity overlapping "guy" actor is still open.

THANK YOU for your advice!
Logged
Owls are not what they seem...

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Second actor creation and cutscene
« Reply #7 on: November 18, 2017, 03:42:01 PM »

I haven't used scrolling in my scenes so I will try to help you a bit blindly.

From the documentation I can see that:

Quote
Scene.Autoscroll: Specifies whether scene automatically scrolls to the Game.MainObject

By default, in game.script you will find the following line:

Code: WME Script
  1. Game.MainObject = actor;
  2.  

So it makes sense that, when you set Game.Autoscroll = true the scene scrolls toward the main actor. Also from the documentation:

Quote
MainObject: The object which is used for the scene's auto scrolling, can be (set to) null

So it can be set to null. Perhaps this would work?

Code: WME Script
  1. Scene.ScrollTo(husband);
  2.  

After you have done the scrolling and dialogue etc. I think you will want to:

Code: WME Script
  1. Scene.AutoScroll = false;
  2. Game.MainObject = actor;
  3.  

As I said above, I am working blindly, but from what I read in the documentation, the behaviour you observe does make sense, so I think this will work.
Logged

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Re: Second actor creation and cutscene
« Reply #8 on: November 18, 2017, 07:12:08 PM »

As I said above, I am working blindly, but from what I read in the documentation, the behaviour you observe does make sense, so I think this will work.

Yes, anarchist, the code that you came up with works perfectly!  ::rock
The whole scene now scrolls to "husband" actor smoothly. Do you happen to know if it is possible to speed up scrolling speed? Or it is not a changeable feature?

You were helping me *blindly*, without any use of scrolling in your project, wow! I am so impressed and sooo grateful to you!

THANK YOU, anarchist! You and NAItReIN are my heroes. Without you, guys, I don't know how I'd even crack all this scripting. Guess this is the pure question of experience.
Logged
Owls are not what they seem...

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Second actor creation and cutscene
« Reply #9 on: November 18, 2017, 10:43:01 PM »

I don't have any special talents, I simply have been working as a professional programmer for years (and on Wintermute for some years too), which among other things gives you the ability to find solution to your problems through searching (either the documentation or the Internet in general). As you said, it is a matter of experience.  8)

Scroll speed is an attribute of the Scene object. From the documentation http://docs.dead-code.org/wme/generated/scripting_ref_scene.html:

Quote
ScrollSpeedX: Horizontal scrolling speed (in milliseconds, default=10)
ScrollSpeedY: Vertical scrolling speed (in milliseconds, default=10)
ScrollPixelsX: Horizontal scrolling shift (in pixels, default=1)
ScrollPixelsY: Vertical scrolling shift (in pixels, default=1)
OffsetX: Current horizontal scrolling offset of the scene
OffsetY: Current vertical scrolling offset of the scene

You can play with these to get what you want.

What goes around comes around. This forum helped me a lot in my game, so I am simply returning the kindness I received. Kindness breeds kindness, I am sure you will do the same some day.
Logged

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Re: Second actor creation and cutscene
« Reply #10 on: November 19, 2017, 02:28:25 PM »

Hey anarchist!

You can play with these to get what you want.

I've played with ScrollSpeedX and managed to change the speed of scrolling, however an error appeared in Debugging console and wme.log:

Quote
19:10: Runtime error. Script 'scenes\Room\scr\scene_init.script', line 73
19:10:   Call to undefined method 'ScrollSpeedX'. Ignored.

The code looks this way:

Code: WME Script
  1. 70. Game.MainObject = null;
  2. 71. Scene.AutoScroll = true; //The scene can scroll automatically.
  3. 72. Scene.ScrollSpeedX = true; //The scene can scroll horizontally.
  4. 73. Scene.ScrollSpeedX(20); //Set scrolling speed to 20 ms.
  5. 74. Scene.ScrollTo(husband); //Scroll the scene to husband.

What does "undefined method" mean? Isn't Scene.ScrollSpeedX a default method in the engine? The scene works just like I wanted, except for this error message  :(

What goes around comes around. This forum helped me a lot in my game, so I am simply returning the kindness I received. Kindness breeds kindness, I am sure you will do the same some day.

You are right, anarchist. I just hope that some day I'll be experienced enough to help someone on this forum just like you do.

THANK YOU!
« Last Edit: November 19, 2017, 02:30:05 PM by Indra Anagram »
Logged
Owls are not what they seem...

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Second actor creation and cutscene
« Reply #11 on: November 19, 2017, 10:39:39 PM »

Scene.ScrollSpeedX is an attribute, not a method. You get the error because you try to use it as a method:

Code: WME Script
  1. Scene.ScrollSpeedX(20); //This is wrong
  2.  

also, you have to set its value to an integer, so this is also wrong:

Code: WME Script
  1. Scene.ScrollSpeedX = true; //You assign a boolean value instead of an integer.
  2.  

a correct use would be:

Code: WME Script
  1. Scene.ScrollSpeedX = 20; //Default is 10, so this will make the scene scroll faster.
  2.  
Logged

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Re: Second actor creation and cutscene
« Reply #12 on: November 20, 2017, 08:18:43 PM »

Scene.ScrollSpeedX is an attribute, not a method. You get the error because you try to use it as a method

Hey anarchist, that's true! I got misguided with "Call to undefined method 'ScrollSpeedX'. Ignored" message in Debugging console))

a correct use would be:

Code: WME Script
  1. Scene.ScrollSpeedX = 20; //Default is 10, so this will make the scene scroll faster.
  2.  

Once I corrected scene_init.script with your piece of code, the scene started playing without any errors! Yay!  ;D

The funny thing is I used to think setting Scene.ScrollSpeedX to 20 instead of the default 10 will speed up scrolling)) While it's vice versa - reduction of the integer makes the scene scroll faster. I set the attribute's value to 2.

The "cut-scene" as scripted sequence looks exactly like I wanted it to be, anarchist!

THANK YOU!!! Wish I could help other beginners like you do some day. What if we offer scene auto-scrolling as a tutorial for WME Knowledge base? I think this feature is quite frequent for adventure games. What do you think?
Logged
Owls are not what they seem...

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Second actor creation and cutscene
« Reply #13 on: November 20, 2017, 08:37:57 PM »

Quote
What if we offer scene auto-scrolling as a tutorial for WME Knowledge base? I think this feature is quite frequent for adventure games. What do you think?

That sounds like a wonderful idea! I am afraid you will have to do it on your own though since I don't have enough time to contribute.
Logged

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Re: Second actor creation and cutscene
« Reply #14 on: December 03, 2017, 02:39:59 PM »

That sounds like a wonderful idea! I am afraid you will have to do it on your own though since I don't have enough time to contribute.

Hey anarchist! The tutorial based on your advice is now available in "How-to" articles in Knowledge Base. You can find it here http://res.dead-code.org/doku.php/kbase:how_to_make_scene_auto-scrolling_in_wintermute_engine.

Please kindly view it and tell me if something is incorrect or vague (I want beginners like me get a clear guide).

THANK YOU!
« Last Edit: December 03, 2017, 03:48:24 PM by Indra Anagram »
Logged
Owls are not what they seem...

NAItReIN

  • Occasional poster
  • **
  • Karma: 1
  • Offline Offline
  • Posts: 69
    • View Profile
Re: Second actor creation and cutscene
« Reply #15 on: December 04, 2017, 07:16:07 PM »

Quote
Hey anarchist! The tutorial based on your advice is now available in "How-to" articles in Knowledge Base. You can find it here http://res.dead-code.org/doku.php/kbase:how_to_make_scene_auto-scrolling_in_wintermute_engine.
Great article!  :)
Logged

Indra Anagram

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 74
  • Periodical returnee
    • View Profile
Re: Second actor creation and cutscene
« Reply #16 on: December 05, 2017, 09:36:07 PM »

Great article!  :)

Hey NAItReIN!

THANK YOU for your kind words! Btw I sent you a personal message with a question. Please kindly view it and tell me what you think.  ;)
Logged
Owls are not what they seem...
Pages: 1 2 [All]
 

Page created in 0.077 seconds with 24 queries.