Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Mask Image for TShowImg? (https://forums.graalonline.com/forums/showthread.php?t=134270323)

Kirko 07-04-2016 08:34 PM

Mask Image for TShowImg?
 
Is this possible? I'm trying to make a lantern that everything is completely black except the areas around players. I first tried with an Gui and got it to show exactly how I want it but wasn't able to finish since guis dont have attachtoowner and some other stuff I would like to use.
Would anyone know how to mask an image using images and not Guis?

this is how it looked like using Guis but cant figure out to make it using TShowImg instead.
http://i.imgur.com/5af3GRj.png
For the Gui I just used a small black square image and stretched it then with another image thats just a white circle i placed on top.

Tim_Rocks 07-04-2016 10:01 PM

I know it's possible. Era uses a an image overlay for maze events and what not. I wish I had examples for ya, but I'm a bit rusty.

Kirko 07-10-2016 07:06 PM

Good to know it might be possible, thanks!

If I figure it out I'll post for other.

callimuc 07-14-2016 07:35 AM

I think dusty made something similar to that but using polygons

EDIT: go check this out

Quote:

Originally Posted by DustyPorViva (Post 1574437)


Elk 07-17-2016 06:26 AM

dusty made an improved thing using 1 zoomed polygon only, but i cant find the thread :/

Kirko 07-29-2016 12:01 AM

This works but not really want I want. My idea was to have a lantern that slowly dims as its used and the light will slowly decrease in size.
Problem with this is I cant resize the light and it delays when player walks.
PHP Code:

//#CLIENTSIDE
function onCreated() {
  if (
isObject(Kirko_Testing)) Kirko_Testing.destroy();
  
onTimeOut();
}

function 
onTimeOut() {
  
temp.screenx(player.3player.3);
  
temp.screeny(player.3player.3);

  new 
GuiDrawingPanel("Kirko_Testing") {
    
resize(00screenwidthscreenheight);
    
useownprofile true;
    
profile.modal false;
      
    
clearall();
    
drawimagestretched(00screenwidthscreenheight"black2.png"0011);

    
maskimage(temp.xtemp.y"k_lantern_light2.png""multiply");

    
pushtoback();
  }
  
setTimer(0.05);



Quote:

Originally Posted by Elk (Post 1739261)
dusty made an improved thing using 1 zoomed polygon only, but i cant find the thread :/

click the little blue arrow in the post callimuc quoted :)

Kirko 08-12-2016 07:55 PM

Would anyone happen to know how to resize the mask image?
I'm making something else that's going to be re sizable but cant really get it to work because I can't figure a way to resize the mask image :(

xXziroXx 08-13-2016 01:37 AM

Put it in a GuiStretchCtrl :)

Elk 08-13-2016 12:58 PM

Quote:

click the little blue arrow in the post callimuc quoted :)
i already know that one, but the one he recentlyish made is 100x better :) it has transitions like a normal light...and its with a zoomed polygon

Kirko 08-13-2016 01:34 PM

Quote:

Originally Posted by xXziroXx (Post 1739470)
Put it in a GuiStretchCtrl :)

I love you


All times are GMT +2. The time now is 08:20 AM.

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