• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Help - my bomb isnt appearing.

DreTazzz

Member
Hi there. I coded to have a Protagonist on a path...when he reaches the end of the path he stops, and then he should create a bomb that appears in his hand. The bomb is not appearing. I already created a sprite and object for the bomb. Everything else works fine. Suggestions please? :)

I attached a snapshot of the Events for the Protagonist.
 

Attachments

S

squirrelah

Guest
I am not super familiar with the drag and drop game making section, but when I am programming and something isn't appearing after its been created 99% of the time its because in the draw section I forgot to add draw_self();

That or the object gets placed but i don't have it updating where it should be. So if you have the bomb spawn somewhere off-screen, and it's not being told to constantly follow the player around it will just stay there.
 

curato

Member
you are creating it at the same x an y as the player you likely need to look at the offset between the origin of the sprite and where you want the bomb to appear in his and adjust your creation spot. The bomb is likely behind the protagonist object.
 

johnwo

Member
You're setting the Alarm0 timeout in the alarm itself, so I assume looping is the intention?
Where do you set the alarm first?
 
Last edited:

DreTazzz

Member
I am not super familiar with the drag and drop game making section, but when I am programming and something isn't appearing after its been created 99% of the time its because in the draw section I forgot to add draw_self();

That or the object gets placed but i don't have it updating where it should be. So if you have the bomb spawn somewhere off-screen, and it's not being told to constantly follow the player around it will just stay there.
Ok, thank you very much for responding. I will look into that. :)
 

DreTazzz

Member
You're setting the Alarm0 timeout in the alarm itself, so I assume looping is the intention?
Where do you set the alarm first?
Hello. Yes, looping is the intent. I first set the Alarm under Create, because I initially need it to start a little later - after the room starts with a little intro.
 

DreTazzz

Member
you are creating it at the same x an y as the player you likely need to look at the offset between the origin of the sprite and where you want the bomb to appear in his and adjust your creation spot. The bomb is likely behind the protagonist object.
Hi there. I made the origin of the spirte bomb at the bottom of the bomb (43,110)...and I made the origin of the sprite Protagonist at the top of his hand (71, 131) - hoping it would make the bomb appear on his hand. I have both objects of the sprites at same depth of -70. How do I figure the offset, please?

I created the objec bomb to appear at Protagonist.x and Protagonist.y
 

jackquake

Member
Also you may want to check out the lengthdir functions designed for this sort of thing. Here is a good tutorial if this is new to you.
 

johnwo

Member
Try creating the instance before setting the path.
I don't use DnD but I assume that "Set Path" sets x/y to the start of the path, thus making the new instance create at that position.
 
Top