HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.
Pages: 1 2 [3] 4

Author Topic: Press "I" to open a gui window  (Read 16972 times)

ShaolinNinja

  • General Accounts
  • *
  • Posts: 33
    • View Profile
Re: Press "I" to open a gui window
« Reply #30 on: May 23, 13, 02:25:36 PM »

Thank you Thazager for your response. I was able to compile and submit the script after referencing another gui script like so
Code: [Select]
method OnControlBuild()
 viewPort as Vector3 = GetViewPortSize()
  win as NodeRef of Class GUIControl = FindGUIControlByName(None, "PopUp")
  flow as NodeRef of Class GUIFlowLayoutContainer = me.Flow()
   
But I completed the rest of the tutorial and nothing happened when I pressed "I". No errors or anything. So I have 2 more questions.

1) What could I have missed so that nothing would happen when I press "I"?

2) Why would the tutorial reference a method to position the window that doesn't exist? Both GUI scripts in the tutorial have references to position, and I tried referencing both GUI scripts using the override when the first GUI reference didn't work.
Logged

Viper155

  • World Owners
  • ****
  • Posts: 73
    • View Profile
Re: Press "I" to open a gui window
« Reply #31 on: May 23, 13, 02:46:51 PM »

Did you remember to do this part?

Quote
Editing the GameKeyBindings file

First we need to open up the GameKeyBindings.ini file. To do that open up the Repository broswer and go to the root folder "HE". Right-click on "GameKeyBindings.ini", and choose open. Save the file to your desktop

Open the file up with notepad, or your preferred text editor.

Under " = Input_Command"
add the following: OpenInventory = I

Save the file, and drag it from the desktop onto the one in the repository browser. Overwrite it.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1149
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Press "I" to open a gui window
« Reply #32 on: May 23, 13, 08:01:57 PM »

Yes, the GameKeyBindings file is the other part that makes this work. Along with the script that calls the command to perform the action. Here, the word in the quotes need to be exactly (caps and all) the same as the word in the keybindings file.

is "OpenInventory"
      $Test.IOpen()
    .

add the following: OpenInventory = I
Logged

ShaolinNinja

  • General Accounts
  • *
  • Posts: 33
    • View Profile
Re: Press "I" to open a gui window
« Reply #33 on: May 24, 13, 11:36:53 AM »

I edited the herogamekey bindings, not the gamekeybindings.

now I am getting this error in the script error window

Code: [Select]
Client Script Error
SCRIPT ERROR: Exception DefinitionNotFoundException in function 'createNodeFromPrototype' definition not found: PopUp
05/24/2013 09:33:24
Call trace:
  Script IPopUpClassMethods line 3 me[id=1000000293 class=IPopUp]
  Script Input_Command line 43 me[9223372055763831974]
starting method/function ONCMDSTOP
starting me[id=9223372055763831974 class=E_playerAccount,HBNode,CharacterNode,_ACCControllerOwner]
Logged

Viper155

  • World Owners
  • ****
  • Posts: 73
    • View Profile
Re: Press "I" to open a gui window
« Reply #34 on: May 24, 13, 02:32:12 PM »

I just did this tutorial about a month ago and I don't remember running into the problems you are having.

You may want to start over or atleast triple check from start to finish that you did every step correctly.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1149
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Press "I" to open a gui window
« Reply #35 on: May 24, 13, 07:39:16 PM »

The herogamekey bindings are like the base for the system, not one of the files you want to modify. Similar to the script files using _ and HE_ for the beginning of the files. They are modified by the HE devs, and sent to all worlds when they have updates, so they will not persist. The gamekeybindings file is the one you can modify without it being effected by the updates.

The errors you are getting can be traced back to where they are called. The call trace shows this info.
In script IPopUpClassMethods at line 3, the class is IPopUp and node is currently [id = 1000000293].

It is looking for the 'createNodeFromPrototype', which may not be defined at this point in the code.
« Last Edit: May 24, 13, 07:44:06 PM by Thazager »
Logged

Kizzim

  • World Owners
  • ****
  • Posts: 15
    • View Profile
Re: Press "I" to open a gui window
« Reply #36 on: Jun 04, 13, 11:02:36 PM »

Im getting the following error and I am kind of stumped:

!ERROR!System:GUIXMLChomper::ChompControlAttributeDynamicly: controlType=PopUp field 'toggleipopup'. GOM Error=GOM::getVariableReferenceFromPrototype (12619): field 'toggleIPopUp' not found in prototype (1000000342)
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1149
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Press "I" to open a gui window
« Reply #37 on: Jun 05, 13, 02:06:40 AM »

From what I can see of the error, a field that is used on the class is not being found in your GUI .xml script. The field is toggleIPopUp. Perhaps the script function make referrence to it, might be an easy typo?
Logged

Kizzim

  • World Owners
  • ****
  • Posts: 15
    • View Profile
Re: Press "I" to open a gui window
« Reply #38 on: Jun 05, 13, 08:08:37 AM »

From what I can see of the error, a field that is used on the class is not being found in your GUI .xml script. The field is toggleIPopUp. Perhaps the script function make referrence to it, might be an easy typo?

I wish it was that easy, i've gone over all the classes, xml, etc, there appears to be no typos...

Is this stating that there is no prototype for field 'toggleIPopUp' period or that it cannot find it in a prototype, its specifically referring to:
Code: [Select]
<createControlType inheritFrom='_window' class='PopUp' type='PopUp' description='blah' treePath='CleanEngine' name="PopUp" resizeable="NONE "toggleIPopUp="0"> "toggleIPopUp="0"
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1149
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Press "I" to open a gui window
« Reply #39 on: Jun 05, 13, 08:41:10 PM »

Just curious, did you define the class PopUp in the DOM? Is the field toggleIPopUp created and added to this class?

If not, the DOM can be reached by clicking HeroScript tab in the editor, then selecting Data Object Model (DOM).

Other than that, showing the script and .xml contents might help.
Logged

Kizzim

  • World Owners
  • ****
  • Posts: 15
    • View Profile
Re: Press "I" to open a gui window
« Reply #40 on: Jun 06, 13, 10:44:59 AM »

Im not at the machine but I created a field for toggleIPopUp in DOM then created PopUp and added the field. I removed them both and recreated them again to see if there was some kind of issue with them not applying correctly and im still experiencing the same issue. The inventory panel will load (albeit kind of distorted, the inventory boxes overlap some of the window and is not positioned correctly) it just generates that error every time it is used. If you believe it would help, later tonight I can provide screenshots of the dom unless you have any other suggestions.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1149
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: Press "I" to open a gui window
« Reply #41 on: Jun 06, 13, 08:43:09 PM »

I have done this once before also,
Quote
I removed them both and recreated them again

When you delete them, it removes every connection they have to any script. When you add them back in, it is as if you are creating something entirely new, and they simply wont connect as the old fields did. There is a special function you need to apply to get them to work again ( I forget where exactly from the wiki). OR there is also another way, by using another name and connecting the new name to where the old used to be.
Logged

Kizzim

  • World Owners
  • ****
  • Posts: 15
    • View Profile
Re: Press "I" to open a gui window
« Reply #42 on: Jun 07, 13, 05:37:06 AM »

I have done this once before also,
Quote
I removed them both and recreated them again

When you delete them, it removes every connection they have to any script. When you add them back in, it is as if you are creating something entirely new, and they simply wont connect as the old fields did. There is a special function you need to apply to get them to work again ( I forget where exactly from the wiki). OR there is also another way, by using another name and connecting the new name to where the old used to be.

Im looking through the wiki and so far I have yet to find anything on this.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1149
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Logged

Kizzim

  • World Owners
  • ****
  • Posts: 15
    • View Profile
Re: Press "I" to open a gui window
« Reply #44 on: Jun 07, 13, 12:45:32 PM »

OK, found the links.

discussion: https://community.heroengine.com/forums/index.php/topic,4251.0.html

wiki: http://hewiki.heroengine.com/wiki/UpgradeClass

According to the post by the dev:

If the data in the field whose type is to be changed is important, the way to accomplish this is:

rename the current field
create new field using the old name but the new desired type
recompile scripts that reference the field
use the UpgradeClass() callback to copy, covert or otherwise process the "old" value to set the new field appropriately during the process of loading into memory

#3 states that i can recompile the scripts that reference the field, and I did, because I redid the tutorial and in redoing the tutorial all scripts were recompiled and resubmitted, why did this not fix the issue, wouldnt those scripts then reference the new ID?

Also does this mean that each individual user is loading up a GUI node that basically listens for user input such as a script running and giving it information by keystroke? Why is this system of behavior efficient? Literally as the character logs in tons of nodes are loaded?
« Last Edit: Jun 07, 13, 01:17:09 PM by Kizzim »
Logged
Pages: 1 2 [3] 4