March 7, 2023, 12:25pm
Somehow whenever i add Spawn Delay for mobs over 1 seconds game either breaks AI or after killing all enemies it spawn more than the limit of area
MaximumEnemies in area is 10
but when added Delay it goes over 10 and even 17??
Also made a chance to spawn thingy for mobs but it doesn’t spawn even 10?
it spawns 2~7 somehow and stops till all enemies in area die.
Also seperated AI to work after their spawn no matter how long its, and it works but instead till all of them spawns the script laggs itself.
Could you explain what ‘Chrythm’s RPG Kit’ is?
March 7, 2023, 1:17pm
I’ve created an RPG kit that anyone can now use! In this post, I will be explaining what it can do and how to use it. My main reasons for making this kit are: provide new developers and people who don’t code a system to work with easily, speed up the process for making RPGs, and provide my take on the way an RPG kit should be made.
THIS KIT REQUIRES THE PLACE IN USE TO BE PUBLISHED AND HAVE API ACCESS IN ORDER TO FUNCTION DUE TO THE SAVE SYSTEM BEING A REQUIREMENT TO BE COUNTED A…
it a RPG kit but feels better than evercyan and droplet ones.
but needs to be improved even further
March 7, 2023, 5:21pm
Looking back, WOW I wrote some messy code!!! I need to make a new one for sure.
Anyway, I think the reasoning this is happening is because adding a delay will pause the whole system.
Instead, try this:
On line 119 of RPGSystem, there is this line of code:
To add a delay, change it to this:
task.delay(1, SpawnEnemy, spawnRegion)
Feel free to change the delay time. I set it to one second as an example.
March 7, 2023, 6:25pm
yes it works but… in a different way i can say :d
i wanted it to work like “spawn enemies by their own timer” something like that
this one just delays the task but still spawns them all at the same time
March 7, 2023, 7:49pm
In that case, try task.spawn instead and remove the number for the delay time.
Then inside the spawn function, you can use task.wait(seconds) with the amount of time being read from the enemy somewhere. Something like task.wait(enemy.SpawnTime)
March 21, 2023, 7:50pm
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.