trying to compare victim to dolphin

  • 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.

Kron1K

Member
May 13, 2019
3
0
0
31
Im trying to compare a "victim" to the mob type dolphin, but its not working. All other mob types are working.

I get the error "cant compare an entity with a visual effect"

What am I doing wrong?

Code:
if victim is cod:
  drop 1 cod spawn egg
if victim is dolphin:
  drop 1 dolphin spawn egg
 if victim is mooshroom:
  drop 1 mooshroom spawn egg

full script - https://pastebin.com/Mn1sDM4E
 
Im trying to compare a "victim" to the mob type dolphin, but its not working. All other mob types are working.

I get the error "cant compare an entity with a visual effect"

What am I doing wrong?

Code:
if victim is cod:
  drop 1 cod spawn egg
if victim is dolphin:
  drop 1 dolphin spawn egg
 if victim is mooshroom:
  drop 1 mooshroom spawn egg

full script - https://pastebin.com/Mn1sDM4E
I dont know if this has influence, but try with:
code_language.skript:
victim is a cod:
 
I dont know if this has influence, but try with:
code_language.skript:
victim is a cod:


The cod is working fine. I only put that bit of code there to show that the dolphin line is no different from the others, yet it wont work.
 
How about putting this code:

Code:
on damage:
    send "%victim%"
then just hit a dolphin in your server to get it's type. For example if in chat it says "dolphin1", then in skript, write:
Code:
if victim is dolphin1:
 
This might be one of those bugs with Skript.

Try this
code_language.skript:
if victim is dolphins:
I know it looks stupid, but it doesn't seem to run errors in console, so it probably works.
 
This might be one of those bugs with Skript.

Try this
code_language.skript:
if victim is dolphins:
I know it looks stupid, but it doesn't seem to run errors in console, so it probably works.

Sorry for the late reply, I got this fixed with some help on discord.
The fix was using
code_language.skript:
if victim is entity type "dolphin":
 
Status
Not open for further replies.