Help regarding enemies in BGT.

Hello Audiogamers.
It's been a longtime without posting, but here we go.
So I have learned quite a bit from open sources that I had before, but I do not try to clone. I just learn and recode all over. And those sources, are not big fancy once that you expect. Those were actually mason's sources here on the AGarchive.
Anyway. I have a game that uses sound positioning 1d. There is an enemy that spawns every a few seconds, and that enemy has a random position to spawn on.
However, the enemy does not spawn two times in the row or more, instead it only respawns when it dies.
And though I wanted to write a class for enemy, but it wasn't prior to my knowledge. Especially when we consider that the game is so small, and I don't know what variables it needs for a good class.
Anyhow, my question is the following: How do I make the enemy walk towards your x position every given time amount elapsed? Because the sound is positioned at where it randomly spawns, and it does not walk where you go.
So I , for vague, tried to do the following, and guess what, it didn't succeed. Partially because I didn't know how to do it, and a part of it is not supposed to work this way.
I made a timer called walktimer;
Inside an if statement I wrote:
if(enemypos==enemypos and walktimer.elapsed>600)
{
enemypos+=1;
}
But, it did not work out. So what are your suggestions?

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Cocoa via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ty via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Cocoa via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Cocoa via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Cocoa via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Meatbag via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ty via Audiogames-reflector

Reply via email to