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.

Topics - Pelrock

Pages: [1]
1
Technical forum / Divide the game code in parts
« on: December 26, 2011, 04:42:27 PM »
Hi all and happy christmas,

I´d like to know if there is a method when programming a game in WME to clean up the script so it is possible to divide the game in parts or acts, which would be very helpful to organize the script. Some kind of "reset". (Or even compile the game in parts...)

In my case, I have reached a point where the puzzles are solved in the first part, and now the character need to solve new problems on the same scenaries.

But I found myself filling the old scripts and adding more things, and it can get very confused...

I couldn´t find anything on the forum, but if someone have read about this before, please could you le me know,

Many thanks

2
Technical forum / Scripting - Return from a non interactive scene
« on: December 26, 2011, 03:04:20 PM »
Hi,

I´m developing the code of my adventure and I need some help if someone knows how to do this:

Quote
The character picks up a piece of paper. Then he goes into the inventory to check it. When he right clicks on the object, it takes him to another scene, non interactive, where he can only move the mouse and highlight the text to see the paper in detail.
When he finish to look at it he can leave the scene by clicking out of the image.

I´ve figured out how to bring him to the scene, but not how to return.

How can I save the character position to return to the previous scene? So after checking the paper he can return to where he was before.

The idea is that you can check this paper anywhere, anytime during the game.

I´ve got the three scripts for the moment:

      - The script of the paper on the inventory, paper.script    /// It takes him to the other scene throught this  "Game.ChangeScene("Scenes/paper_detail.scene");

      - The script of the scene, scene.init.script                    /// I´ve got hidden the character and set up the interactive regions
      - The script of the region inside the scene to leave, exit_scene.script   /// What should I use to return?


Any help would be much appreciate it,
many thanks

3
Technical forum / Scripting help - declaring variables
« on: December 23, 2011, 01:52:56 AM »
Hi all,

It´s been a long time since the last time I posted something on the forum. I have just downloaded the last version of Wintermute, and I have to say, really, congratulations for this outstanding piece of software. My grattitude forever, Mnemonic.

I´m having some issues developing the script of my game, as I haven't got much knowledge of programming. I reached a point where things are not behaving as expected... if someone could help me out, here´s my question:

I´ve got this script structure (it´s an example of one of many I have already in the game):

////////////////////

Code: WME Script
  1. [code=script][code=script]global myvariable
  2.  
  3. function actorDialogue()
  4. {
  5.         if (myvariable == 0)
  6.         {
  7.            actorDialogue1();
  8.         }
  9.         else if (myvariable == 1)
  10.         {
  11.                actor.Talk("Hello World");
  12.                actorDialogue2();
  13.         }
  14.         else if (myvariable == 2)
  15.         {
  16.                actor.Talk("Hello again");
  17.                actorDialogue3();
  18.         }
  19.         else if (myvariable == 3)
  20.         {
  21.                actor.Talk("At last!");
  22.                actorDialogue4();
  23.         }
  24.         else if (myvariable == 4)
  25.         {
  26.                actor.Talk("The End");
  27.              
  28.         }
  29. }
  30.  
[/code][/code]


///////////////////////////////////////////////////

The variable I have declared is working in every case, it is being change by another character of the game, after a couple of actions (myvariable = 1, myvariable =2, etc) except for the last one, when is equal to 4.

Is there a limitation of 3? or is there something that I did wrong?
As I said, my knowledge of programming is very poor, so I assume there must be an easy way to approach this kind of things...
If anyone can help me I woul apprectiate it, thanks a lot.

Pages: [1]

Page created in 0.045 seconds with 20 queries.