Shooting With Target (action Bug)

Discussion in 'How Can I...?' started by volcank, Jan 18, 2017.

  1. volcank

    volcank Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    794
    Likes Received:
    391
    Hi,

    I try to create a game with a target on screen which will shoot enemies.

    You simply control the character with a joystick touch area. So basically I can move the target on my device simply with my thumb. I also added an action with strike property. So there is a muzzle flash and also set an action button for it to activate.

    Since enemies will kill my target I added a damage behaviour to enemies and set damage to 0 so they won't destroy my target. I can basically destroy the enemies with target.

    But when I set the action to strike it kills the enemies but the target (character) suddenly leaps right while shooting. no matter what I do it doesn't work. The only way to stop is either to set the action to none instead of strike but this time it won't kill enemies or uncheck the direct movement so it won't leap but this time joystick doesn't behave the way I want it.

    I would appreciate the help. @Christoph @heathclose if you have any solutions to the problem above.

    Kind Regards

    Volkan
     
    Last edited: Jan 18, 2017
  2. Christoph

    Christoph Miniboss Boxer

    Joined:
    Oct 4, 2015
    Messages:
    2,807
    Likes Received:
    2,309
    With leap you mean a little "forward" movement of the character? I think this has to do where you placed your character animation/strike animation. The position must be centered in both. If not I'm not sure if I could help without knowing/seeing more of the settings.
     
    volcank likes this.
  3. volcank

    volcank Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    794
    Likes Received:
    391
    Yes moving forward actually. It is a forced movement the screen goes to right with the power of 100 in game settings. I set up an action button on screen so when I touch it it shoots on target. You move the target with Joystick touch. Just working on a game like Light Gun Games. But when I hit the action button it shoots (I set the action to strike) but it moves forward like crazy. This doesn't happen when I set the action to none or coin or other things. I did this set up differently without using action btw with other objects etc. btw do you know if it is possible to make an object spawn a bullet or an object to kill the character after certain amount of time. I can not do this with wakeup bcause the target is the main character and it moves around the screen with your thumb to shoot enemies. What I want is like a soldier come to screen and spawn a bullet to shoot the character after certain amount of time. What I will do is set the animation in that manner. Thank you.
     
  4. volcank

    volcank Serious Boxer

    Joined:
    Oct 8, 2015
    Messages:
    794
    Likes Received:
    391
    Btw I think I managed to do it in a way. Instead of using strike I addded a bullet spawner into action animation and set action to none. That worked. And what happens is is those bullets do not kill an enemy they stay on screen. Even it is invisible it can kill enemis. What I did wat I attached another object with a damage of 2 to kill character and attached it to target character and set target health to 999999 something so that invisible object doesn't kill the main character target but kills the spawned bullets andat the same time if you hit an enemy with target its a hit :)
     
    Christoph likes this.

Share This Page