|
qdly Beginner
Joined: 26 Jun 2009 Posts: 13
|
Posted: Mon Aug 09, 2010 6:33 pm
status window vs array variables |
oooki, here is my problem, im trying to make cmud to show spell that are currently active on me, at status window
typical spell looks like
spell: 'spell_name' afffects 'whatever' for '10' hours.
i'v put my points of interest in ''
so, i'v nice triger that creates array, so array looks like this:
spell_name|whatever|10
lets say array name is 'aff'
and finally status window, i need other order, so...
%arrget(aff,2) %arrget(aff,1) %arrget(aff,0)
works damn nice, i get all i want, shown in my status window, but some time pass, i check my affects again, array changes, but status window doesn't, i assume arrget doesn't work same way as just using @variables, any solution to make it work? i know i can use just normal variables, but i hate thought of making like 30 variables changing every tick, or getting vars from arrays into normal variables just to update, damn nasty way... |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Mon Aug 09, 2010 7:34 pm |
The status window get's refreshed when you re-assign it, or when one of the variables it uses get updated. Reassigning would be tedious and not really what we want to do. Unfortunately since you're using a function call CMUD doesn't know that you've actually updated the status.
You can take two approaches.
1. This what I use for my more complex status windows. I build a variable containing all the text and formatting I want displayed in the status window, and assign that variable to the status window. That way when I recalc that variable (let's call it StatInfo) the status window will be refreshed.
2. A simpler approached that should work for you is just a variable at the end of you status window that you update. Call it StatUpdate. When StatUpdate changes the entire window get's redone. The value must change. You can simply toggle back and forth having it be equal to an empty string ("") and a space (" "). |
|
_________________ Asati di tempari! |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|