Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
The solution might be to replace the 'Transform a sprite' action with the 'Execute a piece of code' action with the following code inside:
Hopefully that works.
OMG! thank you! I was debating writing a completely different code to fix the problem but this may work and it makes more sense then what I was going to do!
When I used the angle_image = 180 it just turned my guy upside down but I came up with something a little better, it took me a little while to understand if statements but this is the code I used to make it go in the opposite direction.
weapon = instance_create(x,y,obj_weapon);
weapon.speed = 5
if (image_xscale = -1)weapon.speed = -5;
Also, good job on finding out image_xscale and using that to flip a sprite.
Good luck on your future coding endeavours :)
remember that direction is a variable that moves an object in a certain direction on teh screen while image_angle is the rotation of a sprite. You use speed along with direction to make an object move in a certain direction. You would use a negative speed if you want the object to move opposite of direction
example