80sboy
Central Cavern
Posts: 2
|
Post by 80sboy on Nov 28, 2023 19:31:14 GMT
Hi, I'm newbie on this. I'm starting with a shooting game for ZX Spectrum with MPAGD.
My idea is a game where the player can shoot to other enemy sprites, and these enemies shoot ramdomly on the direction they are facing.
The first thing is easy, and I already made it, but how can I make the enemies shoot?
Where must be the code for this written?
How can I do the enemy can shoot?
Spawning a new sprite within the enemy behavior code?
Thanks in advance!!
|
|
|
Post by pachic on Nov 29, 2023 3:45:40 GMT
HI , here u can found a lot of help about spawn and yes it s with spawn. using the x and y and copare with x y of enemy and using some random time u can achive that. maybe can use others variables to check in an event or other.
|
|
80sboy
Central Cavern
Posts: 2
|
Post by 80sboy on Nov 29, 2023 15:12:26 GMT
Thanks, it's ok.
I found an example made by @minilop that can help me.
My thanks to all what share the source code of their projects!!
I will also share mine when it be completed.
Regards
|
|
|
Post by xavisan on Dec 7, 2023 15:26:50 GMT
Hi, I'm newbie on this. I'm starting with a shooting game for ZX Spectrum with MPAGD. My idea is a game where the player can shoot to other enemy sprites, and these enemies shoot ramdomly on the direction they are facing. The first thing is easy, and I already made it, but how can I make the enemies shoot? Where must be the code for this written? How can I do the enemy can shoot? Spawning a new sprite within the enemy behavior code? Thanks in advance!! The process is almost the same as with the player, you can use random or time to trigger it, the process is very similar, the best way is to try and see results to adjust it to what you want to do, in the forum there is a Method , but in the end it is better to try all the options that MPAGD has at the sprite and player level, so that you correctly understand the process and options.
|
|