changing actor into another actor

JustsomedesignerJustsomedesigner Member Posts: 28
edited November -1 in Working with GS (Mac)
Hi , i wondered if its possible to change an actor into another actor , like for example in overlapping or colliding with a powerup then changing into another actor for some time..

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Use the change image behavior, it will make the image look different.

    Example:

    Rule: When actor overlaps or collides with powerup,
    Change image, (whatever image you want)

    *then put whatever you want the actor to do in that rule, like a timer.*
  • JustsomedesignerJustsomedesigner Member Posts: 28
    Yeah thanks , allthough i thought of that possibility as well , but i also want the actor to become stronger so it can destroy bigger enemies with one hit ( and make the animation of the enemy destroy different ) and not only look different.

    The image (collidable)size can stay the same , so i could use the change image behavior initially
    But to achieve the rest i probably also have to use some change attributes in that rule as well.
    Do you maybe know if this would be possible and if so what how would i use them ?
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    Yeah sure its possible:

    IF you have an attribute for how many hits it takes to kill an enemy, just reduce it by how strong you want the actor to be.

    For example: in that rule, put this

    Change attribute game.howmanytodie to 1. If originally it was game.howmanytodie = 3.
    See :-)

    That is just an example, but the rule doesn't have an end, if you put a whole lot of stuff in there, it will still act as a rule. :-)
  • JustsomedesignerJustsomedesigner Member Posts: 28
    Haha allright thanks a lot mate !
    One more question though ;) , how could i change the animation of how the enemy destroys ?
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    An attribute for the enemy actor. You need to set it to true whenever you hit the power up, and then in your enemy actor make a rule:

    When attribute game.changeanimation is true (then hit the plus sign next to it)
    *AND* when it overlaps or collides with the main actor with powerup,

    Animation behavior then goes in there. ;)
  • JustsomedesignerJustsomedesigner Member Posts: 28
    Cheers ! First time i had to hit that plus sign in that rule corner :P
Sign In or Register to comment.