Since I really don't like the built-in Enemymarker of Danmakufu I decided to make my own Effect Object for it.
Some of my goals are:
-Better graphic than the bad loking built-in one (done)
-Making it look smooth and bright(graphics: yes / coding:...no... :derp:)
-Making it move on the same X-Position as the boss(done)
-Making it useable with ALL kinds of enemies and not only bosses( I didn't try that, but it should work...)
-Making it glow brighter when you move away from the boss and making it more transparent when you move towards it (there is one of my problems)
-Making it flash rapidly when the lifebar of the boss is nearly empty(I got another problem here)
Well, you already notice, it shall look like the one ZUN made for his games, just with my own graphics, because it makes it more unique :V
Anyway, my problems a little better explained:
First:
How can I get the opacity stuff in my script. To be a little more precise: I want a smoothly decreasing opacity when your X-Position gets nearer to the one of the boss.
I could do it with a counter that counts the difference and sets new values in Obj_SetAlpha every now and then, but that wouldn't be very smooth, except if I make bazillions of if-statements and you know, I'm too lazy for that and I'm pretty sure there are more ways and I just don't have the imagination :V
Now the flashing stuff:
The easiest , most efficient, but not best looking way I can think of is to create two parameters for my function.
One for the 1. life-value where it starts to flash slowly and the second one for the life-value where it starts to flash twice as fast.
This method is, like it said earlier, not sooo smooth and you know it is one of my goals to make it look good, eventhough some people might say that this is not necessary.
If you want to take a look at the script, feel free to do so:
http://pastebin.com/M83sz7F4Thanks for taking yur time :3