Actor/player spawns indestructible

New to gamesalad and having a hard time finding an answer to an issue I've come across.

When my main actor dies I respawn the same actor after 2 seconds and reduce the number of lives by 1. All functions of the actor work EXCEPT collision. Anything that was on the scene when the new player/actor spawned will not destroy/damage the main actor. Any newly spawned actor/enemies collide properly.

Why would the newly spawned actor/player be immune to collisions with any other actors onscreen at them time of death/spawn? All are part of the same layer and spawned relative to that layer in the same way. That was my first hunch.

It acts like spawn protection which is really cool but I just wish it was something I could control.

Any help is greatly appreciated.

Thanks,
Jon

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Why are you destroying it in the first place? Couldn't you just reduce the lives by one when it hits something instead of destroying it?
  • LeonardDeveloperLeonardDeveloper Member Posts: 4,630
    Put a tag in the actor.... An in the colliding actor place the logic: when actor collides with actor with tag....
  • NeoStarNeoStar Member Posts: 25
    Thanks Leonard but that is exactly how I already have it setup. Every actor is categorized as either a Ship, Ship Ammo, Enemy or Enemy ammo and my main character is setup When actor collides with actor with tag enemy destroy actor and when actor collides with actor with tag enemy ammo then reduce health by 1.

    Braydon - the main actor has HP and if you die u subtract 1 life and respawn at the default position. Your post doesnt help BUT!!!!!! you lead me to the idea that instead of destroy/respawn I can reposition the existing character back to the default position and reduce the lives by 1 so you inspired an alternate method. Kudos to you sir...

    I'll give it a whirl and let you know if it fixes my issue.
  • NeoStarNeoStar Member Posts: 25
    Yep it works wonderful. Teleporting the actor to the default position and reducing the lives by 1 worked. I already programmed all the attributes to reset on spawn so I had to tweak everything to reset upon the repositioning but it works perfectly. Thanks again guys.
  • LeonardDeveloperLeonardDeveloper Member Posts: 4,630
    And you could store the XY positions in a table to make it run even smoother....
Sign In or Register to comment.