• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Vote for the theme of Hive's HD Modeling Contest #7! Click here to vote! - Please only vote if you plan on participating❗️

[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 71
Joined
Aug 10, 2018
Messages
7,585
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: 15
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