How to scale image at runtime in GameMaker?

by marsh-wiggle   Last Updated January 06, 2019 18:13 PM

I use this code to create a new enemy and preset some values:

It runs in the step event of the player object.

var inst_inst = instance_create_layer(newX, newY, "Instances_Enemies", obj_Asteroid01);     
inst_inst.image_index.image_xscale = 0.1;
inst_inst.speed = 4;

The speed is set correctly but the code scales the image of the player sprite and not the sprite of obj_Asteroid01

Tags : game-maker


Related Questions


Struckd 3D game development app

Updated April 19, 2019 06:13 AM

New to game development, need info pls

Updated July 19, 2015 13:05 PM

Want to learn game development from scratch

Updated October 11, 2018 04:13 AM

How can i download GTA IV 5 game for my laptop

Updated July 29, 2018 22:13 PM

How to learn game development?(PC and Mobile)

Updated March 24, 2019 14:13 PM