• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[WC3 Reforged] [Lua]: BlzCreateFrame() bug, Unable to create a button.

Status
Not open for further replies.
Level 1
Joined
Nov 6, 2021
Messages
2
Hi there. This is first time iam here. So i asking you guys. How to create a button with Lua. ? Or maybe with Jass, whatever, i want to just make it work.

That's what i have now:

Map.png
Trigger.png
ScriptLua.png


'QuestButtonTemplate'
Game.png



'ReplayButton'
Game_ReplayButton.png


As you can see this little thing i have instead of my button. I have tried different parameters, screen positions, templates, but always have the same result.
At exact same position just 4 little button corners appears.
What goes wrong?
 
Last edited:

Uncle

Warcraft Moderator
Level 58
Joined
Aug 10, 2018
Messages
5,851
Your Sizes and Positions are way out of the standard range.

A size of 0.04 is the size of a standard ability icon.

For positioning, quoting Tasyen: Coordinates and offset are both a factor of the total screen. 0.0/0.0 being the bottom left corner of the 4:3 screen. 0.8/0.6 is the top right corner of the 4:3 screen.

In other words, your position needs to be somewhere between 0.0 and 0.8 on the X axis and 0.0 and 0.6 on the Y axis.

 

Attachments

  • coords.jpg
    coords.jpg
    142.3 KB · Views: 14
Level 1
Joined
Nov 6, 2021
Messages
2
Your Sizes and Positions are way out of the standard range.

A size of 0.04 is the size of a standard ability icon.

For positioning, quoting Tasyen: Coordinates and offset are both a factor of the total screen. 0.0/0.0 being the bottom left corner of the 4:3 screen. 0.8/0.6 is the top right corner of the 4:3 screen.

In other words, your position needs to be somewhere between 0.0 and 0.8 on the X axis and 0.0 and 0.6 on the Y axis.

Thanks for reply man.

This is not a clue. I know how the position works, and tried many different positions, but result was always exactly the same.

So now i found some kind of button that just works like it should.

Tell me if you have any idea why this button preset bugs out.

I would be glad to know certainly how does it work.
 
Status
Not open for further replies.
Top