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

Author Topic: Journal  (Read 4426 times)

0 Members and 1 Guest are viewing this topic.

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Journal
« on: July 03, 2012, 11:46:15 PM »

Hi

I got problem and I have no idea how solve it. I need to make similar journal system like this one http://www.thatgamesux.com/wp-content/uploads/2012/04/journal-missions-2.jpg in mass effect 3.

Help me :)
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: Journal
« Reply #1 on: July 04, 2012, 09:29:18 AM »

No tips? Ok, what I need to do and I don't know how:

- how create clickable list element (something like sprite with on click action or button or something like that) by script with text in it also from script

- how to create by script something like text area with text from script

I think that if I will know how to do this two things than I will handle the rest

Sorry for my english, It's not my native.

Thanks
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

Azrael

  • Regular poster
  • ***
  • Karma: 9
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • View Profile
    • Mad Orange
Re: Journal
« Reply #2 on: July 04, 2012, 01:10:01 PM »

I suggest you to use window for that, you can create buttons (for the list) and static control (for the text area)
Logged

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: Journal
« Reply #3 on: July 04, 2012, 03:28:37 PM »

I'll try, thanks
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

hubertMichael

  • Regular poster
  • ***
  • Karma: 3
  • Offline Offline
  • Posts: 155
    • View Profile
    • Shadow Of Nebula - our point'n click adventure game
Re: Journal
« Reply #4 on: July 07, 2012, 12:54:23 PM »

Hi

So, I got problem now.

This declaration is in my base.inc

Code: [Select]
var tech = new Array();
tech[0] = "Green Crystals";
tech[1] = "Cyber Scanner";
tech[2] = "Black Ore";
iTech[0] = "Please show me this stupid text blah blah blah";

this code is in my scene_init.script of scene where will be my journal

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

var padu = Game.CreateWindow("okno");

var posY = 0;
for (var i = 0; i < tech.Length; i = i +1)
{
var butt = padu.CreateButton(i);
butt.Text = tech[i];
butt.Y = posY;
butt.Width = 200;
butt.Height = 30;
butt.Visible = true;
posY = posY + 30;

butt.AttachScript("scenes\info_cube\scr\button.script");


}

and this is my button.script

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


on "LeftClick"
{
Game.Msg("test");
var showInfo = Game.LoadWindow("scenes\info_cube\tzone.window");
var tt = showInfo.GetControl("infotext");
tt.Text = iTech[this.Name];
}

Almost everything is ok. Yeah, almost :)

When I click my button, button.script load my window, display text and from this moment my buttons are no clickable anymore. I know that this happens everytime when I load my window to display text from iTech array. I think that when I load my window it took focus from buttons.

Oh, and this is my tzone.window

Code: [Select]
; generated by WindowEdit

; $EDITOR_PROJECT_ROOT_DIR$ ..\..\..\

WINDOW
{
  NAME="info"
  CAPTION=""
 
 
  TITLE_ALIGN="left"
 
  X=0
  Y=0
  WIDTH=200
  HEIGHT=100
  DISABLED=FALSE
  VISIBLE=TRUE
  PARENT_NOTIFY=FALSE
  TRANSPARENT=FALSE
  PAUSE_MUSIC=TRUE
  MENU=FALSE
  IN_GAME=FALSE
  CLIP_CONTENTS=FALSE
 
  ALPHA_COLOR { 0, 0, 0 }
  ALPHA=0
 
 
  EDITOR_PROPERTY
  {
    NAME="Selected"
    VALUE="False"
  }

  STATIC
  {
    NAME="infotext"
    CAPTION=""
   
    TEXT="Static"
    TEXT_ALIGN="left"
    VERTICAL_ALIGN="center"
   
    X=600
    Y=180
    WIDTH=475
    HEIGHT=455
    DISABLED=FALSE
    VISIBLE=TRUE
    PARENT_NOTIFY=FALSE
   
   
    EDITOR_PROPERTY
    {
      NAME="Selected"
      VALUE="True"
    }

  }
}


What's wrong with this?

« Last Edit: July 07, 2012, 01:00:40 PM by hubertMichael »
Logged
Shadow Of Nebula fan page:

https://www.facebook.com/shadowofnebula

anarchist

  • Regular poster
  • ***
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 212
    • View Profile
Re: Journal
« Reply #5 on: July 07, 2012, 01:31:37 PM »

Cant claim I know the answer for certain but some suggestions:

Code: WME Script
  1. EDITOR_PROPERTY
  2. {
  3.   NAME="Selected"
  4.   VALUE="True"
  5. }
  6.  

Try changing the  value to "False".

Could you show us an image of what you are trying to do? Why use a new window? Can't you create a static control in the original window (the one with the buttons) and set the caption there?

You can also try creating a subwindow. You can use:
Code: WME Script
  1. padu.CreateWindow("info");
  2.  
to create a subwindow and place the static control in there. You can load this window and have it hidden.

Again I dont claim I know the answer, I have never faced such an issue before, just giving some ideas that came to mind.
Logged
 

Page created in 0.096 seconds with 21 queries.