Ammo drop unlock question

red moon

Member
Hello,
I added Dale's script to use ammo power ups that can be placed by hand which works great. They also drop when enemies are destroyed which is even better.

They currently drop from any destroyed enemy the start of the demo, but you don't actually get access to the gun until you are 6-8 min into the game. Is there a way to add the "unlock projectile"to the handle drops script so that ammo will not drop from destroyed enemies until you collect the gun?
Thanks!
 

Attachments

  • drops.jpg
    drops.jpg
    371.6 KB · Views: 813
  • unlock.jpg
    unlock.jpg
    340.9 KB · Views: 813

dale_coop

Moderator
Staff member
I think you could try adding:

Code:
	;; check if projectile is unlocked
	LDA weaponsUnlocked
	AND #%00000010
	BNE +
	RTS
	+

At the begining of the Handle Drops script.
 

red moon

Member
It works!
However, the monster death (animated flame) no longer appears until you unlock the shard weapon. Once you have it the flame appear and an ammo shard drops.
I'm looking at the handle hurt monster script now to see if monster death game object is found there....
 

dale_coop

Moderator
Staff member
red moon said:
It works!
However, the monster death (animated flame) no longer appears until you unlock the shard weapon. Once you have it the flame appear and an ammo shard drops.
I'm looking at the handle hurt monster script now to see if monster death game object is found there....

My bad, yes you don’t want to skip all the script, but just some parts...
Try replacing the « RTS » of the code I shared by a « JMP notPickup2 » in your handle drops script.
 

red moon

Member
Dale, for this check to see if down is pressed. Is this something that should be at the beginning of the script the middle or the end? or does it matter?
thanks! i was curious curious it there is an order to the checks occurring
 

dale_coop

Moderator
Staff member
the "down" is pressed check code I share for your crouch scripts... is meant to be added at the beginning...
when you press a button it starts to execute that script (or any scripts assigned the button)... then inside the script, all the code is sequential.
 
Top Bottom