Im developing a game based of war with gangs, top view based.
The instances are:
* cops: controled by IA. Moves in randomic direction over a map of a caotic street.
* gangster: moves in randomic direction. Shot controled by player.
* Molotov: bomb fired by gangster.
* Pathfire: instance (bullet) with a image of molotov moving.
Engine:
When the gangster animation with 60 frames reaches #50 frame pin a molotov in the hand of gangster and set a variable to molotv with the same id (variable id) of gangster. The engine controls to loop for last position to #51 position to avoid create multiples molotovs to same gangster.
When clicked first time the gangster stop and turn to mouse position (target).
When clicked the second time spawn a pathfire (bullet) from gangster to hit the cop + destroy the molotv in the hand of ganster
.
Here is the trouble: When i destroy the molotov instance from a gangster ... all the molotovs in the scene, from other gangsters are destroyd.
I would like to destroy only the molotov in the hand of gangster that fired.
action - gangster clicked > spawn a pathfire to (moouse.x,mouser.y)
| > set animation frame to 1 ans start again
|
------- molov.id = gangster.id > destroy molotv
Its not working. (Sorry my bad english)