How to check if a object is non existent

Fill this out this info to make it easier for the community to help you! If you don’t fill out this information, your post may be deleted or removed.

What Wick Editor Version are you using?
Ex. 1.18. You can find this on the splash screen when the editor opens.
1.19.3 (of course)
Describe the Problem
What issues are you having in the Wick Editor?
I’m making a game with enemies but I wanna check if a enemy doesn’t exist, because ~= doesn’t work
What have you tried so far?
Have you attempted anything et to fix the problem? Let us know!
Use a variable called enemies killed
Do you have a Wick Editor File that we can see? Optional*
Attach a .wick file if you have one in progress that can help us help you!

No

This might be feature suggestions

this is javascript not lua, so ~= would be != or !==

try

if (myObject) {
  // it exists
} else {
  // it does not exist
}

it will convert that into a Boolean which is false if it’s something like null or undefined, and true if it isn’t. I think. mostly. Most of the time. Uhh, as long as it’s an only either an object or null/undefined it should be fine.

1 Like

do you want to check if a clip clone exist?

1 Like