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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Indra Anagram

Pages: 1 [2] 3 4 5
16
Technical forum / Re: Strangest problem ever - registry path sound troubles
« on: December 05, 2017, 09:34:18 PM »
However, when I change the registry path, the sound suddenly only comes from the left channel! When I change back to the previous registry path, the sound comes from both channels again. This happens both with the compiled version and when I start the game from within WME. I'm on Win 8, but tested it on my Win 10 computer too, with the same result. It couldn't possibly be a hardware problem since it only affects my newly created registry paths.

Hey Mikael,

I am sorry for asking this, but why do you need to change the registry path? What are you trying to achieve by doing this?

I am quite new to WME and don't understand much in computers, so I just wanted to know.

17
you need to set the sleep to between 5 and 10 otherwise it will take ages to cross the screen

eborr, I am sorry for asking you about the car entity animation. Have just solved this by setting move.sprite in car.entity by default  :) .

Anyway I don't know how it is possible to make the tree entity appear at its initial position over and over again once your script has run (like in this screen)



and how to make this stop at a given moment. Should the script be modified? Or is it another script?

THANK YOU, eborr!

18
you need to set the sleep to between 5 and 10 otherwise it will take ages to cross the screen

Hey eborr, you did this! The tree runs across the scene behind the car sprite  ;D

However, I had to disable car entity animation (that imitated its movement) in this line

Code: WME Script
  1. car.PlayAnim("entities\car\sprites\move.sprite"); //Set the car in motion

because otherwise your code wouldn't cause the tree entity move.

1. Is that possible to keep both the car entity animation and your script running?
2. Also the tree entity only moved to the right once. How do we cause it return to the initial position and repeat its path across the scene? How do we stop this behavior at a given moment?

to get the KNOSSOS demo

www.svarunentertainment.com

I will download and try the demo, eborr.

THANK YOU for your kind attention and help!

19
Technical forum / Re: Second actor creation and cutscene
« 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!

20

2. Is there a way to kinda lock actors' movement in the x-axis, so that they moved in a straight horizontal line, without swaying up and down in the y-axis? The point is there won't be any depth in my game, everything's pretty flat. Previously I asked this in one of the previous topics and anarchist shared a brilliant idea of making two blocked regions with a narrow walking path between them for actors. Still, sometimes I notice actor sprites do sway up and down a bit within that walking stripe. Is there a code to ban actors from moving in the y-axis at all or is keyboard control with LEFT and RIGHT keys the only way to provide movement in a perfect horizontal line?

Guys, any ideas about the second question?

Thank you for your thoughts and practical experience!

21
Hi eborr!

Not wishing to sound harsh but all you do is to reset the x,y coordinnates for each object within a loop.

You don't sound harsh, not at all - maybe a bit sophisticated  :), but that's the question of your experience in scripting compared to mine.

I added this piece of code to scene_init.script:

Code: WME Script
  1. treebg1.X=0;
  2. while (treebg1.X<800+512)
  3.   {
  4.     treebg1.X = treebg1.X+1;
  5.     Sleep(1000);
  6.   }

However nothing really changed - the treebg1 entity isn't moving anywhere.

Guess the problem is I misunderstand following things:

1. Should background trees be one big entity sprite or separate entities?
2. How exactly do I move the tree entities along the x-axis? What method or command should be used?

You set this up as a script you can call, and invokr it for the duration.

3. I am sorry, could you please provide more details?

If you want to see this in action look at the cars in the background in the K'NOSSOS tutorial.

4. Where could I read or download the tutorial to see the cars in the background?

THANK YOU, eborr!

22
Indra Anagram, please, see image bellow

NAItReIN, I've just changed X and Y values in speaker.entity file and guess what? The subtitle text left its initial position at the top of screen and moved closer to its center! Which means in this method subtitles are completely dependent on the position of entity sprite)))

Without your screen I probably wouldn't have guessed.

 ::rock

Yay! THANKS!!!

23
Indra Anagram, please, see image bellow

Hey NAItReIN!

You never give up, I see!  ;)

BIG THANKS for your enthusiasm in helping beginners like me on this forum.

I have looked at your screenshot. As I far as I can tell, it contains
Quote
on "LeftClick"
, so in order to see that subtitle a player must use a mouse. See, my initial point was a scene with voice and text that sound and appear while the game is not interactive. Automatically you might say)

Have made some changes to the code of speaker.script according to your lines in the screenshot, however it changed nothing. The thing is just stuck up there at the top!

And... what do we do with this?

Code: WME Script
  1. var entSpeaker = Scene.LoadEntity("entities\speaker\speaker.entity");
  2. entSpeaker.Talk("THANK YOU, NAItReIN!", "1.3.ogg");


I mean LeftClick thing and invisible speaker.

You and anarchist are my heroes whatever  ::thumbup

24
Hi anarchist!

Sorry, there was some issue with the .window file on my side - once I opened it in the Notepad after WindowEdit, WindowEdit refused to re-open it ('unsupported file format').

It seems everything works fine now.

First, the sound file was playing over and over again, till I found Looping parameter in the Documentation and set it to "false". So, now it plays once, just like it should.

I've got a question, though... What if I have a long text that is better to show sentence by sentence on screen (in this window?). What do I change in the code or files? Do I create a new window for each sentence and sound file? Or is there a way to "erase" first sentence within the same window and play another sound file at the same time? What was your background in that regard? Please, share your thoughts.

I tried your and NAItReIN's advice - both worked. NAItReIN's decision seems more flexible and logical in function (changing text sentence by sentence, for instance), but yours succeeded in terms of design. Plus I had some new experience with creating windows))

THANK YOU, anarchist!

25
Now it should works fine  :)

Hey NAItReIN, the error's gone! However, the text is still glued to the top of screen. Sorry, I don't know what's the reason.

THANK YOU for your help!

26
Hey NAItReIN,

You should use Talk method. See what does documentation say:

Talk(Text, SoundFilename, Duration, TalkStances, TextAlignment)
TalkAsync(Text, SoundFilename, Duration, TalkStances, TextAlignment)

Makes the object talk.
Parameters :

Text

A text to be used as a talk subtitle

SoundFilename
A filename of a sound file to be used (oprtional, default is no sound)


The good news is once I added a comma and the name of a sound file to this line:

Code: WME Script
  1. entSpeaker.Talk("Hi Indra Anagram, how are you today?", "1.3.ogg");

the sound file started playing while the text is on screen. THANK YOU!

As for this:

Code: WME Script
  1. #include "scripts\base.inc"
  2. this.SubtitlesPosRelative = false;
  3. this.SubtitlesPosX = 250;
  4. this.SubtitlesPosY = 500;
  5. this.SubtitlesWidth = Game.Width - 100;
  6. this.SubtitlesPosXCenter = center.

there were some issues.

First, I got the following error in Debugging console:

Quote
11:56:33:  Compiling script 'entities\speaker\speaker.script'...
11:56:33:    Error@line 7: syntax error

I thought maybe the problem was in the period, changed '.' to ';' and the error@line7 disappeared, but a new one showed up:

Quote
11:57:28:  Compiling script 'entities\speaker\speaker.script'...
11:57:28:    Error@line 6: Variable 'center' is referenced but not defined

And this code does not change anything - the text has default position at the top of screen  :) I played with it commenting out line by line and changing 'false' to 'true', but it didn't cause the text move to the positions we wanted.

Any ideas what could be the reason? And how to eliminate error@line 6?

THANKS!

27
Hello, NAItReIN!

I am sorry it took me so long to answer your message. I created an invisible entity, just like you wrote and it worked. As I run the scene, text appears at the top of screen. However, I've got two questions:

SubtitlesPosRelativeSpecifies whether the SubtitlesPosX and SubtitlesPosY attributes are relative to default position, or absolute screen coordinates
SubtitlesPosXThe X position of speech subtitles (either relative to speaker's position or absolute screen coordinates)
SubtitlesPosYThe Y position of speech subtitles (either relative to speaker's position or absolute screen coordinates)
SubtitlesWidthWidth of speech subtitles. Set to zero to restore the default behavior.
SubtitlesPosXCenterSpecifies if the SubtitlesPosX attribute affects the center of the subtitle or its left side.
For futher information see WME Documentation, section Scripting in WME, Script language reference and at last Entity object.

1. Where do I specify SubtitlesPosX etc.? What file should it be in?
2. How do I play the voice file at the same time with the text being on screen?

THANK YOU, NAItReIN! You and anarchist are amazing. Seriously, guys.

28
Hey anarchist!

I am sorry for being slow with reply.

In scene_init.script

Code: WME Script
  1. Game.Interactive = false;
  2. var YourWindow = Game.LoadWindow("interface\YourWindow\YourWindow.window");
  3. YourWindow.Center();
  4. Game.FadeIn(2000);
  5.  

I created a window that covers the whole screen and followed every step of your detailed advice. The only problem I encountered was YourWindow.Center(); line. As Debugging console says:

Quote
0:42:19:  Maximum texture size: 4096x4096
0:42:19:  Engine initialized in 81 ms
0:42:19: 
0:42:20:  'WINDOW' keyword expected.
0:42:20:  Error parsing WINDOW file 'interface\YourWindow\YourWindow.window'
0:42:20:  Runtime error. Script 'scenes\Text1\scr\scene_init.script', line 30
0:42:20:    Call to undefined method 'Center'. Ignored.

What is the function of 'Center' in this code? How do I define it?

THANK YOU for your kind help, anarchist!

29
Hey Wintermute community!

I searched through this forum and only found partial answers to my questions, that is why I decided to ask them here, in the new topic.

1. What is the easiest and smoothest way to create a scene with just text on screen and voice behind, maybe with some background image or just against black screen? I found an advice about making a text window and then unloading it, but what about text AND voice (talk)?

2. Is there a way to kinda lock actors' movement in the x-axis, so that they moved in a straight horizontal line, without swaying up and down in the y-axis? The point is there won't be any depth in my game, everything's pretty flat. Previously I asked this in one of the previous topics and anarchist shared a brilliant idea of making two blocked regions with a narrow walking path between them for actors. Still, sometimes I notice actor sprites do sway up and down a bit within that walking stripe. Is there a code to ban actors from moving in the y-axis at all or is keyboard control with LEFT and RIGHT keys the only way to provide movement in a perfect horizontal line?

What do you think? Maybe someone has already solved such things in their games?

THANK YOU for your ideas and experience!
 

30
For example, the trees would be "recyclable" entities, that move from right to left, and when they're off screen, they skip back all the way to the right and then move through the screen again. Same for the fog, houses etc.

Basically you'd need just one script, that would move it's owner entity by decreasing its X position, and if X is lower than some threshold, it would increase it again and repeat the process.

Dear Muties,

I've created a project called "Vehicle" and a scene called "Car" to achieve a rough replica of the scene from the original post here. All entities are loaded in the scene and the car entity has a simple animation of "movement" (smoke and mirrors, just like Mnemonic said  :)). Now I am stuck, because of several questions:

1. How should this scene be organized in terms of levels? In "Car" there are currently two layers: one for background2 (background image itself) and main for floor region and all entities. The idea is to mimic car movement by loading and moving trees and house in the background (behind the car) in the x-axis from left to right. I guess later the third level - for foreground trees - could be added, however the floor region can be only on the main layer. So, how do I organize the layers?

2. As you can see in the screen below, currently tree entities overlap the car entity, since all entities are loaded on the same layer. Is there a way to solve this and make the car entity overlap and cover everything that is "behind"?



3. I haven't found any info in the Documentation about scripting moving entities and the OldGuy entity in the demo project is pretty much static, so... How do I move tree and house entities in the x-axis? Looked through "Scene object" and "Entity object" sections in the Scripting reference, yet didn't come up with something like "GoTo" analog for entities. I am pretty bad at understanding scripts. Mnemonic replied me there should be basically one script. The problem is I seemingly understand the principle, yet cannot specify that with appropriate commands in the form of a working condition. My guess was something like this:

Code: WME Script
  1. while(treebg1.X>=1200)
  2. {
  3.  
  4. }

but I don't know if this will be right and again, what method, command or parameter should I use to move entities?

I disabled actor as Game.MainObject and erased Molly's lines from game.script. Should I make the car entity Game.MainObject now?

So many questions and I've tried different approaches for 2 - 3 days. Please help me with this scene, guys! After all, such things are pretty common for adventure games, and I think others might need it too. We could add it to the free resources section when it's ready.

Here are links to the source files. I've had some issues with Dropbox recently, so I made both zip and rar archives of same scene:

https://www.dropbox.com/s/1ykixggujdcd5xv/Vehicle.rar?dl=0
https://www.dropbox.com/s/5sjcz5isg5kj40m/Vehicle.zip?dl=0

THANK YOU for your kind attention and friendly advice!

Pages: 1 [2] 3 4 5

Page created in 0.071 seconds with 22 queries.