Overlapping rules?
HappyKat78
Member, BASIC Posts: 173
Hi Guys,
I've got multiple instances of soldiers with associated crosshairs. When an enemy walks over a crosshair his health depletes by 2 every 0.2 seconds the enemy is overlapping the crosshair. However, if two of the soldiers crosshairs are overlapping and the enemy walks over them both the enemy's health still depletes by 2 ever 0.2 seconds, but in this instance I want the enemy's health to decrease by 4 every 0.2 seconds (or 2 every 0.1 seconds) as he's getting shot at by two soldiers instead of one. The soldiers are spawned as instances so I can't set them up in advance as different actors. Does anyone know how I can get the enemy to react to multiple overlapping collisions as described above so his health depletes faster when being shot by multiple soldiers?
Many thanks!!!
I've got multiple instances of soldiers with associated crosshairs. When an enemy walks over a crosshair his health depletes by 2 every 0.2 seconds the enemy is overlapping the crosshair. However, if two of the soldiers crosshairs are overlapping and the enemy walks over them both the enemy's health still depletes by 2 ever 0.2 seconds, but in this instance I want the enemy's health to decrease by 4 every 0.2 seconds (or 2 every 0.1 seconds) as he's getting shot at by two soldiers instead of one. The soldiers are spawned as instances so I can't set them up in advance as different actors. Does anyone know how I can get the enemy to react to multiple overlapping collisions as described above so his health depletes faster when being shot by multiple soldiers?
Many thanks!!!
Comments
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Edit: Nevermind... that won't work.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Basically, when two crosshairs overlap, they spawn a "double crosshair" actor (with self.alpha.color=0) that is only on the screen for 0.1 seconds. If the enemy collides with a crosshair, it turns pink (yep) and decreases health by 2 every 0.2 seconds. If the enemy collides with a double crosshair, it turns red and decreases health by 4 every 0.2 seconds.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User