Please login or register.

Login with username, password and session length
Advanced search  

News:

IRC channel - server: waelisch.de  channel: #wme (read more)

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 - sharkgod999

Pages: [1]
1
Technical forum / Re: Color shifting using "FadeThrough" method
« on: December 03, 2007, 02:36:44 AM »
Ah ha, I've got it. I guess if I set the Luminescence to 255 I get I white image. But If I lower the L value I get a colorization effect. Many thanks all.  ::rock

2
Technical forum / Re: Color shifting using "FadeThrough" method
« on: November 30, 2007, 06:49:13 AM »
The problem I keep running into is I can't change the Hue or Saturation at all. Am I doing any thing wrong or is there a problem with MakeHSL()? I'm trying to make a background entity change color. It's a plaid backdrop.

3
Technical forum / Re: Color shifting using "FadeThrough" method
« on: November 27, 2007, 07:17:57 PM »
Well, I was trying to make the background slowly shift hue, but like I said the "FadeThrough" method wasn't what I thought. So, I wrote this little piece of code. It works. However, I'm using a gray-scale image and this results in some moments where the gray will come through. I've tried the new HSL and it seems to make the following: h = 0, s = 0, l = 255. Which gives no colorization at all. ::slug I'll put the code for the HSL at the end of the post after the RGB example. Thanks for any help in advance.

RGB Color Shifting
Code: [Select]
var r = 0;
var g = 0;
var b = 0;

var myent = this.GetNode("background");

var timer = 0;
 
var lr = 255;
var lg = 0;
var lb = 0;

var done = true; 

////////////////////////////////////////////////////////////////////////////////
method SetColor(ent,red,green,blue,alpha)
{
  ent.AlphaColor = RGB(red,green,blue,alpha);
}


while(true)
{
  if(done == true)
  {
// Set the next color
    r = Random(0,255);
    g = Random(0,255);
    b = Random(0,255);

    done = false;

    Game.Msg("New Color - r:"+r+" - g:"+g+" - b:"+b+"");
    Game.LOG("New Color - r:"+r+" - g:"+g+" - b:"+b+"");
  }
 
  if(lr != r && lg != g && lb != b)
  {
    if(lr < r)
  lr = lr + 1;
else if(lr > r)
  lr = lr - 1;

if(lg < g)
  lg = lg + 1;
else if(lg > g)
  lg = lg - 1;

if(lb < b)
  lb = lb + 1;
else if(lb > b)
  lb = lb - 1;
  }
  else
  {
done = true;
  }
   
  SetColor(myent,lr,lg,lb,255);
 
  Game.Msg("Current Color - r:"+lr+" - g:"+lg+" - b:"+lb+"");
   
  Sleep(100);
}

Here's the HSL attempt
Code: [Select]
var hue = 0;

var myent = this.GetNode("background");

var color = 255;

while(true)
{
hue = hue + 1;
if(hue > 255)
hue = 0;

color = MakeHSL(hue,255,255);

// myent.AlphaColor = RGB(GetRValue(color),GetGValue(color),GetBValue(color),255);
myent.AlphaColor = color;

Game.Msg("Hue "+hue+" Background Color - r:"+GetRValue(myent.AlphaColor)+" - g:"+GetGValue(myent.AlphaColor)+" - b:"+GetBValue(myent.AlphaColor)+"");
Game.Msg("Attempted Color - H:"+GetHValue(color)+" - S:"+GetSValue(color)+" - L:"+GetLValue(color)+"");
Game.Msg(""+color+"");

Sleep(100);
}

4
Technical forum / Color shifting using "FadeThrough" method
« on: November 14, 2007, 05:07:51 AM »
I've been trying to shift the hue of a scene for sometime to no avail. So I searched the forum and found this post: http://forum.dead-code.org/index.php?topic=542.0. Well, I've tried the prescribed method and the scene shifts hues. However, the colors that fades-in are opaque. So, I lose the entities visibility in the scene. and end up with a blank screen that shifts hue. Also, if I set the alpha of the fade-in to say 100, I get a hazy image.

5
Technical forum / Re: How does one control scrolling on a scene or entity?
« on: November 13, 2007, 10:21:58 AM »
Thanks everyone! I got the scrolling to work, and I'm starting to get the idea behind the scripting language. Here's my working code if anyone has a similar issue. This does seem to have one issue. There's a bit of lag when the engine resets the offsets to 0.

Code: [Select]
///////////////////////////////////////////////////////////////////////////////////
//  Scroll Scene
while(true)  {
  Scene.ScrollTo(1000,800);
  if(Scene.OffsetX>=200)  {
    Scene.OffsetX=0;
  }
  if(Scene.OffsetY>=200)  {
    Scene.OffsetY=0;
  }
  Sleep(100);
}
///////////////////////////////////////////////////////////////////////////////////

6
Technical forum / Re: How does one control scrolling on a scene or entity?
« on: November 13, 2007, 04:58:22 AM »
Quote
Code: [Select]
Game.MainObject = null;

This stopped the scene from scrolling automatically and the scene scrolls as I want now ::rock. However, the window doesn't load till it has stopped scrolling. Is there a way to continue executing the script while still scrolling?

7
Technical forum / Re: How does one control scrolling on a scene or entity?
« on: November 11, 2007, 09:18:56 PM »
Quote
try so:

Code: [Select]
Scene.AutoScroll=true;
Scene.ScrollTo(1000, 600);
I tried this. the scene still scrolls to 0,53. Here is me script:
Code: [Select]
#include "scripts\base.inc"

// here comes the stuff which initializes the scene

Game.LOG("**Intro Scene**");

//actor.Reset();
actor.Active=false;

///////////////////////////////////////////////////////////////////////////////////
//  Scene.ScrollTo() stops the script.
Game.LOG("AutoScroll is turned on");
Scene.AutoScroll=true;
Game.LOG("Scene Scrolling to 1000,800");
Scene.ScrollTo(1000,800);

//////////////////////////////////////////////////////////////////////////////////
//  win.GoExclusive() stops the script as well.
Game.LOG("Loading Intro Window");
global win = Game.LoadWindow("scenes\Intro\Wnd\intro_menu.window");
win.Center();
win.GoExclusive();


8
Technical forum / How does one control scrolling on a scene or entity?
« on: November 08, 2007, 10:28:27 PM »
I've been working on an adventure game for some time and decided to switch to WME. It has everything I need. There has been one snag:

I have a "Title Scene". In this scene there's a background. I want the background to scroll up and left 200p. So I include the following snippet in the script attached to the scene:
Code: [Select]
this.AutoScroll = true;
while(true)
{
  this.ScrollTo(-200,-200);
  Sleep(100);
}


This results in nothing. The scene simply scrolls up to around -48 or so. I even removed the code, and that's how I found out it did nothing because the scene still panned up. I just started learning WME. So, I'm a little in the dark on this. In case it's important the game resolution is 800x600 and the scene is 1000x800.

Pages: [1]

Page created in 0.022 seconds with 24 queries.