Ok, so I was experimenting with a sword slasher game, and I have this problem. The code is fine, but nothing happens.
Here it is:—–Key Press 'X'—– if image_index = 0 instance_create(x,y,obj_blockmask) with sprite_index = spr_blockmaskup hspeed = 0; if image_index = 1 instance_create(x,y,obj_blockmask) with sprite_index = spr_blockmaskdown hspeed = 0; if image_index = 2 instance_create(x,y,obj_blockmask) with sprite_index = spr_blockmaskleft hspeed = 0; if image_index = 3 instance_create(x,y,obj_blockmask) with sprite_index = spr_blockmaskright hspeed = 0;—–And basically whats supposed to happen, is, if the image index = 0, which is the guy facing up, it'll instance create obj_block mask, which is used to test if the enemy is in collision with the sword, and if it will receive damage. The sprite_index is just what it is, the sprite, hspeed so the character doesnt move while blocking.If you could please help me fix this thatd be great.-DSDownload—–Not all sayings are worth listening toP.S. (I didnt want to triple post) I fixed everything, thanks kenon
ok. your problems are the with codes.
try this.why do you come here? O_o
Kenon's code is 100% correct.
@Rawrspoon: Some of us know what we're talking about with GM :D
works fine, but the mask isnt where its supposed to be. I made them so if i overlapped them they would be in the correct position. But now theyre a little but to the bottom right.
rawr what do you mean?Sorry for double posting, i see no edit button, but another problem is, i need it so if i hold X, it will stay, if i press/hold, it will just do all its sub images(1) and then disappear again
I mean that asking us is like asking a bear for honey.
it's stupidSo your saying i dont need to be polite and ask? Just say, give me the code for this?
ANOTHER double post, (if anyone knows how to edit a post could you tell me?)
Ok, I fixed the positioning, but now the problem is, I need it to stay for however long I hold the buttonno he's saying dont ask at all.
you already posted it on the gmc anyway