How to allow PHOT to pass through?

  • jacob1
    30th Jul 2017 Developer 0 Permalink
    @ssccsscc (View Post)
    Just tested
    You probably want sim.can_move(elements.DEFAULT_PT_PHOT,elements.DEFAULT_PT_DMND, 2)

    0 = can't move through, 1 = swap places, 2 = move through, 3 = custom (you could set it but it can't be supported from lua)

    Without the 2, it returns the current value

    @RedVelvetCake (View Post)
    I think it's an issue with how you are calling sim.partNeighbors, but I can't look into it right now
    Edited once by jacob1. Last: 30th Jul 2017
  • RedVelvetCake
    30th Jul 2017 Member 0 Permalink

    yeah but where do you put it. in the update function i assume?

    Edited once by RedVelvetCake. Last: 30th Jul 2017
  • jacob1
    30th Jul 2017 Developer 0 Permalink
    No, you only run the can_move function once
  • RedVelvetCake
    30th Jul 2017 Member 0 Permalink

    so i put it next to all the elements.property() stuff right?

     

    EDIT: tried that and it doesent do nothing

    Edited once by RedVelvetCake. Last: 30th Jul 2017
  • jacob1
    30th Jul 2017 Developer 0 Permalink
    It does work, can you post the line you are using? The first argument should be the ID of phot, the second should be the ID of your element, the third should be 2
    Edited once by jacob1. Last: 30th Jul 2017
  • RedVelvetCake
    30th Jul 2017 Member 0 Permalink

    Wait, i did it wrong. my element's name is VBIZ and the code im using is 

    sim.can_move(elements.DEFAULT_PT_PHOT, elements.DEFAULT_PT_VBIZ, 1)

    so let me see if it works.

    EDIT: I dont know what im doing wrong but it still isnt working :/...

    EDIT 2 electric boogaloo: I think it is because i cant do DEFAULT_PT_ for a custom element. How do i get my element's ID?

    Edited 2 times by RedVelvetCake. Last: 30th Jul 2017
  • jacob1
    30th Jul 2017 Developer 0 Permalink
    When you allocated your element, you did it like elem.allocate("REDVELVETCAKE", "VIBZ"), or something
    In that case, it would be elem.REDVELVETCAKE_PT_VIBZ

    You could also use the return value from elem.allocate instead
  • RedVelvetCake
    30th Jul 2017 Member 0 Permalink

    While im here could you let me know how to use the 

    sim.decoColor(number color)

    command? How do i select which tile i want to change deco color in?