Author Topic: Stumped in /ClearProjectiles  (Read 2216 times)

Ok so, I am trying to make a code that clears all the projectiles in a server and I am stumped at this part-

Code: [Select]
{
function ClearProjectiles::????(%???, %???, %???)
{
??????????????????????
{

Im new to coding and the two things I don't know how to do here are, make it happen when I say /clearprojectiles and what happens, all I have is a code that finds all active projectiles,
Code: [Select]
ProjectileData::onAdd
I added RTB Preffs and everything else works, but this...

Don't make two coding help topics on the same issue.
Code: [Select]
{
function ClearProjectiles::????(%???, %???, %???)
{
??????????????????????
{
No. Bad.
Im new to coding and the two things I don't know how to do here are, make it happen when I say /clearprojectiles and what happens, all I have is a code that finds all active projectiles,
Code: [Select]
ProjectileData::onAdd
You must be very to coding if you don't even know how to make a server command.


Look at add-ons similar to what you want to make.

Quote
Look at add-ons similar to what you want to make.

Where would I find the /clearallbricks command ibl?

I don't think there is an easier way to clear projectiles. Most of the projectiles are in MissionCleanUp. Clearing/deleting this will most likely break the server.

The source for default blockland commands is not available, unless it was rewritten by a community member.

What I would do is create an array of projectiles and add projectiles to the array as they are instantiated, and remove them as they are destroyed. Then for the clear projectiles command you would parse the array and delete them all individually.

The source for default blockland commands is not available, unless it was rewritten by a community member.

What I would do is create an array of projectiles and add projectiles to the array as they are instantiated, and remove them as they are destroyed. Then for the clear projectiles command you would parse the array and delete them all individually.
Never thought of this.

Try to make a simgroup to put them in by packaging Projectile::onAdd.

I don't think there is an easier way to clear projectiles. Most of the projectiles are in MissionCleanUp. Clearing/deleting this will most likely break the server.
Why not just loop through missionCleanup and delete all projectiles?

Why not just loop through missionCleanup and delete all projectiles?
Or... That..

I was starting to think about this too, a lot easier; but I wonder how much missionCleanup has in there average. Seems my server has about 1000 objects in there, not sure if other servers will have that much

Why not just loop through missionCleanup and delete all projectiles?
I didn't know that existed. Use that.

You must be very to coding if you don't even know how to make a server command.
Very what to coding?


Why not just loop through missionCleanup and delete all projectiles?

No, because if there's 50,000 bricks in the server then you will have 50k+ objects to loop through.

No, because if there's 50,000 bricks in the server then you will have 50k+ objects to loop through.
That's weird, I have like 21k bricks and missioncleanup has a lot less than that

No, because if there's 50,000 bricks in the server then you will have 50k+ objects to loop through.

MissionCleanup is not the same as the children of MainBrickGroup.

new
I know. I just wanted to point out his word structure