Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-04-2016, 08:34 PM
Kirko Kirko is offline
Registered Guest
Join Date: Dec 2014
Location: Texas
Posts: 61
Kirko has a spectacular aura aboutKirko has a spectacular aura about
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.

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.
Reply With Quote
  #2  
Old 07-04-2016, 10:01 PM
Tim_Rocks Tim_Rocks is offline
a true gentlemen
Tim_Rocks's Avatar
Join Date: Aug 2008
Location: USA
Posts: 1,863
Tim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to beholdTim_Rocks is a splendid one to behold
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.
__________________
Reply With Quote
  #3  
Old 07-10-2016, 07:06 PM
Kirko Kirko is offline
Registered Guest
Join Date: Dec 2014
Location: Texas
Posts: 61
Kirko has a spectacular aura aboutKirko has a spectacular aura about
Good to know it might be possible, thanks!

If I figure it out I'll post for other.
Reply With Quote
  #4  
Old 07-14-2016, 07:35 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
I think dusty made something similar to that but using polygons

EDIT: go check this out

Quote:
Originally Posted by DustyPorViva View Post
__________________
MEEP!
Reply With Quote
  #5  
Old 07-17-2016, 06:26 AM
Elk Elk is offline
Sr Marketing Strategist
Elk's Avatar
Join Date: Nov 2005
Location: Deerland
Posts: 3,829
Elk has a brilliant futureElk has a brilliant futureElk has a brilliant futureElk has a brilliant futureElk has a brilliant futureElk has a brilliant futureElk has a brilliant future
Send a message via ICQ to Elk Send a message via AIM to Elk Send a message via MSN to Elk Send a message via Yahoo to Elk
dusty made an improved thing using 1 zoomed polygon only, but i cant find the thread :/
__________________
iEra IGN: *Elk (Darkshire)
iCla. IGN: *Elk (Darkshire)
iZone IGN: *Elk (Darkshire)




Reply With Quote
  #6  
Old 07-29-2016, 12:01 AM
Kirko Kirko is offline
Registered Guest
Join Date: Dec 2014
Location: Texas
Posts: 61
Kirko has a spectacular aura aboutKirko has a spectacular aura about
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 View Post
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
Reply With Quote
  #7  
Old 08-12-2016, 07:55 PM
Kirko Kirko is offline
Registered Guest
Join Date: Dec 2014
Location: Texas
Posts: 61
Kirko has a spectacular aura aboutKirko has a spectacular aura about
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
Reply With Quote
  #8  
Old 08-13-2016, 01:37 AM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
Put it in a GuiStretchCtrl
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
  #9  
Old 08-13-2016, 12:58 PM
Elk Elk is offline
Sr Marketing Strategist
Elk's Avatar
Join Date: Nov 2005
Location: Deerland
Posts: 3,829
Elk has a brilliant futureElk has a brilliant futureElk has a brilliant futureElk has a brilliant futureElk has a brilliant futureElk has a brilliant futureElk has a brilliant future
Send a message via ICQ to Elk Send a message via AIM to Elk Send a message via MSN to Elk Send a message via Yahoo to Elk
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
__________________
iEra IGN: *Elk (Darkshire)
iCla. IGN: *Elk (Darkshire)
iZone IGN: *Elk (Darkshire)




Reply With Quote
  #10  
Old 08-13-2016, 01:34 PM
Kirko Kirko is offline
Registered Guest
Join Date: Dec 2014
Location: Texas
Posts: 61
Kirko has a spectacular aura aboutKirko has a spectacular aura about
Quote:
Originally Posted by xXziroXx View Post
Put it in a GuiStretchCtrl
I love you
Reply With Quote
Reply

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 11:32 AM.


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