Get stuck on a complicated random system.
greedydady
Member Posts: 35
Hey there everybody! So far i am working quite well on my project.
However, here comes the greatest challenge for me. I still not get a clue on it for few days.
This is called "Random enemies to a random spot" system.
The basic concept is:
1. Every a random time, a spawner randomly picking one of the enemies (a fix number every level) move to one of the 5 random locations.
2. The enemy wont move to a spot that contains an enemy inside.
3. Until the enemy in the spot has been destroyed, the spot will be available for random again.
I am trying to use the add/remove row function.
Whenever an enemy move to a location, remove the row it belong to. Until 5 rows removed(5 location get used). Copy the master table back to it. But it seems not working well.
If the enemies inside the spot never been destroyed (Which mean the 5 spots all contained an enemy). Later, the random enemies will move to the spot that already contained an enemy. I never want this happen.
My goal is: whenever there are at least one spot available, after a random time, random an enemy to one of these spot.
Is there any suggestion for me?
Is there a method that can add row one by one to a table?
However, here comes the greatest challenge for me. I still not get a clue on it for few days.
This is called "Random enemies to a random spot" system.
The basic concept is:
1. Every a random time, a spawner randomly picking one of the enemies (a fix number every level) move to one of the 5 random locations.
2. The enemy wont move to a spot that contains an enemy inside.
3. Until the enemy in the spot has been destroyed, the spot will be available for random again.
I am trying to use the add/remove row function.
Whenever an enemy move to a location, remove the row it belong to. Until 5 rows removed(5 location get used). Copy the master table back to it. But it seems not working well.
If the enemies inside the spot never been destroyed (Which mean the 5 spots all contained an enemy). Later, the random enemies will move to the spot that already contained an enemy. I never want this happen.
My goal is: whenever there are at least one spot available, after a random time, random an enemy to one of these spot.
Is there any suggestion for me?
Is there a method that can add row one by one to a table?
Answers
Don't want to sound like a fool, but i hope this is what you've been looking for.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User