ID:172740
 
I have to question:
First, when you add an overlay to a mob, when the mob moves, will the overlays change there icons to match the direction (if the overlay it an icon that changes direction)


Second, how do you use : and ?
FranquiBoy wrote:
I have to question:
First, when you add an overlay to a mob, when the mob moves, will the overlays change there icons to match the direction (if the overlay it an icon that changes direction)


Second, how do you use : and ?

First, you don't use ":" as a replacement for "."
There are very few situations where you'll actually *need* to do so.

? is used to do a quick if() statement as follows:

condition ? DoIfTrue : DoIfFalse
In response to Jon88 (#1)
ok, can someone give me an exemple when to use : and can someone answer my first question?
In response to FranquiBoy (#2)
FranquiBoy wrote:
ok, can someone give me an exemple when to use : and can someone answer my first question?

Use : whenever you do a shorthand if with ?

For example:
player << player.name == "Jon88" ? "Hi Jon88!" : "Who are you?"


And concerning your first question, try it yourself and see. For some reason I think that it does, though.
In response to Jon88 (#3)
Allright, I'll try, thanks