Hi mihaid ! Well there's lots of problems in your code... first and most important thing is :
- You copy-pasted the original SPARK code from the demo in your project , which isn't a big problem , but all texture paths are wrong :
load image "media\explosion.bmp",textureExplosion
load image "media\flash.bmp",textureFlash
load image "media\spark1.bmp",textureSpark1
load image "media\point.bmp",textureSpark2
load image "media\wave.bmp",textureWave
You don't have a media folder under your project root dir... Make sure you copy the media folder to your project folder
2. If you change the resolution (set display mode) you need to call SP INIT to re-initialize the spark plugin.
i've also noticed that you copied the explosion code twice ! So be aware that you create 2 explosion prototypes when you call "explo" subroutine.
3. I HIGHLY RECOMMEND that you delete all the explosion creation code and use the "SP LOAD SYSTEM" istead. And load the Explosion.xml.
4 I'm not sure about this but as far as i can remember variables declared in a function or subroutine are local, so your expolsionPrototype variable is destroyed when you return from "explo" subroutine. You need to declare expolsionPrototype as a global variable
Regards
[href=forum.thegamecreators.com/?m=forum_view&t=191567&b=5]Spark Particle engine[/href]
[href=forum.thegamecreators.com/?m=forum_view&t=199163&b=5]Transform gizmo plugin[/href]