Help with shooting mechanic
SingleSparq
Member Posts: 1,339
Hey, I'm so close to getting this to work. Basically I have a sniper target that I can move around on screen and shoot BUT the issue is getting it to not fire at every touch.
So I set up two attributes tap1 and tap2. At first press tap1 is active, if active and press is released, tap2 is active. If tap2 is active a press release will fire. But now I need away to tell tap1 and tap2 to reset to 0 if I press again to move the target elsewhere without it firing again on release.
Ideally I want to be able to move the target, then tap on it to fire, move around, tap to fire all on the same target actor.
So I set up two attributes tap1 and tap2. At first press tap1 is active, if active and press is released, tap2 is active. If tap2 is active a press release will fire. But now I need away to tell tap1 and tap2 to reset to 0 if I press again to move the target elsewhere without it firing again on release.
Ideally I want to be able to move the target, then tap on it to fire, move around, tap to fire all on the same target actor.
Comments
If Scope2 is not within the boundaries of Scope1 (ie. does not collide) then reset or deactive tap1 and tap2?
I think that should work hopefully.
Edit: does your Sniper Target follow tap1? Then that can be your equivalent to Scope1
Edit2: I have a sneaking suspicion your game's controls are different from what I have in mind. If you can elaborate, perhaps I can see if my solution is not applicable to your game, so I can correct it