ID:161760
 
I wanted to make a system like this
that when i click an object in one of my tabs of stat panel
it show my stat in a drop down list
its like this
i clicked that obj
then it showed My stats in That tab, then when i again clicked it, it rolled them up again.

If you do know how to do that please do tell me =( .
Hardik wrote:
I wanted to make a system like this
that when i click an object in one of my tabs of stat panel
it show my stat in a drop down list
its like this
i clicked that obj
then it showed My stats in That tab, then when i again clicked it, it rolled them up again.

If you do know how to do that please do tell me =( .

mob
var
showstats = 0
Stat()
//codes blah blah blah
//your button might be located here
//codes blah blah blah
if(showstats)
stat("Health:", "???")
//codes blah blah blah
//your button might be located here
//codes blah blah blah
obj
Button
name = "ButtonName"
proc/Toggle_DropDown()
if(usr.showstats) usr.showstats = 0
else usr.showstats = 1
Click()
Toggle_DropDown()
In response to Jemai1
Never use "usr" in a proc. The following code fixes that and is a bit more robust.
obj
Button
name = "ButtonName"
proc/Toggle_DropDown()
src.showstats=!src.showstats

Someone with more experience than me may point out something else that's incorrect.
In response to Silicon Viking
Yea.. I'm a newbie..
Thanks for the tips. ^^
In response to Silicon Viking
Sorry seems like this is not what i wanted.
ok i'lll be more clear now
what i want is this
if i click a word in my stat panel it drop downs stats below tht word.


What ur code did was just toggled tab, which i dont need to.
In response to Jemai1
I'm a newbie myself. The part about the ! operator in this article made me think of your post.
In response to Hardik
I don't think it's possible, but, like I said, I'm a newbie.
In response to Silicon Viking
yes it is check out Way of the shinobi 2.0 :/
In response to Hardik
I've been away a while, so interface files are new to me. Maybe it has something to do with that. What does the drop-down list look like? Does it look like a list of verbs you get when right clicking on something with verbs? (I hope you understood that; it wasn't very well explained.)
In response to Silicon Viking
Its like when u click the verb in the stats panel your stats appear in an dropdown list.
i'll just try figure it out myself then :/
In response to Hardik
Okay, so you didn't understand. Wait for someone with more experience to help you, because I cannot.
Like this?

mob
Stat()
statpanel("Statistics")
stat(new/obj/togglebutton_stats)
if(show1)
stat("stat1")
stat("stat2")
stat("stat3")
stat(new/obj/togglebutton_inventory)
if(show2)
stat("Inventory")
stat("Nothing here :(")
var
show1=1
show2=1

obj
togglebutton_inventory
name="Toggle Inventory"
Click()
if(!usr.show2)
usr.show2=1
else usr.show2=!usr.show2
togglebutton_stats
name="Toggle Stats"
Click()
if(!usr.show1)
usr.show1=1
else usr.show1=!usr.show1


Worked for me =/ however there is probably an easier way of doing it.
In response to Scizzees
Phew finally what i wanted.
Thanks Kai/Scizzees
In response to Scizzees
 
obj
togglebutton_inventory
name="Toggle Inventory"
Click()
usr.show2=!usr.show2

togglebutton_stats
name="Toggle Stats"
Click()
usr.show1=!usr.show1