#UserShotData
shot_image = "./img/blablabla.png" //image path
delay_rect = (209, 472, 243, 507) //the graphic rect for the "bullet delay" image that shows up before a shot is actually fired
ShotData{
id = 1 //this is the ID you reference when shooting a bullet
rect = (0,0,16,16) //the graphic rect of the shot, ignored if using animation
collision = 4 //collision radius
render = ALPHA //either ALPHA or ADD, defaults to alpha
delay_color = (255,128,255) //the color mask applied to the delay image, (255,255,255) means image is drawn full brightness, defaults to (128,128,128)
angular_velocity = 3 //speed at which the shot image spins, can be negative, defaults to 0 (NOT YET IMPLEMENTED)
AnimationData{ //only declare if bullet is animated
//declares rects to use for the animation, first parameter is the # frames the image lasts
animation_data = (16,0,0,12,12)
animation_data = (8,12,0,24,12)
animation_data = (24,12,12,24,24)
}
}
ShotData{
//etc
}
Assigning constant names to bullet IDs just requires you to define them somewhere (not in the shot script).
redstarbullet = 1;
and stuff like that. Pretty straightforward.
Load with LoadEnemyShotData(pathtoshotscript).