0
\$\begingroup\$

The code shown below is meant to change the size of a bullet based on a changing variable. But when I put this code in the create tab, the size of the bullet stays the same, regardless of the variable's value.

image_xscale = global.Pwr;
image_yscale = global.Pwr;
\$\endgroup\$
2
  • 2
    \$\begingroup\$ You don't tell us how you use this code, how those variables are being used? \$\endgroup\$ Commented Jan 8, 2022 at 22:04
  • 1
    \$\begingroup\$ The image_*scale instance variables resize an instance's sprite unless custom drawing code is defined by you in the Draw Event. When is this code being called? How are you rendering the object sprite? \$\endgroup\$ Commented Jan 10, 2022 at 23:53

1 Answer 1

1
\$\begingroup\$

Place this code in the step of your object, not the create tab.

image_xscale = global.Your_variable;
image_yscale = global.Your_variable;
\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.