#DOWN

1 messages · Page 1 of 1 (latest)

dusk kernel
#

hi guys , i made a skript give attacker item if he killed some1 .
but if u killed 2+ the sec item can't be collected with the first one ? any1 help < :
edit: I MEAN Sometimes he gives me two items that can be collected. Meanwhile, it gives a different item (same nbt,same name) that does not match the others

on death:
    if "%region at victim%" contains "ffasword":
        set {_head} to skull of "TheGoldenWarrier" parsed as offline player 
        set name of {_head} to "&e&lGOLDEN HEAD !"
        give {_head} to the attacker 
prisma notch
#

You could set the golden head to a global variable item and use that

#

Might make it the same item every time

dusk kernel
#

or send me any url

prisma notch
#

Do you know the difference between global and local variables

dusk kernel
#

nop cz im new

#

and bad XD

prisma notch
#

Alright I recommend looking up a skript tutorial about them

dusk kernel
#

i think u mean that i can create the item inside the skript then i give it after death

#

and thats what i trying to do since 4h

prisma notch
#

Basically you're setting a variable to an item, and then using that same variable every time you give the item on death instead of setting a new variable each time

dusk kernel
#

oh

#

its cool

prisma notch
#

You can use the on skript start: event to set the global variable

dusk kernel
#

is there any video shows that ? or any skripts with same idea . so i can read it and understood

prisma notch
#

There should be some tutorials or documentation

dusk kernel
#

on load:
set {_head} to skull of "TheGoldenWarrier" parsed as offline player
set name of {_head} to "&e&lGOLDEN HEAD !"

on death:
if "%region at victim%" contains "ffasword":
give {_head} to the attacker

#

thats what i can do

molten dome
#

nope, thatsa local variable

#

you cant use that across structures

prisma notch
dusk kernel
molten dome
#

Youre not using a

#

You set it but then dont set the slot to that many heads

#

Also, if youre doing that you should remove the heads they already have

#

Also, whats wrong with trying a global var