Solved delete event-entity

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Flynn_LG

Member
Nov 4, 2019
38
1
8
26
Hey guys,

here is my script:
Code:
on pickup of emerald:
    name of item contains "Secret Item":
        delete event-entity
        if player's world is "Lobby":
            broadcast "%event-player% found the secret!"

And yes it does not remove the item from the player... Why?
 
Assuming you are trying to remove the emerald from the player when found, here you go
Code:
on pickup of emerald:
    name of item contains "Secret Item":
        cancel event
        if player's world is "Lobby":
            broadcast "%event-player% found the secret!"
 
Assuming you are trying to remove the emerald from the player when found, here you go
Code:
on pickup of emerald:
    name of item contains "Secret Item":
        cancel event
        if player's world is "Lobby":
            broadcast "%event-player% found the secret!"

I want this xD After collecting the item, the item should be deleted.
[doublepost=1582978978,1582924757][/doublepost]Guys? Please help
 
Code:
on pickup of emerald:
    name of item contains "Secret Item":
        cancel event
        if player's world is "Lobby":
            broadcast "%event-player% found the secret!"
            kill event-entity
 
assuming the name of the item is "Secret Item":
Code:
on pickup of emerald:
    name of item contains "Secret Item":
        wait 0.5 seconds
        remove 1 emerald named "Secret Item" from player
        if player's world is "Lobby":
            broadcast "%event-player% found the secret!"
 
remove the item doesn't work..
try this then.
Code:
on pickup of emerald:
    name of item contains "Secret Item":
        wait 0.5 seconds
        remove event-item from player
        if player's world is "Lobby":
            broadcast "%event-player% found the secret!"
 
try this then.
Code:
on pickup of emerald:
    name of item contains "Secret Item":
        wait 0.5 seconds
        remove event-item from player
        if player's world is "Lobby":
            broadcast "%event-player% found the secret!"
Too..
 
Sorry xD I speak german, I mean the item remove doesn't work..
[doublepost=1582983271,1582982386][/doublepost]
I have no idea what "Too.." means, can you be more descriptive?
Do you have any ideas for my problem?
[doublepost=1582999226][/doublepost]Fixed on discord:

Code:
cancel event
delete (event-dropped item)
 
Status
Not open for further replies.