Solved A variable can carry a block ?

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

Skoll

Active Member
Sep 2, 2020
65
6
8
29
E.g. save an event-block into a list variable {block::*}. It's possible ? Because I'm not getting.

Code:
on place:
  add event-block to {blocks::*}

on break:
    loop all blocks in {blocks::*}:
        broadcast "%loop-block%"
Doesn't broadcast.

Works if I change to:
Code:
on break:
  loop {blocks::*} :
    broadcast "%loop-value%"
But I cannot check if loop-value is event-block.
E.g.:
Code:
on break:
  loop {blocks::*}:
    if event-block is loop-value:
      broadcast "it is"
Doesn't broadcast. Why ?
 
Code:
on break:
    if {blocks::*} contains event-block:
        broadcast "it is"
I don't remember what problem i had with this code, but doesnt work too.

I already solved this problem comparing locations and using the location to return what block is placed. Thanks
 
Status
Not open for further replies.