|
hiftu Newbie
Joined: 25 Mar 2003 Posts: 3
|
Posted: Tue Mar 25, 2003 2:10 pm
button creation from variable |
Hello,
I have a problem with creating button from a variable.
monsters - name of the monster.
#LOOP 1,%numitems( @monsters) {
#SHOW %i
#BUTTON %i {kill %item( @monsters, %i)} {kill %item( @monsters, %i)} } {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} "" {} {} {}
}
I want some buttons to kill the chosen monster.
But the result is:
kill %item( @monsters, %i)} instead of
kill bigmonster
(The second command is not evaluated... :(
Is there any solution? |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Tue Mar 25, 2003 4:23 pm |
Use #EXEC and %concat to force expansion:
#EXEC {%concat("#BUTTON %i {kill %item( @monsters, %i)} {kill ", %item( @monsters, %i)"} {} {} {} {} {} {} {} {} {} {} {} {} {} {} {} ", %char(34), %char(34), " {} {} {}")}
Kjata |
|
|
|
hiftu Newbie
Joined: 25 Mar 2003 Posts: 3
|
Posted: Tue Mar 25, 2003 7:28 pm |
Thanks,
I created this trigger.
You have to create pattern for entering a room. (or looking around)
#delc buttons
#class buttons
#FORALL @monsters {#exec %eval(#bu %i {kill %i} {kill %i})} |
|
|
|
|
|
|
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
|
|