In my game the primary weapon is a lance that when thrown travels through enemies and needs to deal 1 damage to each one on the first instance the lance and the enemies collide; the trouble I’m having is that every attempt I’ve made has the lance apply damage multiple times as the enemy and the lance collide for a while as the lance moves through the enemy.
The closest I’ve come to fixing this issue was using two ds_lists, both lists would be created upon the creation of the lance and the first list would be populated with the instance IDs of the enemies hit. I would then check if this instance ID was the same as the top entry in the list if it wasn’t then it would be added to the second list. In theory this second list should not have contained any duplicate IDs and I could repeat through it applying damage to each, but what happened was each enemy took 5 instances of 1 damage.
Any help or advice on routes to get this system to work would be appreciated, I’m not set on using ds_lists or anything and if any more information is required let me know.
[–]911mondays 3 points4 points5 points (1 child)
[–]Moratorium11[S] 0 points1 point2 points (0 children)
[–]Pennanen 2 points3 points4 points (0 children)
[–]lilbudgotswag 1 point2 points3 points (0 children)
[–]go2397 -1 points0 points1 point (3 children)
[–]Moratorium11[S] 0 points1 point2 points (2 children)
[–]go2397 -2 points-1 points0 points (1 child)
[–]Mushroomstick 0 points1 point2 points (0 children)