Skript

Forum > Help

Physics Cancelling: Code unresponsive, calls incorrectly

  • 3 posts
    #1 Mar 04, 2014 at 03:44 UTC - 0 likes

    I have been trying to allow for floating blocks, such as ladders, rails, trapdoors, and other blocks that have certain requirements, by cancelling physics events. For some blocks, such as cacti, this code has been working, whereas many others have not worked. I'm too new to have set variables, so I know that's now the issue. Here's the code that doesn't work:

    on block physics:
    	if event-block is redstonetorch:
    		cancel event
    		stop
    

    'redstonetorch is not an entity type'

    I have also been trying to make some blocks (plural, as in, this same code multiple times with different blocks,) disable fall damage. Please help explain to me why this does not work:

    on damage:
        if damage cause is fall:
            loop blocks in radius 3 of the victim:
                if loop-block is any redstone_lamp:
                    cancel event
                    stop
    

    'if damage cause' is not an entity type

    I've tried a lot of different things, and I'm really frustrated. I can't find anything else on this issue. Please help, thank you.

    Last edited Mar 04, 2014 by MBCode: incorrect type
    #2 Mar 04, 2014 at 08:48 UTC - 0 likes

    @MBCode: Go

    Try 'redstone torch' with a space and 'damage was caused by fall' is damage caused by falling from high distance

    SkriptApi - Gates - SilkTouchSpawners - DiscoDisco - PistonsPlus - SignEdit BFAK:90859160,7cd1071402494202a8252524cab9e168e0b0e8f13cdbd42eb5cf2e4d45d41016

    #3 Mar 05, 2014 at 05:49 UTC - 0 likes

    @GeekWithAChick: Go

    Thanks a ton! This fixed a lot of errors; however, the "fall damage" syntax you provided is even faultier than the original... I'm not sure what I'm doing wrong.

    I'll post more info on which skripts are working tomorrow, but for tonight it's quite late here. Also, I'd like to mention that unfortunately redstone physics, as an unintended side-effect, are ignored quite a bit, forcing me to worldedit much more than usual just to build, as well as disabling redstone's functionality. Is there a way to possibly check for what type of physics the event was? Again, the documentation really doesn't mention physics altering so much.

    Thank you for your help!

  • 3 posts

You must login to post a comment. Don't have an account? Register to get one!