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
  #31  
Old 01-26-2012, 12:02 AM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano can only hope to improve
Quote:
Originally Posted by Pelikano View Post
Controls are only added to GraalControl by default if you do:

Graal Script Code:
  new GuiShowImgCtrl("SomeImg") {
    
50;
    
50;
    
width 71;
    
height 96;
    
image "era_sam_hiddencard.png";
    
visible true;
  } 
But, if you do it like the OP and create a GuiShowImgCtrl object first, then set it's attributes you have to add it to GraalControl manually:

Graal Script Code:
  temp.guiImage = new GuiShowImgCtrl("SomeImg");
  
guiImage.50;
  
guiImage.50;
  
guiImage.width 71;
  
guiImage.height 96;
  
guiImage.image "era_sam_hiddencard.png";
  
guiImage.visible true;
  
// Will not show! 
nothing at all, same thing
Reply With Quote
  #32  
Old 01-26-2012, 12:12 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Pelikano View Post
Oh yeah you are NOT setting a variable to the object, which means your code is the same thing as:
That doesn't matter at all. Creating the control returns an object reference. Whether I use that directly or store it in a variable first doesn't matter. The outcome will be the same.


Quote:
Originally Posted by Pelikano View Post
It's just sad how ignorant some people can be and instead of apologizing for claiming people have no idea they won't admit that for once it's them doing something wrong lol
You're trying too hard.
__________________
Reply With Quote
  #33  
Old 01-26-2012, 12:24 AM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano can only hope to improve
Quote:
Originally Posted by Crow View Post
That doesn't matter at all. Creating the control returns an object reference. Whether I use that directly or store it in a variable first doesn't matter. The outcome will be the same.




You're trying too hard.
The outcome is obviously the same, because several people have now tried it and the output wasn't the same.

But I'm sure with your uber skills you're never wrong.
Reply With Quote
  #34  
Old 01-26-2012, 12:30 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Pelikano View Post
The outcome is obviously the same, because several people have now tried it and the output wasn't the same.

But I'm sure with your uber skills you're never wrong.
The conversation ends here because of several reasons:
  • I don't even know what you're talking about anymore because you don't make much sense at all. You're just blabbering about some "outcome" without saying what you're referring to right now.
  • You're arguing like a child.
  • I really don't care.

I don't gain anything from doing this, either. I tried both ways, and either works for me. You say they don't. Now what? Seriously, what's the matter with this bull****? It's up to the coders to decide how to write their code. Whatever works. If this doesn't for you, that's cool with me.
__________________
Reply With Quote
  #35  
Old 01-26-2012, 01:57 AM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano can only hope to improve
Quote:
Originally Posted by Crow View Post
The conversation ends here because of several reasons:
  • I don't even know what you're talking about anymore because you don't make much sense at all. You're just blabbering about some "outcome" without saying what you're referring to right now.
  • You're arguing like a child.
  • I really don't care.

I don't gain anything from doing this, either. I tried both ways, and either works for me. You say they don't. Now what? Seriously, what's the matter with this bull****? It's up to the coders to decide how to write their code. Whatever works. If this doesn't for you, that's cool with me.
you should reread the thread, try both variants supplied by me and you will see that both don't work

you are just very arrogant and ignorant to an extend that you can't see the fact of you not being right

but ok I'm obviously the child "who doesn't know jack about what he's talking about", I agree with ending the conversation here
Reply With Quote
  #36  
Old 01-26-2012, 05:55 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Send a message via Skype™ to sssssssssss
Alright, so I'm using:
Graal Script Code:
new GuiShowImgCtrl("Arm_Inventory_IconBox_" temp.v) { 
          
new_x_position
          
new_y_position 10
          
image "armageddon_inventory-iconbox.gif";
          
mode 1;
          new 
GuiShowImgCtrl("Arm_Inventory_Icon_" temp.v) { 
            
image search_list[temp.v].image
            
0// Since it's a child of 'IconBox' it's x/y will be relative. 
            
22// It should also draw above the icon box as well. 
            
mode 1;
          } 
      } 
but anything like this will not make it go away later in a different function.
And yes, I know I don't need 99999.
Graal Script Code:
for (v=0;v<99999;v++) {
    
Arm_Inventory_IconBox_(@temp.v).hide();
    
Arm_Inventory_Icon_(@temp.v).hide();

Graal Script Code:
for (v=0;v<99999;v++) {
    
"Arm_Inventory_IconBox_"(@temp.v).hide();
    
"Arm_Inventory_Icon_"(@temp.v).hide();

Graal Script Code:
for (v=0;v<99999;v++) {
    (
"Arm_Inventory_IconBox_"@temp.v).hide();
    (
"Arm_Inventory_Icon_"@temp.v).hide();

destroy() is what I really want, but it doesn't work either in a diff funciton.

Also tried doing it OP way with addcontrol, and setting them as this commands to call destroy later, but also didnt work.

Graal Script Code:
for (v=0;v<player.weapons.size();v++) {
    
this.("weapon"@temp.v).clearControls();
    
this.("shadow"@temp.v).clearControls();

I tried destroy and hide as well. Was just hoping with clearControls.

P.S.
The way I was doing it in my OP, I did have to add addcontrol for it to work like that. After adding that, it showed up fine. I just changed it to this way thinking it would be easier to make it disappear in a different function. :/
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...



Last edited by sssssssssss; 01-26-2012 at 06:15 AM..
Reply With Quote
  #37  
Old 01-26-2012, 06:14 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
Put it in a GUIControl. I.e:

Graal Script Code:
new GuiControl("Arm_Inventory") { // Assuming it's your inventory...
  
0;
  
0;
  
width 200// You'll probably have to adjust this to fit your GUI...
  
height 200;
  
// pay attention to the use of thiso
  
for (temp.thiso.selected_num2temp.thiso.selected_num2 91temp.++) { 
    
//new GuiShowImgCtrl(); stuff
  
}

Then you can do: Arm_Inventory.clearcontrols();

To destroy all the controls or just hide().

I'm not sure what your original script's purpose is but I feel like it's getting really complicated when it doesn't need to be.
__________________
Quote:
Reply With Quote
  #38  
Old 01-26-2012, 06:16 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Send a message via Skype™ to sssssssssss
It's just a stupid inventory with tabs in a gui, I think I am making it much worse as well. :/ All on my own though and this is the only way I could think to do it. :x
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #39  
Old 01-26-2012, 06:18 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Send a message via Skype™ to sssssssssss
LOLOLOLOLOLOLOLOLOLOLOLOL

Instead of GraalControl.addcontrol(), it needed windowname.addcontrol() HAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAaaa thanks guys. Man I'm dense when I'm tired.
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #40  
Old 01-26-2012, 06:23 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 sssssssssss View Post
it needed windowname.addcontrol()
Your snippets didn't indicate there was a 'windowname' object!

For future threads please provide more information about your problem. I.e: Purpose of the code, a general idea of what it does (or is supposed to do).
__________________
Quote:
Reply With Quote
  #41  
Old 01-26-2012, 06:27 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Send a message via Skype™ to sssssssssss
I'm sorry. I do still have the issue of trying to edit the zoom or hint using it as a temp.var holding the object and addcontrol to parent window. It's just not doing it which is odd because setting the x,y,image,ect initially works fine.

Graal Script Code:
("weapon"@temp.v).hint temp.tokens[tokens.size() - 1]; 
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #42  
Old 01-26-2012, 02:49 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
There's a good chance that hints do not work correctly if the control is not focused. I'm not 100% sure if that's still the case, but I believe it was a problem before.
__________________
Reply With Quote
  #43  
Old 01-26-2012, 04:29 PM
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
Try giving the GUI Object width and height.
__________________
Quote:
Reply With Quote
  #44  
Old 01-29-2012, 05:31 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Send a message via Skype™ to sssssssssss
Gave the gui image width and height, but editting the hint later still isn't working.

how would I set focus?
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
  #45  
Old 01-29-2012, 06:28 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 sssssssssss View Post
Gave the gui image width and height, but editting the hint later still isn't working.

how would I set focus?
Use onMouseEnter, onMouseLeave and see if they work. If they do you might as well make your own hint system.

GuiName.makefirstresponder(true);
__________________
Quote:
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 10:16 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.