I have a few questions to ask.
1. If I had multiple character icons for people to use during the game and I had a command called stance which changes the icon to the stance version. But when I press it, it only uses the first stance icon. How would I get the right stance icon to match up with the right character icon?
This is what I have:
mob/verb/stance()
set src in view()
name = "stance"
desc = "You shift into your battle stance!"
flick("stance",usr)
usr.icon = 'charas.dmi'
icon_state = "stance"
Also, how would I make a certain face icon be the default icon to a certain character? So when the person logs in using that character than the face icon will automatically be added.
ID:267391
Apr 3 2003, 12:17 pm
|
|
In response to Dagolar
|
|
Even better, have a different .DMI file for each character icon. Much easier, and it avoids conflicts between icon_states for different characters (like what you're experiencing).
|
In response to Dagolar
|
|
I added in the
flick("[icon_state]Stance",usr) and got the following errors :\ commands.dm:29:error:icon_state:value not allowed here commands.dm:29:error::empty type name (indentation error?) commands.dm:29:error:text "[]Stance":value not allowed here commands.dm:29:error::duplicate definition commands.dm:29:error:usr:duplicate definition hmm... what is wrong? |
In response to Evolution Relic
|
|
Where did you put that line?
|
How I would do this...let's say you have 2 characters, but this can work for as many as you want. The icon_state names are: Character1, Character2. Each has its stance, as you say. Name those icon_states: Character1Stance, Character2Stance, and so on, something like that.
Then when you go to flick it, do this:
flick("[icon_state]Stance",usr)
[icon_state] will be Character1, if that's your character. So when it flicks, it will come out as "Character1Stance", just like you wanted. Saves room, saves time, and you separate them like you wanted. Any more questions, or confusion, just say so.
-Dagolar