Author Topic: Clear/Explode ALL projectiles (Super admin only)  (Read 2853 times)

/ExplodeProjectiles - Explodes most of the projectiles that have been added to missionCleanup
/ClearProjectiles - Clears most of the projectiles that have been added to missionCleanup

Script_ProjectileClear
« Last Edit: April 20, 2014, 12:14:06 PM by Advanced Bot »


Thanks. I needed this the other day when I made a box that bounced projectiles at twice the speed and constantly fired more. It was a pain in the ass to clean up.

/cancelAllEvents?


Why "most"?
It doesn't seem to clear/explode all of them for some reason.


/cancelAllEvents?

???

This clears all projectiles too.

Wow... I knew you would do this to me.

So, you saw my Coding help thread,
http://forum.blockland.us/index.php?topic=256274.0
And without any credit what so ever, posted this addon?


You idiot.
« Last Edit: April 20, 2014, 06:38:18 AM by Ducky duck »

Wow... I knew you would do this to me.

So, you saw my Coding help thread,
http://forum.blockland.us/index.php?topic=256274.0
And without any credit what so ever, posted this addon?

You idiot.

Without any credit to whom? Your not the first nor will be the last person to think of a /clearProjectiles event, and if a person wants credit for some code theyre giving, they can just ask for it.


It doesn't seem to clear/explode all of them for some reason.

Let me guess, your doing a loop in missionCleanup, from 0 to missionCleanup.getCount(), and deleting any projectiles that you find? Try decreasing your loop variable after every time you delete a projectile. When you delete it, the list shifts up, and then as your loop variable increases there will be some objects that it skips.
Alternatively, start at missionCleanup.getCount()-1, and loop down till loop variable >= 0. That will ensure that it finds every object, even if some are deleted during the process.

Without any credit to whom? Your not the first nor will be the last person to think of a /clearProjectiles event, and if a person wants credit for some code theyre giving, they can just ask for it.
well this thread was really a richard move by Advanced

he posted in Ducky's thread and then does this

/cancelAllEvents?
???

This clears all projectiles too.
ummm yeah why dont you use /cancelallevents

ummm yeah why dont you use /cancelallevents
because what if you don't want to cancel events

I can only see this being useful for like Spade's arcade where you may want to clear spammy projectiles without breaking/having to reset every single game in the server.

because what if you don't want to cancel events
whenever i do it none of my events get canceled