Limiting Spawn on Continuous KeyDown

For questions about using Classic.

Post » Sat Mar 03, 2012 4:00 am

Actually I already told You how to solve the problem, which has to do with the picking of the bullet instances, so the other bullets won't be affected, but only the one currently at Samus' imagepoint.
Posts: 70
Reputation: 765

Post » Sat Mar 03, 2012 4:12 am

Sorry, I misunderstood your problem. But the concept I gave you will still work, you just gotta make sure the normal bullets have the same check.

Really though, I recommend Shindoh's suggestion above. I just gave it a lookover and it's pretty tight. Should work fine.
Posts: 319
Reputation: 12,359

Post » Sat Mar 03, 2012 5:27 pm

Sorry I glanced over yours and didn't even think to try it before, that was my bad.

Would the Bullet pick replace the PV? I tried implementing it, I could be doing it wrong but I had another problem. The bullets don't attract to the gun now, but rather they all grow along with my Charged growth of the bullet. All of the ones on screen grow, that could easily be with my Growth event and where it's at.

Here is what I have.

+Left Mouse pressed
++GV 'shotDisable' = 0
->Samus spawn Bullet (@ImagePoint)

+Right Mouse down
->Set GV 'shotDisable' to 1
++Trigger Once
->Samus spawn Bullet (@ImagePoint)
->Bullet Set speed to 0
->Bullet Set 'Charged' to 0
++Bullet Pick closest (@Samus.Angle, @Samus.Angle)
++Bullet Value 'Charged' = 0
->Bullet set position @Samus (@Imagepoint)
->Bullet angle @Samus.Angle
++Every 750 ML
++Bullet Height < 90
->Set height to Bullet.Height+20
->Set width to Bullet.Width+20

+Right Mouse released
+Bullet Pick closest (@Samus.Angle, @Samus.Angle)
->Set GV 'shotDisable' to 0
++Bullet Value 'Charged' = 0
->Bullet set speed to 500
->Bullet set 'Charged' to 1

EDIT: I just added to Pick condition to my bullet resize event. It worked, but it also bugged out if I shot multiple times then held down the charge button. It attracted all the bullets, and they spazzed out around the gun. I know this is probably due to the same condition in 2 diff events.

EDIT2: I tried the Pick Closest method without the PV and it is still doing what I mentioned above. It is dragging the closest instance of Bullet to Samus then releasing it when I release the button. It is also charging all instances of Bullet on the screen because of my Resizing event for the charging action.

I also am not sure if I am doing it right, but I have the Pick Closest to conditions as this on both events:

Bullet Pick Closest to Samus.ImagePointX("Cannon"), Samus.ImagePointY("Cannon")RTCook2012-03-04 18:02:27
Posts: 5
Reputation: 260


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 1 guest