Sign in to follow this  
CanTotu

Top 5 widget [Help]

Recommended Posts

CanTotu    5

I wanna create a top 5 widget at the right corner of the screen that basically gives points based on each player's death and amount of creature that he kills. If he kills a creature, for example, he will get 20 points and lose 10 point when he dies. So each week, I will announce the player having highest point. It is a bit confusing but I'm sure there are some modders that can help me. 

Share this post


Link to post
Share on other sites
Corrosive    162

@CanTotu,

 

As you posted it, it's less "I'm looking for some help" and more "I want someone to spend a day or two of their time to create this thing I want" =o

 

A lot of us have things to do!

Share this post


Link to post
Share on other sites
Kzisor    1058

@CanTotu, I'm not quite sure what you're wanting because you obviously already know what events you need to listen for in order to achieve it.

 

Events: "killed" and "death" 

Share this post


Link to post
Share on other sites
Corrosive    162
Actually, I'm not looking for what you mean.

 

That's why I specified "as you posted" :)  You didn't give any specifics as to what you had, what you have tried already, or any other info!  I'm more than happy to help if you just need to connect some events, but I suspect you might need more than that...

Share this post


Link to post
Share on other sites
DarkXero    2886

@Maris:

local require = GLOBAL.requirelocal Widget = require "widgets/widget"local Text = require "widgets/text"local DEFAULTFONT = GLOBAL.DEFAULTFONTlocal mystrings = {	"asd", "sdf", "dfg", "fgh", "xyz"}local TopFive = Class(Widget, function(self, owner)	Widget._ctor(self, "TopFive")	self.owner = owner	self.top = {}	for i = 1, 5, 1 do		self.top[i] = self:AddChild(Text(DEFAULTFONT, 30))		self.top[i]:SetString(mystrings[i])		self.top[i]:SetPosition(0, -35 * (i - 1), 0)	endend)AddClassPostConstruct("widgets/statusdisplays", function(self)	self.top = self:AddChild(TopFive(self.owner))    self.top:SetPosition(0, -200, 0)end)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this