The old way of doing so
In case we store different FPG files for our game project, each of them focussed on one concrete goal, we do need something like the graphics_in_fpg() function. In the early years, when using DIV language, the only way to reproduce the effect of an explosion was coding something like this:
So, we had to know the start and end graph code inside the FPG to be sure our explosion effect would not be make-believe. But, if you prefer to keep a FPG file for the explosion effect, another one for, let’s say, a human-being based movements, and so on, it is quite uncomfortable to be coding like this.
The new way of doing so
Below, a trivial code sample showing how we can use the graphics_in_fpg() to show an explosion without knowing the total amount of graphics inside the loaded FPG file, but still assuming the first one is gonna be id=1, obviously!
Some screen-shot about this code sample:
Finally, there’s a video available HERE: explosion_animation.