Make custom energy particles pass

  • DanielsRevenge
    22nd Jul 2021 Member 0 Permalink

    Hello. I am trying to add an element called ALPH (alpha particle) to my element pack. It's supposed to be like PROT but much, much more reactive.

     

    There's an issue though. I can't get it to go through particles, which is a massive issue and a half because that makes it harder to make it reactive. How would I go about fixing this?

  • _Theo
    22nd Jul 2021 Member 0 Permalink

    @DanielsRevenge (View Post)

     is this a lua script or a c++ mod

    Edited once by TuDoR2007. Last: 22nd Jul 2021
  • DanielsRevenge
    22nd Jul 2021 Member 0 Permalink

    Lua script.

    Generally all topics under Lua Scripting should be a Lua script, if not I'd be a little concerned.

  • jacob1
    23rd Jul 2021 Developer 0 Permalink
    You can use the sim.can_move function for this.

    sim.can_move(from, to, 2)

    for can_move, 0 means "don't allow pass through", 1 means "swap positions", and 2 is "pass through - occupy same space". You'll have to loop over all the elements and set can_move to 2 for your particle.