Posted By: boyax
preloading bitmap data - 09/04/09 04:35
Hi,
I've encounter some problem with my particle effects. The first time I would hit my bottle points object then, play some particle effects the bitmap stucked for a second then it would play the sprite animation bitmap. I believe the sprite animation bitmap should be loaded first in the memory.. but I don't know how to??
Here's some code snippet:
bottlePts.c
I'm looking also with the functions:
bmap_preload(bmap) - but I'm not sure how would I convert from BMAP* to String*.
ent_preload(Entity*)- this should be done probably in the main script but the entity should be created in the event in which I could play the entity function for effects
argh! I'm still confused.... Any advised how should I do it?
Thanks
I've encounter some problem with my particle effects. The first time I would hit my bottle points object then, play some particle effects the bitmap stucked for a second then it would play the sprite animation bitmap. I believe the sprite animation bitmap should be loaded first in the memory.. but I don't know how to??
Here's some code snippet:
bottlePts.c
Code:
STRING* bmp_waterExplosion = "WaterExplode+12.tga"; //-------------------------------------------------------------------- // Action: Bottle 50 pts. //-------------------------------------------------------------------- action act_botle50pts() { var bottle_animpercent = 0; my.IDBottle = 1; set(my, POLYGON | LIGHT); my.emask = ENABLE_IMPACT; my.event = event_bottle; ... } //-------------------------------------------------------------------- // Event: event_bottle //-------------------------------------------------------------------- function event_bottle() { VECTOR tempV; VECTOR vecTemp; var tempSec = 0; var tempCorrSec = 0; if(EVENT_IMPACT == event_type) { .... ent_createlocal(bmp_waterExplosion, my.x, WaterExplosionEffect); ent_remove(my); //remove bottle } }
I'm looking also with the functions:
bmap_preload(bmap) - but I'm not sure how would I convert from BMAP* to String*.
ent_preload(Entity*)- this should be done probably in the main script but the entity should be created in the event in which I could play the entity function for effects
argh! I'm still confused.... Any advised how should I do it?
Thanks