Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • This is not very flexible, you'd need to update that array from every place in the code that crates or deletes a monster Commented Jun 8, 2012 at 20:01
  • @JuanMendes Yet certainly more flexible than having a separate variable ($monster_1, $monster_2, etc.) for each monster, no? His question wasn't about flexibility, it wasn't about "how should I rewrite everything?" It was about how to calculate remaining health for a group of monsters. That was it. Commented Jun 11, 2012 at 14:32