Can't reference geyser container from external script

Post Reply
jinglehell
Posts: 1
Joined: Tue Nov 12, 2019 3:05 pm

Can't reference geyser container from external script

Post by jinglehell »

I'm a rather complete noob with lua.

After successfully bludgeoning the various appropriate snippets from examples with minor modifications, I was able to put together a script for HP, Mana, and Movement bars, plus opponent HP/Name using MSDP into a geyser HBox. Yay me.

Unfortunately, I'm now trying to take all that one step further, and do something a bit more custom. Specifically, I want to:

1:Create a vbox on the side.
2: Use triggers to create labels in the VBox when I cast my buff spells
3: Change the colors on those labels with triggers.

The long and short of my question. Is it even possible for a trigger to reference a geyser container created elsewhere?

Code: Select all

           aid = Geyser.Label:new({
           name="aid", }, buffbox)
           aid:echo("Aid", "black", "c")
           aid:setColor(0, 255, 0)
Was trying to stick this in a trigger to toss a geyser label into the vbox "buffbox" created in another script, and instead, it just created it splashed elsewhere on my screen. Everything worked except it's ability to reference the container.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Can't reference geyser container from external script

Post by Vadi »

> Is it even possible for a trigger to reference a geyser container created elsewhere?

Yep

As for your code - you have to give your label dimensions and a location to go! So use https://wiki.mudlet.org/w/Manual:Geyser#Geyser.Label and provide the x,y,width, and height.

Post Reply