Solarus-Games English Forum

Solarus => Bugs & Feature requests => Topic started by: YoshiMario2000 on August 23, 2015, 09:10:54 PM

Title: REQUEST Direction decetion
Post by: YoshiMario2000 on August 23, 2015, 09:10:54 PM
Can you add a function for On_direction change and the ability to detect the direction that the npc/enemy change. So for things that have uneven directions like 8x16 or 16x32.
Title: Re: REQUEST Direction decetion
Post by: Christopho on August 23, 2015, 09:30:05 PM
You mean the direction of a sprite or the direction of a movement?
Title: Re: REQUEST Direction decetion
Post by: YoshiMario2000 on August 23, 2015, 11:07:54 PM
both.
Edit:
I want to be able to set a direction WITHOUT using randomization.
And Detect if a sprite is facing N/E/S/W
Title: Re: REQUEST Direction decetion
Post by: Christopho on August 24, 2015, 10:01:19 AM
For sprites you have the event sprite:on_direction_changed().
For movements, you have the event movement:on_changed(), and the event entity:on_movement_changed().