Change sprite of an object
#1
Posted 03 June 2012 - 08:29 AM
Please help
Thanks alot
#2
Posted 03 June 2012 - 08:39 AM
easy peasy:How can i change sprite of an object when it gets touched by a bullet object
Please help
Thanks alot
one way is using a DnD action
code:
sprite_index = your_sprite_name; image_index = 0; // it is the subimage 0 to your max number! // or use: draw_sprite(sprite_name,image_index,x,y) // this goes in the draw event!look up (draw_) for more draw stuff!
#3
Posted 03 June 2012 - 08:44 AM
easy peasy:
How can i change sprite of an object when it gets touched by a bullet object
Please help
Thanks alot
one way is using a DnD actionchoose your sprite!
code:sprite_index = your_sprite_name; image_index = 0; // it is the subimage 0 to your max number! // or use: draw_sprite(sprite_name,image_index,x,y) // this goes in the draw event!look up (draw_) for more draw stuff!
Can you see whats wrong with this:
when the object gets hit it doesn't change sprite
http://i1081.photobucket.com/albums/j360/naseem142/oigp.png
EDIT: Don't mind the code in the first line , it just decreases enemy's health by one and i don't think it interrupts everything else
Edited by naseem142, 03 June 2012 - 08:46 AM.
#4
Posted 03 June 2012 - 08:47 AM
what is sprite40 and sprite38?
easy peasy:
How can i change sprite of an object when it gets touched by a bullet object
Please help
Thanks alot
one way is using a DnD actionchoose your sprite!
code:sprite_index = your_sprite_name; image_index = 0; // it is the subimage 0 to your max number! // or use: draw_sprite(sprite_name,image_index,x,y) // this goes in the draw event!look up (draw_) for more draw stuff!
Can you see whats wrong with this:
when the object gets hit it doesn't change sprite
http://i1081.photobu...eem142/oigp.png
also what is in the script?
alarm 11 event? (it is alarm 11 not alarm 0)
Edited by creators124, 03 June 2012 - 08:56 AM.
#5
Posted 03 June 2012 - 08:54 AM
what is sprite40 and sprite38?
easy peasy:
How can i change sprite of an object when it gets touched by a bullet object
Please help
Thanks alot
one way is using a DnD actionchoose your sprite!
code:sprite_index = your_sprite_name; image_index = 0; // it is the subimage 0 to your max number! // or use: draw_sprite(sprite_name,image_index,x,y) // this goes in the draw event!look up (draw_) for more draw stuff!
Can you see whats wrong with this:
when the object gets hit it doesn't change sprite
http://i1081.photobu...eem142/oigp.png
also what is in the script?
alarm 0 event?
okay here is everything
http://i1081.photobucket.com/albums/j360/naseem142/dhfjhjh.png
EDIT: alarm 11 is a sound
Edited by naseem142, 03 June 2012 - 08:54 AM.
#6
Posted 03 June 2012 - 09:00 AM
ok one more thing just tell me what is the "if there is a collision at a posi"?!
<snip>
what is sprite40 and sprite38?
also what is in the script?
alarm 0 event?
okay here is everything
http://i1081.photobu...142/dhfjhjh.png
EDIT: alarm 11 is a sound
but It think you should put the script at the end!
#7
Posted 03 June 2012 - 09:55 AM
#8
Posted 03 June 2012 - 10:10 AM
#9
Posted 03 June 2012 - 10:11 AM
But thanks for trying to help
+1
#10
Posted 03 June 2012 - 10:13 AM
what sprite are you trying to change to!I still need help :S
you flash in one step as sprite 40 then to sprite 38!
no idea why you need that collision check inside the collision event! (USELESS!)
please tell us!
EDIT:
WOW!
I'm getting ninja'd too much!
Edited by creators124, 03 June 2012 - 10:14 AM.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











