AIGLE25 Posted May 25 Share Posted May 25 (edited) Skript : 2.6.5 skript : Event-block condition Description: Hi, is there a way to detect if i broke the event-block i've placed to cancel the "break event-block" ? Here is my current script: on place of sponge: "%region at event-location%" contains "test" or "redleft" or "redright" or "redTOP" or "blueleft" or "blueright" or "blueTOP" wait 26 ticks if event-block is sponge: break event-block Edited May 25 by AIGLE25 ? forgotten Link to comment Share on other sites More sharing options...
Jeghurtig Posted May 25 Share Posted May 25 Have you tried "set event-block to air"? Link to comment Share on other sites More sharing options...
AIGLE25 Posted May 25 Author Share Posted May 25 4 hours ago, Jeghurtig said: Have you tried "set event-block to air"? thats not what i want , my script is working but i want to add a condition that if i broke the block i placed , it would cancel the break event-block effect Link to comment Share on other sites More sharing options...
Polilla Posted June 8 Share Posted June 8 Event-block won't change, but the block at the location of the event-block can. Try checking if the block at the location of event-block is sponge. Let me know if that works. Link to comment Share on other sites More sharing options...
Ccr1t Posted June 9 Share Posted June 9 On 6/7/2024 at 7:08 PM, Polilla said: Event-block won't change, but the block at the location of the event-block can. Try checking if the block at the location of event-block is sponge. Let me know if that works. a event block could be used with lots of things on block break: set event-block to air on block place: cancel event set event-block to air (not real code, just examples if your going to use this make sure to indent it) Link to comment Share on other sites More sharing options...
Polilla Posted June 21 Share Posted June 21 On 6/8/2024 at 9:09 PM, Ccr1t said: a event block could be used with lots of things When you set the event-block to something, event-block will still return its previous state. That was the point I was trying to get across, and I apologize if it wasn't interpreted as such. If you set event-block to air, and ask what event-block is (or, "was", as Skript likes to think of it) it'll still return sponge, in this example, regardless of what the block in that position is currently. You can test this yourself, and it's why the above script doesn't work as intended. Sorry it took me a bit to respond, too. I didn't get a notification until recently Link to comment Share on other sites More sharing options...
Ccr1t Posted June 22 Share Posted June 22 13 hours ago, Polilla said: When you set the event-block to something, event-block will still return its previous state. That was the point I was trying to get across, and I apologize if it wasn't interpreted as such. If you set event-block to air, and ask what event-block is (or, "was", as Skript likes to think of it) it'll still return sponge, in this example, regardless of what the block in that position is currently. You can test this yourself, and it's why the above script doesn't work as intended. Sorry it took me a bit to respond, too. I didn't get a notification until recently Yes, With "cancel event" it prevents the block from ever being broken. Link to comment Share on other sites More sharing options...
100_ Posted June 27 Share Posted June 27 on place of sponge: "%region at event-location%" contains "test" or "redleft" or "redright" or "redTOP" or "blueleft" or "blueright" or "blueTOP" set {_oldloc} to location of event-block wait 26 ticks if block at {_oldloc} is sponge: set block at {_oldloc} to air hope this helps. Just shows using a local var to store the old location, and comparing it after with what it was, and then breaking the block if that's the case. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now