Chain/Whip weapon and animation

TheMarqueTheMarque Member Posts: 6
edited November -1 in Working with GS (Mac)
Hey guys! This is one of the last things I had to to do finish coding my platformer.

I am working on the weapons of my character only I am having problems getting him to use his weapon, which is a whip. The standing graphic is 70px by 43 px. The whipping animation/image is 70px by 93px. So it's much wider. Putting the animation as a rule within the "player" actor cuts out the whip too much so I have created another actor that is the whip animation that shoots out an invisible "whip block". This actor spawns when "shift" is down and shoots out the invisible block for .2 seconds before it is destroyed.

Now my problem is this, when I spawn the new actor on top of the old actor, the "player" remains visible. I have tried change image and tried changing the "visible" attribute to "false" but it just doesn't work. Any clue why or any ideas on what to do?

Also, is what I described the best way to go about doing this "whipping" animation/weapon?

Thanks!

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    you can reduce the alpha setting for your actor yo want to go invisible to 0 and then back to 1 when you want him visible again.

    ___________________________________________________________________________________
    Project Help from Tenrdrmer Click Here

    GS BubbleBall Template HERE!!
    Stacks Level Selection Template HERE!!
    Expanding Option Menu Template HERE!!
    Tenrdrmer's Menu # 3 HERE!!
    Menu #4 - Level Banners HERE!!
    AppSolute Entertainment on Facebook
    AppSolute Entertainment on iTunes
  • DizkoDizko Member Posts: 498
    Trying changing the opacity instead. When he's visible set opacity to 1 when he needs to be invisible set it to 0.

    I would not use spawn/destroy if you're intending on using that function a lot in a given scene. I would instead keep the actor you're spawning off screen somewhere instead. When you need it, simply move it to the spot you need it, and the back off screen when you don't.
  • TheMarqueTheMarque Member Posts: 6
    Ok. So i tried your suggestions. And they definitely work. But I'm going to change my mind on the way I do this because it's just too complicated to spawn and destroy that many actors and then also make the main one invisible because then he shows up in a different location on the screen...whatever...

    Any other ideas or suggestions on how to do what I am suggesting? A whipping animation as a weapon. What I have going on right now is pressing shift spawns an invisible "block" whip-sized actor that shoots at the enemy. It also resizes the player graphic to 70 x93 and changes image to the animation. My strange problem, however, is that it does not revert back to what was there previously. And the timer doesn't seem to work in this. Maybe I'm doing something wrong? Any detailed suggestions would be wonderful, this is all I have left to do before I design levels!

    Thanks!
  • QuinnZoneStudiosQuinnZoneStudios Member Posts: 452
    Oh I see you have actors 70x43 and 70x93.
    You probably want to use the power of 2 rule so they stay nice and sharp and don't waste resources:
    i.e. 70x44 and 70x94
    .... something like that anyway, right?

    Mike
  • TheMarqueTheMarque Member Posts: 6
    MikeQuinn said:
    Oh I see you have actors 70x43 and 70x93.
    You probably want to use the power of 2 rule so they stay nice and sharp and don't waste resources:
    i.e. 70x44 and 70x94
    .... something like that anyway, right?

    Mike

    Thanks! I hadn't heard of that rule before. I'll fix it. Do I need to change the image files themselves or should I just change the dimensions in GS?

    But do you or anybody else have any suggestions for my real problem?
Sign In or Register to comment.