Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-07-2012, 02:39 AM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Set layers and RGB/alpha in GuiDrawingPanel

Is it possible to change / set layers in the GuiDrawingPanel aswell as the RGB/alpha value? I'm messing around with something on Delteria which does display the tiles inside the DrawingPanel, the NPCs but the NPCs and players.
But the NPCs dont have the proper layer. Aswell I couldn't find any way how I could fix the problem with the RGB and alpha. Using maskimage(x, y, img, mode) was the only solution I could find which is not perfect. While using drawObject(x, y, obj) it doesnt seem to be a problem or atleast I couldnt find one yet.
This is the code I am using:
PHP Code:
for (temp.nnpcs) {
  if (
n.visible && n.x in |player.x-(player.x%64), (player.x-(player.x%64))+63.95| && n.y in |player.y-(player.y%64), (player.y-(player.y%64))+63.95|) {
    if (
temp.n.image != NULL && temp.n.ani == NULL) {
      if (
temp.n.alpha == 1) {
        
drawimagestretched(((n.x%64)*16)/ir, ((n.y%64)*16)/irgetImgWidth(n.image)/irgetImgHeight(n.image)/irn.image00getImgWidth(n.image), getImgHeight(n.image));
      }
      else {
        
maskimage(((n.x%64)*16)/ir, ((n.y%64)*16)/irn.image"add");
      }
    }
    else if (
temp.n.ani != NULL) {
      
drawobject(((n.x%64)*16)/ir, ((n.y%64)*16)/irn);
    }
  }
}
for (
temp.pplayers) {
  if (
p.x in |player.x-(player.x%64), (player.x-(player.x%64))+63.95| && p.y in |player.y-(player.y%64), (player.y-(player.y%64))+63.95|) {
    if (
p.alpha 0drawobject(((p.x%64)*16)/ir, ((p.y%64)*16)/irp);
  }

Screenshot:
__________________
MEEP!
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:54 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.