GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2009-11-24 04:27:33

Fluidic Ice
Member
Registered: 2009-11-24
Posts: 2

Draw_Sprite_Wave Rotation

Hello, In the code "draw_sprite_wave_ext" There wasn't an option included that allowed me to change the image_angle of  the sprite being created, Is this possible as I'm looking to use this for the player when they disappear. It's a very good effect but I'm unable to use it without this. I'd be grateful for any help with this matter. Thanks.

The link to the code is below:
http://www.gmlscripts.com/script/draw_sprite_wave_ext

~Fluidic Ice~

Last edited by Fluidic Ice (2009-11-24 07:37:21)

Offline

#2 2009-11-24 15:03:35

xot
Administrator
Registered: 2007-08-18
Posts: 1,239

Re: Draw_Sprite_Wave Rotation

I think this will do what you want. Use d3d transforms to rotate and position the sprite. Note that the sprite is then drawn at (0,0). You do not need to start d3d mode in order to use the d3d_transform functions (and most other d3d functions).

Expandd3d_transform_stack_push();
d3d_transform_add_rotation_z(image_angle);
d3d_transform_add_translation(x, y, 0);
draw_sprite_wave_ext(sprite_index, image_index, 0, 0, axis, wavelength, amplitude, phase, xscale, yscale, blend, alpha);
d3d_transform_stack_pop();

Abusing forum power since 1986.

Offline

#3 2009-11-24 21:15:43

Fluidic Ice
Member
Registered: 2009-11-24
Posts: 2

Re: Draw_Sprite_Wave Rotation

Thanks man! I love your scripts, There are none like them anywhere on the web, Keep it up!

~Fluidic Ice~

Offline

Board footer

Powered by FluxBB