Location

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

Marto_0

Member
Jul 14, 2017
15
1
3
20
code_language.skript:
on transfer:
    block at event-location is chest
    {SellChests::*} contains event-location
    test("BANANANANNANAA")
Im trying to make a chest that will automaticly sell everything inside of it ^^^ {SellChests::} Is the list variable where all Sellchests are. The locations But somehow "{Sellchests::} contains event-location" wont work. this is becouse the event-location of the on transfer is "x: 1 y: 2 z: 3" While the event-location in the list variable is "x: 1.5 y: 2.5 z: 3.5". Ive spend many hours on trying to fix this. Without success. Anyone has an idea how i can do this?
 
code_language.skript:
on transfer:
    block at event-location is chest
    {SellChests::*} contains event-location
    test("BANANANANNANAA")
Im trying to make a chest that will automaticly sell everything inside of it ^^^ {SellChests::} Is the list variable where all Sellchests are. The locations But somehow "{Sellchests::} contains event-location" wont work. this is becouse the event-location of the on transfer is "x: 1 y: 2 z: 3" While the event-location in the list variable is "x: 1.5 y: 2.5 z: 3.5". Ive spend many hours on trying to fix this. Without success. Anyone has an idea how i can do this?

you can store your variable on an other way in the loop-index.

like this:

code_language.skript:
set {SellChests::%event-location%} to true

then to check it use:

code_language.skript:
if {SellChests::%event-location%}  is true:
 
you can store your variable on an other way in the loop-index.

like this:

code_language.skript:
set {SellChests::%event-location%} to true

then to check it use:

code_language.skript:
if {SellChests::%event-location%}  is true:
Thanks but that doesnt fix that the event-location of on transfer is in another "location" format
 
upload_2017-8-30_12-16-28.png
Nope. I also tried without the "%%" But without success
 
Why are you even parsing it or putting it text? Using event-location will already be set as a location.
When i broadcast the event-location on on transfer. I get this:
upload_2017-8-30_19-46-14.png
As u see this is without ,5 behind the coords. But when i use event-location. On place event. It is with the ,5
 
When i broadcast the event-location on on transfer. I get this: View attachment 1155 As u see this is without ,5 behind the coords. But when i use event-location. On place event. It is with the ,5
Just use this:
code_language.skript:
location of event-block
it'll not have decimal places if so, you could also do:
code_language.skript:
location(rounded up event-location's x-pos, rounded up event-location's y-pos, rounded up event-location's z-pos, event-world)
But I think that's just a waste of time when you can write it as simple as I've done it in the first example.
 
Status
Not open for further replies.