Overlay effect on magic bar when full

NED

Well-known member
Hello,
I'm looking for a way to add a SUPER text overlay on MP bar when it's 100%
(And perhaps if possible another display text for 33% or 50% not sure yet)
Eg:
0% to 49% nothing
50% to 99 mid bar effect
100% full bar effect (max)

For max version, the idea is to replicate something like that :
ssf2tryu-1.png


I think the effect can be a special entity to spawn in certain conditions, but how exactly?
And how to make it binding to P1 MPbar when you're P1, same for P2 and P3.
Can offset values can be used?
BTW graphics will be the same for all versions P1, P2, P3

Does anyone tried something similar in their mod?

Thanks
 
Hello,

If it is just an overlay (no animation), might be simpler to do everything in updated.c.

For each player you get entity mp amount and use drawsprite accordingly.
 
Thanks, OK:
Let's make it as a simple text (no animation)
How can I make it?
What to edit exactly?

I doublechecked.
My full MP level is 300
I need a sprite for 75/300 (1/4)
I need a sprite for 150/300 (1/2)
And a sprite for full 300/300 (1/1)
 
If it's just a simple non-animated text, why not consider using the engine command iconmp#?

From the manual, this goes in your entities header:

Code:
iconmphigh {path}

~Same as icon, except this appears when the entity's MP is full.
~This only works for players. Other entities doesn't have MP.

iconmphalf {path}

~Same as icon, except this appears when the entity's MP is half.
~This only works for players. Other entities doesn't have MP.

iconmplow {path}

~Same as icon, except this appears when the entity's MP is low.
~This only works for players. Other entities don't have MP.

You could overlay it over your MP bar using mp#icon in Levels.txt:

Code:
mp{#}icon {x} {y}

~Determines the position of magicbar's icon.
~ {#} determines which player this setting is for and its possible values are 1, 2, 3 and 4. There's no space around {#} though.
~{x} and {y} are the number of pixels, right and down respectively, from the top left corner of the screen to the top left corner of the icon.

Is this not essentially what you're trying to accomplish?
 
Wow,
I completly forgot this was an existing feature!

I think, I'll get rid of 1/4 MP bar thing, since it's not hardcoded.


I did a try with generic sprite for the moment.
But nothing is displayed.

Code:
#TEST
iconmphigh data/sprites/finish1.gif#timeicon.gif
mp1icon 31 29
#TEST


Something is missing?




As an info this is my complete hud display (P2 P3 are not definitive and P4 will not exist)

Code:
# List level filenames here.
#
# Syntax:
#	set	[difficulty]	Start a new set of levels (e.g. "normal")
#
#	file	[filename]	A level or part of a level
#	next			Go to next level (show "stage clear" and stuff)
#	scene	[filename]	Show a cut-scene


#lbarsize {w} {h} {noborder} 	{type} 	{orientation} 	{border} 	{shadow} 	{graph} 	{backfill}
lbarsize 150 6 0 1#140 7 0 1
mpbarsize 100 6 0 1#100  6 0 1
#mpbarsize 63  6 	1		1 		0 			-300 		-300 		-300 		-300
equalairpause 1

timeloc	145 17 50 50 1# 150	-814     0     0	    1
timeicon data/sprites/timeicon.gif 133 4#136 4

#TEST
iconmphigh data/sprites/finish1.gif#timeicon.gif
mp1icon 31 29
#TEST

#noslowfx    1# pour les hitsound	
#loadingbg -1
#loadingbg2 -1
hiscorebg  1
maxplayers  2#4  
loadingbg 2 0 0 0  130 215
loadingbg2 2 0 0 0  130 215
p1life	 31 18#30 15#30	22
p1mp     31 29#30#165     48

e1life	 31 255
e1name	 31 246#249

p2life	 350 20#258	16
p2mp     350 20#405    48

p3life	 18	250
p3mp     165    264

p4life	 258	250
p4mp     405    264

p1score 8 9#31 9

p1icon	 8 18#8 5#8 12#165	1
p2icon	 405	1
p3icon	 165	235
p4icon	 405	235

p1smenu 44 235 20 125#44 235 20 125
p2smenu 434 235 400 125
p3smenu 44 265 20 155
p4smenu 434 265 400 155


rush 1 1 HITS_!! 1 1 MAX-HITS 2 2
p1rush 35 40 10 40 10 60 90 60
p2rush 415 40 390 40 370 60 450 60
p3rush 35 200 10 200 10 220 90 220
p4rush 415 200 390 200 370 220 450 220
p1lifex 185 19 0#555 555 0
p2lifex 555 555 0
#p3lifex 555 555 0
#p4lifex 555 555 0

p1lifen 192 19 0#100 14#158 16
p2lifen 398 17 0
 
NickyP said:
iconmphigh/half/low need to be in the character's text file. Sorry, I should have mentioned that. Once you shift it there it'll work.  :)

No problem,
I updated as you said and it works perfectly now!
Thanks a a lot NickyP :D
 
Back
Top Bottom