Solved I'm stupid..

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

Noblesuntzu

Active Member
Feb 18, 2017
63
4
8
32
Okay, I know this is completely ridiculous, but essentially I forgot how to check if a variable is equal to another variable.... example
{_1} is "%rounded altitude of attacker%"
{_2} is "%rounded altitude of victim%"
if "%{_1}%" is "%{_2}%"
broadcast "hi"

if "%{_1}%" is not an entity

Anyway, thanks, <3
 
First, you need to set the variables to a value:
code_language.skript:
set {_1} to "%rounded altitude of attacker%"
set {_2} to "%rounded altitude of victim%"
Then, you can check them:
code_language.skript:
if {_1} is {_2}:
    #do something
else if {_1} is not an entity:
    #do something more

EDIT: Not tested, but it should work
 
First, you need to set the variables to a value:
code_language.skript:
set {_1} to "%rounded altitude of attacker%"
set {_2} to "%rounded altitude of victim%"
Then, you can check them:
code_language.skript:
if {_1} is {_2}:
    #do something
else if {_1} is not an entity:
    #do something more

EDIT: Not tested, but it should work
Thanks!
[doublepost=1500730349,1500730303][/doublepost]
Vanilla skript:
code_language.skript:
on damage:
    altitude of the attacker is equal to the altitude of the victim
Thanks! I thought I tried this (that's why I went this wierd roundabout way XD). but it works! <3
 
Status
Not open for further replies.