Skript: 'remove %entity%' effect to call entity.remove()

Created on 17 Nov 2017  路  7Comments  路  Source: SkriptLang/Skript

Based on convo in #974.

Alternatively, the delete changer on an entity could be made to do this instead of needing a new effect; both options are just as good. I know this is already implemented for some entities where killing them calls their remove(), but it would be nice to have this option for all entities so you don't have to (for example) teleport living entities into the void to "remove" them without creating drops.

enhancement low

Most helpful comment

All good ideas. Maybe I could implement them all, too.

All 7 comments

This used to work. It's a bug.

clear target entity

@TheLimeGlass that works, the issue is when you have an entity which is saved in a variable, it'll delete the variable instead of killing the entity.

And I don't think remove %entity% as syntax would be good as it is already used by the change effect. That said, my suggestion is the following addition to the kill effect:

kill %entities% without drops #this would be matchedPattern #2

Of course using the Entity#remove method will do more than that but that's the first thing I came with.

I could get behind that syntax: whatever works and makes sense is good by me. It's definitely a long-needed feature IMO.

I had the idea of having the syntax

%*classinfo% (from|[out] of) %objects%

and it would be used like this:

delete entity out of {_e}

All good ideas. Maybe I could implement them all, too.

For now you can use this workaround:

Closing this in favor of #2240

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

Coolfire02 picture Coolfire02  路  3Comments

Eryk1983S picture Eryk1983S  路  3Comments

Anarchick picture Anarchick  路  3Comments

Anoniempje1234 picture Anoniempje1234  路  3Comments