#FUNCTIONS QUESTION

1 messages · Page 1 of 1 (latest)

glossy fractal
#

so when this is passed before going through the endgame function everything is fine and passes/is set correctly

        else if all:
            metadata tag "health" of {_p1} > 0 
            {ai::health::%world of {_p1}%} <= 0
        then:    
            endGame("default", "%{_p1}%", "ai")
            stop

BUT AS SOON AS {_p1} goes to the endgame function it can never be parsed as a player???

ornate atlas
#

can I ask why you dont just pass in {_p1} not in a string?

glossy fractal
#

endgame function all 3 things are parsed as text originally

glossy fractal
#

or wait

#

it is passed not as a string


function checkInitialSpawns(p1: player, p2: text):

I forgot i did that lol

ornate atlas
#

you can do something like function example(p1: object, p2: object): if {_p1} is a player: ... else if {_p1} is a string: ...

glossy fractal
#

like literally instead of text make it object for function creation

glossy fractal
#

x8 you are a skript god send thats all i had to do to make it work