Overlay/Destroy actor

ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
edited November -1 in Working with GS (Mac)
Hi guys

I have a problem with creating and destroying actors...here's the idea

I have a sprite that is in a scene and when it get hits some blood splat appears (Spawn actor - Blood Splat right or left). Now, when I put a command in to destroy actor, it removes the main sprite and not the the blood splat...

Can anyone help me just remove the blood splat without getting rid of the main character sprite?

Thanks guys

It takes a Zombie to know a Zombie!!!

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Try adding a timer:

    Rule: When actor overlaps or collides with 'bad guys' or 'something that hurts' spawn blood.

    Timer: after 3 seconds
    Destroy this actor.

    Hope i am explaining this right, anyway try that :)
  • ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
    I have the spawn actor (blood) on a timer for 1 second but adding the 'Destroy' attribute afterwards destroys the main sprite and not the spawned 'Blood' actor.

    With Gamesalad you can specify what actor to spawn but adding 'Destroy' kills the original sprite... :(

    Been trying for ages to get this to work...

    It takes a Zombie to know a Zombie!!!

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    If your moving like in a landscape game, then just spawn the blood and leave it? If your going to be moving anyway, then you wont see it for long.
  • ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
    I see what you mean but there must be another way of removing a certain actor in a scene once you place it there?

    Seems odd you can spawn a new actor in a scene but then you can't remove it?

    Placing 'Destroy this actor' after you have spawned one does not compute with the new actor and destroys the original actor your trying to edit.

    Is there a way of spawning a new actor, say by using a boolean method?

    It takes a Zombie to know a Zombie!!!

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    What if you put the rules ect in the blood actor instead of the player?

    That way: When blood hits 'bad' it spawns the actor.

    Then when you destroy that actor, it should only destroy the blood, since that is the only thing to destroy.

    As for the boolean method, i dont know, im new to GS myself. (3 weeks) But i try to help where i can. :)
  • ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
    How about say making the actual blood gfx 'invisible' then turning it 'on' when the sprite is hit...could I do it like that somehow?

    I'm a newbie too Braydon and appreciate your help and advise?

    It takes a Zombie to know a Zombie!!!

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    That thought had occurred to me. You would need to make a attribute, and then turn it on 'true'.
    I would just play around with it.

    There is probably a tutorial somewhere. I'll look for it. If you would like to keep in-touch, please email me at braydon@coyer.net

    I assume you would need to change the alpha from 0 to 1. I think I have done this before so it turns 'on' when needed. Again, i'll look for it.
  • ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
    Yeah, would like to keep in touch and stuff...will email you in a mo.

    I'll have a play with it as there doesn't seem to be a easy option to this problem...

    Thanks for the support Braydon. :)

    It takes a Zombie to know a Zombie!!!

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Hey no problem man. Anytime : ) I'm just glad i could help.

    If you email me, i can email you the solution to your problem when i find it. I know ive seen it before.
  • ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
    This spawn and destroy lark is a nightmare...been on Google for about an hour with no luck.

    Say i have a box actor on screen called 'Blast'.
    You click on the box
    I spawn an new actor on top of the box called 'Explosion'.
    Now after 1 second I want to destroy the 'Explosion' actor
    I add in a attribute called 'Destroy' (This is suppose to destroy the explosion actor as thats the one I just added) but it destroys the original box actor?

    Does anyone have a solution to this problem?

    Driving me insane now!!! :(

    Any other help would be greatly appreciate

    Thank guys

    It takes a Zombie to know a Zombie!!!

  • ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
    Ha just found this answer
    entersimon said:

    If all the spawned actor is supposed to do is die after 1 second, then put a timer inside of that actor.

    after 1 second:
    destroy actor

    Works a treat now...and so simple!

    It takes a Zombie to know a Zombie!!!

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Yeah, Tshirbooth has a tutorial for that. Glad you found your answer. :)
  • ZombiebrainsZombiebrains www.zombiebrains.co.ukMember, PRO Posts: 296
    Thanks Braydon

    You pointed me in the right direction and I thank you for that..

    These forums are gold dust to us newbie's and are a wealth of information.

    Right, back to work on my next project! :)

    It takes a Zombie to know a Zombie!!!

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Your welcome Zombiebrains. :)

    Keep in touch ;)

    Us newbie's need to stick together ;)
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    If you email me, i found something that relates to your problem, its a good learning template.
Sign In or Register to comment.