Please login or register.

Login with username, password and session length
Advanced search  


This forum provides RSS feed. To query recent posts use this url. 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.

Topics - falcomus

Pages: [1]
Scripts, plugins, utilities, goodies / WME Project Manager
« on: March 18, 2013, 12:44:19 PM »
Hello folks,

I just started to develop a WME project manager IDE, here is the first screenshot of the Animation page.

It will take up to two months before the first results can be shown here.

Scripts, plugins, utilities, goodies / Lightmap DLL
« on: October 27, 2012, 10:10:32 PM »

Demo Screen:

- Create a empty bmp, same size like your scene bmp.
- Fill it completely with color "white"
- The areas, where the actor stands in the shadow, you can paint on your lightmap in a darker gray
- If the actor for example stands in front of a fire-place, you can paint this area in the lightmap red (Easiest way to use 2 layers, Photoshop, .NET Paint etc.)

Embed the dll and call the function "GetRGB" in Game_loop.script.


external "C:\LMDLL.dll" int GetRGB(string fName, int x, int y, int buflen, string buf);

// infinite loop of game_loop.script

   //Don't call func every pixel movement

   if ( (actor.X % 5 == 0) || (actor.Y % 5 == 0) )

      //Call the dll function and receive the lightmap-color values (RGB) at actors coordinates
     GetRGB ("C:\LM.bmp", actor.X,actor.Y, str.Capacity,str);

      //Split the result value in an array (RGB-values, I did not know how to send the 3 int values back from DLL, so I used a string)

      arr = str.Split(";");

     //Change actors color corresponding to lightmap
     actor.AlphaColor = MakeRGBA(ToInt(arr[0]),ToInt(arr[1]),ToInt(arr[2]),255);


You can use gradients (black to white or lightgray) in lightmap, while the actor is walking in scene his color and brightness is changing :-)

P.S: Array and string I declared in

arr = new Array();
str = new String(100);


Because I have no webspace I can't put a link to the dll and example bmp.
If somebody likes to have the dll I'll send it to you via email


library LMDLL;


  Windows, SysUtils, Dialogs, Graphics, Classes;

{$R *.res}

function GetRGB(fName: string; x, y: integer; buflen: integer; buf: PChar): integer; stdcall;

  aBmp:   TBitmap;
  iColor: Longint;
  r,g,b:  integer;


    aBmp := TBitmap.Create;

    iColor := ColorToRGB(aBmp.Canvas.Pixels[x,y]);


  r := GetRValue(iColor);
  b := GetBValue(iColor);
  g := GetGValue(iColor);

  StrLCopy(buf, PChar(IntToStr(r) + ';' + IntToStr(g) + ';' + IntToStr(b)), buflen);

  result := 0;


exports GetRGB;


Pages: [1]

Page created in 0.044 seconds with 18 queries.