How do I fix this issue with collision and instance variable

Get help using Construct 2

Post » Fri Aug 15, 2014 12:35 am

Good Day,

first of all, my name is Garry. I brought Construct 2 couple of days ago at steam. But at this point i encounter a problem that is way to big for me to solve alone.

I have an instance variable with its given value of 60 (EnemyHP)
I also have an instance variable for a bullet with the value of 12 (BulletDMG)

pseudoscript:

if bullet hits enemy
{
subtract BulletDMG from EnemyHP
};

So if i let the bullet angle at my enemy, everything works fine and the enemy gets 12 damage in this case. Left with 48 my turret keeps firing until the enemy has 0 hp left and the turret stops shooting.

But.... if i have one or more enemys at the exact same position the damage becomes enormous and die at once from a single shot. if i spawn an enemy again(just one) everything is fine.


Since i used instanced variables every enemy has its own value, right? It should not happen, why does the game or constrcut subtract more than one time the value, it seems like it calculates everything together and then simply subtracts this, or it does the collision substance multiple times. I dont encounter lags or something but at this point i might consider its a bug. hopefully not.


Thanks for reading, waiting for your answer.
B
2
Posts: 1
Reputation: 150

Post » Fri Aug 15, 2014 1:58 am

Probably a picking issue. Can you post a CAPX for people to look at? If you can't post/upload yet you can use Dropbox and just add a few spaces in the address so the forum doesn't block it.
ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227


Return to How do I....?

Who is online

Users browsing this forum: part12studios, Yahoo [Bot] and 9 guests