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 12-04-2012, 09:59 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
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.
Reply With Quote
  #2  
Old 12-04-2012, 10:15 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by greggiles View Post
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); 
Reply With Quote
  #3  
Old 12-07-2012, 05:57 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
can you changeImgWidth()??
I need to stretch an Img with the showImg function
Reply With Quote
  #4  
Old 12-07-2012, 07:19 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by greggiles View Post
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 
Reply With Quote
  #5  
Old 12-07-2012, 08:28 PM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
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.
Reply With Quote
  #6  
Old 12-07-2012, 08:31 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by greggiles View Post
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.
Reply With Quote
  #7  
Old 12-08-2012, 12:20 AM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
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;
  } 
Reply With Quote
  #8  
Old 12-08-2012, 12:29 AM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
Quote:
Originally Posted by greggiles View Post
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.
Reply With Quote
  #9  
Old 12-08-2012, 12:48 AM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
Quote:
Try adding modal = true; within that GUI control bracket.
Didn't work :/
Reply With Quote
  #10  
Old 12-08-2012, 02:47 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by greggiles View Post
Didn't work :/
It's a profile var, so:

useownprofile = true;
profile.modal = true;
__________________
Quote:
Reply With Quote
  #11  
Old 12-08-2012, 03:56 AM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
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.
Reply With Quote
  #12  
Old 12-08-2012, 04:26 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
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.
__________________
Reply With Quote
  #13  
Old 12-08-2012, 05:10 AM
greggiles greggiles is offline
Registered User
greggiles's Avatar
Join Date: Sep 2007
Posts: 149
greggiles has a spectacular aura about
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.
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 02:23 PM.


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