Not signed in (Sign In)

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

      CommentAuthorTheForumIsDead314 (Advanced Member)
    • CommentTimeApr 27th 2016 edited
    Hi, I was coding a game and I got to an obstacle (source enabled):

    Press F to fire and try to destroy the purple head of the enemy machine.

    1. The way that normal pulse is implemented, the collision occurs every step if the object is resting on the surface, causing damages that add up quickly. I set the wheels to invincible, but this is noticeable when you shoot the ground.
    2. When you destroy the purple head, the remains of the vehicle should have their health set to 1. I would like a more efficient way to do this than setting them together in On Entity Destroyed. (I thought of one way, having a custom property, but can the editor tell the difference between null and destroyed?)
    3. SetShapeBackgroundOpacity doesn't work on C.I. Shapes. I used alpha, but I want the border to be visible.

    EDIT: This is really ridiculous.-----------------
    3.14159265358979323846264338327950288... Nothing Here
      CommentAuthorBioManiac R2 (Moderator)
    • CommentTimeApr 28th 2016
    I'm very confused what you are trying to do....

    I killed it by doing nothing....

    please better explain what you want to do and I will help.
    I have 2 different problems (I resolved #3 by deciding not to use C.I. Shapes):
    1. The way the trigger for On Post Solve Collision works, when an object is resting on the surface, impulses are applied every single step. I don't like this, because the objects lose health at every collision.
    2. The idea is that when you destroy the purple head, the rest of the machine breaks down. Basically, I just want to find the most efficient way of telling the enemy's machine to set its health to 1 when the purple head dies.

    One idea for #2 I had is that each shape gets a property like "head of machine". Then I'd do:

    if (theEntity.machineHead.isDestroyed) { = 1

    However, I don't know if the editor can tell the difference between "destroyed" and "null".-----------------
    3.14159265358979323846264338327950288... Nothing Here