Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   ShowImg Gani (https://forums.graalonline.com/forums/showthread.php?t=134267494)

greggiles 12-04-2012 09:59 PM

ShowImg Gani
 
With the showImg(200+,,,) function, is there a way to show a Gani without having to create an NPC?

I'm trying to create an effect but I don't want to putNPC.

ffcmike 12-04-2012 10:15 PM

Quote:

Originally Posted by greggiles (Post 1708559)
With the showImg(200+,,,) function, is there a way to show a Gani without having to create an NPC?

I'm trying to create an effect but I don't want to putNPC.

PHP Code:

showani(indexxydiraniparam1);
showani2(indexxyzdiraniparam1); 


greggiles 12-07-2012 05:57 PM

can you changeImgWidth()??
I need to stretch an Img with the showImg function

ffcmike 12-07-2012 07:19 PM

Quote:

Originally Posted by greggiles (Post 1708878)
can you changeImgWidth()??
I need to stretch an Img with the showImg function

http://www.graal.net/index.php/Creat...ShowImg_Values

So for instance you could do:

PHP Code:

temp.block this.showimg(200"block.png"player.xplayer.5);
temp.block.stretchx 2;

temp.bush this.showimg(201"bush.png"player.5player.y);
temp.bush.zoom 0.5//or this.changeimgzoom(201, 0.5); 

If you mean stretch a showani, you may need to edit temp.display.actor.stretchx, or possibly edit player.stretchx within the gani itself by opening the gani as a text file:

PHP Code:

SCRIPT
function onPlayerEnters(){
  
player.stretchx 2;
}
SCRIPTEND 


greggiles 12-07-2012 08:28 PM

Quote:

temp.block = this.showimg(200, "block.png", player.x, player.y - 5);
temp.block.stretchx = 2;

temp.bush = this.showimg(201, "bush.png", player.x - 5, player.y);
temp.bush.zoom = 0.5; //or this.changeimgzoom(201, 0.5);

I may need to rephrase. I don't need stretching, but actually setting the width and height value.

ffcmike 12-07-2012 08:31 PM

Quote:

Originally Posted by greggiles (Post 1708886)
I may need to rephrase. I don't need stretching, but actually setting the width and height value.

You mean so that it's a blocking shape?
If so that can only be achieved from the NPC itself, and not a displayed image.

greggiles 12-08-2012 12:20 AM

I finally figured out how to achieve my goal. I was making a sunlight effect and it looks really good.
But due to it being a Gui it doesn't let me click on the screen for MouseDown() functions I have on other scripts.
:(


PHP Code:

   new GuiBitmapCtrl("SUN") {
    
0;
    
0;
    
width screenwidth;
    
height screenheight;
    
bitmap "age_sun.png";
    
layer 1;
  } 


ffcmike 12-08-2012 12:29 AM

Quote:

Originally Posted by greggiles (Post 1708905)
I finally figured out how to achieve my goal. I was making a sunlight effect and it looks really good.
But due to it being a Gui it doesn't let me click on the screen for MouseDown() functions I have on other scripts.
:(


PHP Code:

   new GuiBitmapCtrl("SUN") {
    
0;
    
0;
    
width screenwidth;
    
height screenheight;
    
bitmap "age_sun.png";
    
layer 1;
  } 


Try adding modal = true; within that GUI control bracket.

greggiles 12-08-2012 12:48 AM

Quote:

Try adding modal = true; within that GUI control bracket.
Didn't work :/

fowlplay4 12-08-2012 02:47 AM

Quote:

Originally Posted by greggiles (Post 1708907)
Didn't work :/

It's a profile var, so:

useownprofile = true;
profile.modal = true;

greggiles 12-08-2012 03:56 AM

This is what I got. And it doesn't wanna work :/

PHP Code:

   new GuiBitmapCtrl("LIGHT") {
    
useownprofile true;
    
profile.modal true;
    
screenwidth-screenwidth/6;
    
0;
    
width screenwidth/6;
    
height screenheight/3;
    
bitmap = <lightImg>;
    
layer 0;
  } 

I have a MouseDown() function that plays a sound every time I click. Works but when I click the top right which is where my GuiBitmap is. Which is how I know it's not working.

cbk1994 12-08-2012 04:26 AM

Post your full code. If your goal is for the object to not steal focus, then it should have profile.modal set to false, not true.

greggiles 12-08-2012 05:10 AM

Quote:

Post your full code. If your goal is for the object to not steal focus, then it should have profile.modal set to false, not true.
YAY!! thank you cbk!
rep++

And thank you to everyone else. perhaps I was not being clear on my goal.


All times are GMT +2. The time now is 04:42 AM.

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