Perro Seco, on 18 May 2016 - 03:47 PM, said:
Thanks a lot for your help! I understand your idea, but I tried to implement your code to the game to see how it works and nothing happened. Maybe I'm doing something wrong?
Yes, you did something wrong. The inside of the empty brackets [] is supposed to refer to the actor that is running the code. This is normally expressed by THISACTOR, but I omitted that because you are allowed to do that in recent builds as a shortcut. If you look at the code I posted, anywhere I write [] you can substitute [THISACTOR]. Substituting [FEM3] will not work, because that is the number of the tile, not the ID of that specific copy of the sprite.
Also, to start with, I would make the hit squares visible, so you can see that they are spawning, how big they are, and whether they are absorbing the shots. So, subtract 32768 from their cstat (i.e. give them cstat 288). There's a lot of things that could go wrong. For example, since the squares are flat against the ground, they may be too low and may need to be moved up slightly in order for projectiles to hit them instead of the ground.