Text/sprite bind to the screen

NED

Well-known member
Hello,
I'm officially not working anymore in Openbor coding.
(just making some sprites to help here and there for other ppl  mugen and openbor projects)

But, my mind continue to think about solving the massive amount of problems in my mod.

In this video you can see that Prolophis Videogamer added a KO display when opponent is dead.
I have the same feature ingame in some situations. I think it's a spawned stuff from opponent death animation.

You can see that if player start moving, the KO animation is not binded to the screen display.

My question is how to make this effect actuallty stay as the same position on screen even when player starts moving and make a scrolling of background ?
 
if the KO thing is an an entity it has to have a line in the text file that goes like this:
entity type
panel:The entity will scroll together with level. If the entity's speed is 10, entity will stay with panel. If the speed is 5, it will stay with background (for direction left,right and both). This type is used to make multiple layers.
(i think the speed is 0)

& i think that you have to make the thing

subject_to_screen {bi}

    ~This command determines whether entity can move offscreen or not.
        0 = Entity can move offscreen. Default for non-player entities.
        1 = Entity can't move offscreen. Default for players.


subject_to_minz {int}

    ~This command toggles minimum Z bounding for entity on field.
        0 = Entity can move beyond current zmin or minimum z. Default for panel type entities.
        1 = Entity can't move beyond current zmin or minimum z. Default for most entities.
        This information was reversed in the manual before January 2019.


subject_to_maxz {int}

    ~This command toggles maximum Z bounding for entity on field.
        0 = Entity can move beyond current zmax or maximum z. Default for panel type entities.
        1 = Entity can't move beyond current zmax or maximum z. Default for most entities.
        This information was reversed in the manual before January 2019.

maybe you have to examine how the "go " arrows work in NS or any game that features them, those things seem to stay on top of everything in one place
 
nedflandeurse said:
Hello,
I'm officially not working anymore in Openbor coding.
(just making some sprites to help here and there for other ppl  mugen and openbor projects)

But, my mind continue to think about solving the massive amount of problems in my mod.

In this video you can see that Prolophis Videogamer added a KO display when opponent is dead.
I have the same feature ingame in some situations. I think it's a spawned stuff from opponent death animation.

You can see that if player start moving, the KO animation is not binded to the screen display.

My question is how to make this effect actuallty stay as the same position on screen even when player starts moving and make a scrolling of background ?
Hi nedflandeurse, I agree with oldyz instructions. A little addition, sometimes you need to use the "scroll" command to adjust the velocity and fit to the screen scrolling speed. I have an entity to show some move names, and here's the configuration in the header:

name Moves
type panel
speed 5
scroll 0.5
shadow 0
setlayer 100000
nomove 1 1
noquake 1 1
 
I'm bumping it because I noticed I didn't actually replied to you guys.
And sorry for it. My mind is always "concerned" now.

I checked it. I have no idea how it could change anything.
Pannel is definitely not giving the result I need.

The best result I had was using
type text

(instead of type none)

with "text", the entity don't move.
But the game is frozen.

So there is nothing in openbor that can display graphics (just like the HUD) and not moving from the screen borders ?

Thanks anyway for your help guys
 
Have you tried using type panel with speed 10, as oldyz posted above?

This is how Stage Clear text is made for Contra mod I've made:
Code:
name		StClear
speed		10
type		panel
facing		1
antigravity	100
setlayer	500


anim idle
	delay	100
	offset	105 20
	frame	data/chars/misc/stclear.png

Zvitor uses same method for huditem in Marvel Infinity Wars
Code:
name      hudItem
speed      10
type      panel
nolife      1
facing 1
gfxshadow	0
setlayer 10000


anim	idle
	loop	1
	delay	20
	offset	14 22
	frame	data/chars/misc/X0.gif
	offset	14 23
	frame	data/chars/misc/X0.gif
	offset	14 24
	frame	data/chars/misc/X0.gif
	offset	14 23
	frame	data/chars/misc/X0.gif
		
#|edited by openBor Stats v 0.51
 
Bloodbane
I should have precised the result I had with this method? sorry for that.

Yes, I tried with these settings.
speed 10
type panel

The result is : Horizontally, the text is always centered, but if not vertically.
Since I'm in a state of debugging, I try all possible ways to avoid bugs.

The text message finishes to stay "up" half out of screen "vertcically" if character move down. it happens.
-when player walk down
-when player land from a platform (ring or obstacle)

Again, with these settings, the problem is half solved.
I cannot remember how I decided all these settings first since I did it long time ago, but this is my win text entity header and code.

Code:
name	youwin#-------------------you win text entity

type panel#none#panel#none#text
speed 10

#speedf 1
subtype  noskip 
shadow	0
setlayer    9999#200#10#-1
#flip 1
lifespan   20#6#auto destruct time(en secondes)
#facing 3
animationscript data/scripts/slam.c

anim	idle
flipframe 0
	loop	0
	delay	4#2
	offset	240 270
	bbox	0 0 0 0
	sound	data/sounds/foulewin.wav#1
####	@cmd spawn06 "count1" 240 3 270#240 270 3#29 76 3#--name x y z--
	frame	data/sprites/wintxt.gif
#	sound	data/sounds/win.wav
	frame	data/sprites/empty.gif
	frame	data/sprites/wintxtb.gif
	frame	data/sprites/empty.gif

	frame	data/sprites/wintxt.gif
	frame	data/sprites/empty.gif
	frame	data/sprites/wintxtb.gif
	frame	data/sprites/empty.gif

#	sound	data/sounds/win.wav
	frame	data/sprites/wintxt.gif
	frame	data/sprites/empty.gif
	frame	data/sprites/wintxtb.gif
	frame	data/sprites/empty.gif

	sound	data/sounds/foulewin.wav
	frame	data/sprites/wintxt.gif
	frame	data/sprites/wintxt.gif#empty.gif
	frame	data/sprites/wintxt.gif#wintxtb.gif
	frame	data/sprites/wintxt.gif#empty.gif
	frame	data/sprites/wintxt.gif#wintxt.gif
	frame	data/sprites/wintxt.gif#empty.gif
	frame	data/sprites/wintxt.gif#wintxtb.gif
	frame	data/sprites/wintxt.gif#empty.gif

	delay	520#260####120#70#50#45#35#25
	sound	data/sounds/foule4.wav#2
	frame	data/sprites/wintxt.gif

#disparait
	@cmd	killentity getlocalvar("self")
	frame	data/sprites/empty.gif#paus1.gif
 
This should be so simple. Just be sure to set "subject_to_minz 0" in the K.O entity's header data. Use spawnframe in the enemies death animation.

spawnframe {frame} {x} {z} {a} {relative}

Used to make entity to spawn another entity. Normally it is used to spawn enemy. Spawning with this has no limit.
The spawned entity is determined by 'subentity' or 'custentity'.
{frame} determines at which frame the other entity is spawned.
{x} determines spawn range in x axis.
{z} determines spawn range in z axis.
{a} determines spawn range in y axis.
{relative} determines where the other entity is spawned.
0, count from the spawner. Spawned entity will face same direction with the spawner.
1, count from screen offset.
Regardless of spawned entities, 'group' settings (see below) in level texts won't prevent them from being spawned at all. Though, after they are spawned, 'group' will still count them.
 
nedflandeurse said:
Bloodbane
I should have precised the result I had with this method? sorry for that.

Yes, I tried with these settings.
speed 10
type panel

The result is : Horizontally, the text is always centered, but if not vertically.
Since I'm in a state of debugging, I try all possible ways to avoid bugs.

The text message finishes to stay "up" half out of screen "vertcically" if character move down. it happens.
-when player walk down
-when player land from a platform (ring or obstacle)

Again, with these settings, the problem is half solved.
I cannot remember how I decided all these settings first since I did it long time ago, but this is my win text entity header and code.

Code:
name	youwin#-------------------you win text entity

type panel#none#panel#none#text
speed 10

#speedf 1
subtype  noskip 
shadow	0
setlayer    9999#200#10#-1
#flip 1
lifespan   20#6#auto destruct time(en secondes)
#facing 3
animationscript data/scripts/slam.c

anim	idle
flipframe 0
	loop	0
	delay	4#2
	offset	240 270
	bbox	0 0 0 0
	sound	data/sounds/foulewin.wav#1
####	@cmd spawn06 "count1" 240 3 270#240 270 3#29 76 3#--name x y z--
	frame	data/sprites/wintxt.gif
#	sound	data/sounds/win.wav
	frame	data/sprites/empty.gif
	frame	data/sprites/wintxtb.gif
	frame	data/sprites/empty.gif

	frame	data/sprites/wintxt.gif
	frame	data/sprites/empty.gif
	frame	data/sprites/wintxtb.gif
	frame	data/sprites/empty.gif

#	sound	data/sounds/win.wav
	frame	data/sprites/wintxt.gif
	frame	data/sprites/empty.gif
	frame	data/sprites/wintxtb.gif
	frame	data/sprites/empty.gif

	sound	data/sounds/foulewin.wav
	frame	data/sprites/wintxt.gif
	frame	data/sprites/wintxt.gif#empty.gif
	frame	data/sprites/wintxt.gif#wintxtb.gif
	frame	data/sprites/wintxt.gif#empty.gif
	frame	data/sprites/wintxt.gif#wintxt.gif
	frame	data/sprites/wintxt.gif#empty.gif
	frame	data/sprites/wintxt.gif#wintxtb.gif
	frame	data/sprites/wintxt.gif#empty.gif

	delay	520#260####120#70#50#45#35#25
	sound	data/sounds/foule4.wav#2
	frame	data/sprites/wintxt.gif

#disparait
	@cmd	killentity getlocalvar("self")
	frame	data/sprites/empty.gif#paus1.gif

nedflandeurse
If I understood correctly, you want something like this, right?
Look at the "Rage" text in the screen, it is Horizontally and Vertcically fixed even if the character is walking in X/Z axis.
https://www.youtube.com/watch?v=kfzQdfVRxTk

Like I said before in this post, here's the entity that shows the "Rage" text:
Code:
name      Moves
type      panel
speed     5
scroll    0.5
shadow    0
setlayer  100000
nomove    1 1
noquake   1 1

There's no script to maintain the text entity fixed, and it's spawned by the "spawn01" function with no additional parameters. The header configuration will do all necessary tasks.
 
Thanks for your help guys.

Kratus
I tried copy and paste the exact header you posted here.
beside of the name of entity of course.

But the result is not like in your video.
Actually the video is exactly what I want as a result.
The text display have to be just like a part of the HUD.

I also tried spawn01 but the result seems the same.


Actually my coding is perhaps weird. I usually have weird stucture in my entities, because I used to do a lot of trial and error to make stuff working in the past. I use to tweak and edit 1 file for 5-6days until it works and sometime give up some hard to make features.

I cannot remember exactly how my stuff works, but basiccally.

"youwinner" will be spawned by script after some delay.
Code:
name	youwiner#-------you win spawner (by me - moyen de spawner le youwin en utilisant spawnframe = bien centré)
type    none#obstacle
cantgrab 1
#shadow  0
#gfxshadow  1
health  80#50#(plus d'energie pour durer??)
#diesound  data/sounds/wood2.wav
nolife  1
#flash   obfla
noatflash 1
offscreenkill  2000
#candamage  obstacle npc enemy#player(ses debris ne touchent pas un player)
#flip 1

anim idle

	subentity	youwin#End1b
	spawnframe	0 240 270 0 1

	loop	0
	delay	5
	offset	0 0#82 106#75 114
#	bbox    22 56 120 61#18 56 113 67#----TEMP desactiv
#      platform   10 118 20 0 154 134 25 42

#      platform   10 118 20 0 154 134 25 43
#      platform   13 117 20 0 150 130 25 41#13 117 20 0 130 150 25 41
##      platform   13 117 -20 0 93 113 25 41
###      platform   13 117 -20 0 93 113 25 41#19 123 -15 0 125 139 20 21
	frame	data/chars/misc/empty.gif#table1.gif

And "youwinner" will spawn "youwin"
(here with your header settings) => but no effect...

Code:
name	youwin#-------------------you win text entity


type      panel
speed     5
scroll    0.5
shadow    0
setlayer  100000
nomove    1 1
noquake   1 1




#type panel#none#panel#none#text
#speed 10

##speedf 1
#subtype  noskip 
#shadow	0
#setlayer    9999#200#10#-1
##flip 1
#lifespan   20#6#auto destruct time(en secondes)
##facing 3
animationscript data/scripts/slam.c

anim	idle
flipframe 0
	loop	0
	delay	4#2
	offset	240 270
	bbox	0 0 0 0
	sound	data/sounds/foulewin.wav#1
####	@cmd spawn06 "count1" 240 3 270#240 270 3#29 76 3#--name x y z--
	frame	data/sprites/wintxt.gif
#	sound	data/sounds/win.wav
	frame	data/sprites/empty.gif
	frame	data/sprites/wintxtb.gif
	frame	data/sprites/empty.gif

	frame	data/sprites/wintxt.gif
	frame	data/sprites/empty.gif
	frame	data/sprites/wintxtb.gif
	frame	data/sprites/empty.gif

#	sound	data/sounds/win.wav
	frame	data/sprites/wintxt.gif
	frame	data/sprites/empty.gif
	frame	data/sprites/wintxtb.gif
	frame	data/sprites/empty.gif

	sound	data/sounds/foulewin.wav
	frame	data/sprites/wintxt.gif
	frame	data/sprites/wintxt.gif#empty.gif
	frame	data/sprites/wintxt.gif#wintxtb.gif
	frame	data/sprites/wintxt.gif#empty.gif
	frame	data/sprites/wintxt.gif#wintxt.gif
	frame	data/sprites/wintxt.gif#empty.gif
	frame	data/sprites/wintxt.gif#wintxtb.gif
	frame	data/sprites/wintxt.gif#empty.gif

	delay	520#260####120#70#50#45#35#25
	sound	data/sounds/foule4.wav#2
	frame	data/sprites/wintxt.gif

#disparait
	@cmd	killentity getlocalvar("self")
	frame	data/sprites/empty.gif#paus1.gif


#375

Some gif to show how it looks ingame. (this is some "unperfect" jump out of ring)
Actually the text seems to follow
-horizontally : perfectly
-Vertically+Z axis : well until a moment when it stops following

u93LNXI.gif
 
nedflandeurse
Yeah, now I understand. As a suggestion, you can also try to use the "drawstring" function in the level update script. I'm using this method for a lof of things, sometimes is better than spawn text entities.
 
I think I should use this sample code displayed here for the next sequel of Real Bout Pro Wrestling or the original fan game's future updates (Which i am doing right now at this moment). By the way Nedflandeurse you still have that Rachel character from the world arena project you discarded?
 
Kratus said:
nedflandeurse
Yeah, now I understand. As a suggestion, you can also try to use the "drawstring" function in the level update script. I'm using this method for a lof of things, sometimes is better than spawn text entities.

I will try to find "drawstring", I never used it.
I'll look fo it in your mod project.
Thanks

I still sont understand why some stuff worksperfectly in SOR2X, but look wrongly displayed in my tests.

Jeremiah Cuff said:
I think I should use this sample code displayed here for the next sequel of Real Bout Pro Wrestling or the original fan game's future updates (Which i am doing right now at this moment). By the way Nedflandeurse you still have that Rachel character from the world arena project you discarded?

Glad to see you're still working on your games even if the wrestling mechanics cannot be coded without very STRONG advanced code.

Sorry, I would not like my custom to be used in other projects.
I put a lot of work in this character to give her many custom wrestling-mechanics based animations.
The only right use of these customs is to use her in an actual wrestling game with very advanced wrestling mechanics. (what I was trying to code)
So, her other NON-WRESTLING sprites are just Tia Langray sprites with short hair.
Also, her palette is a FREAKING mess, I never find a way to fix her until now.

My template Rachel use many gethit custom sprites to work (actually more than 80, no jokes)
All the characters fighting her need all these gethit sprites otherwise her moves would have no sense.
Some examples.
0Pnolyp.jpg


I think your projects don't need to have my exact character.
Tia would be a better base, because she have more moves to use (moves that don't require advanced throws/slams/mechanics coding)
Also, if you use a right sprite rip of Tia, you can give her nice palettes (something impossible for me, because I based mine on a very old mugen character with horrible sprite rips and tons of colors errors/problems)

Actually, as you can see with this thread. I'm not in point Zero. I tweak small stuff. (even with this, the engine makes fun of me...)
So, I don't even think about coding more advanced stuffs now, unless I find some skilled partner who have interest in this project.
 
Jeremiah Cuff said:
Thanks for letting me know nedflandeurse, I totally understand that you don't want to share some of your content for another person's fan game project, i just thought I might ask about it that's all.

Jeremiah Cuff

I see. Glad you understand. Just to clarify (because my text was long, I'm not sure you can take the time to read)

Until now Rachel = (30% of Tia's full set) + Many custom to use ONLY with wrestling gameplay (you can do nothing without advanced scripting)

There is at least 70% of Tia sprite I NEVER converted !

Using Tia for your game would be a better choice to fit the other characters of your game.
Tia Have MORE material for a game WITHOUT advanced wrestling mechanics.
 
Kratus said:
nedflandeurse
Yeah, now I understand. As a suggestion, you can also try to use the "drawstring" function in the level update script. I'm using this method for a lof of things, sometimes is better than spawn text entities.

Kratus
Thanks again.

I checked in Sor2x scripts in updatelevel "bike_stage.c" is the only one I can find right now with "drawstring"
I don't understand anything about how to use this for text spawn + structure of code...
My nightmare starts again I suppose. "shiver"... 2014...2015...  :-[

Code:
	//DEFINE PLAYER LEADER, THE ONE THAT CONTROLS BGSPEED
	if(player1 != NULL()){
		leader  = player1;
		iPIndex = 0;
		setglobalvar("leader", iPIndex);
		x 		= getentityproperty(player1, "x");
		y 		= getentityproperty(player1, "y");
		z 		= getentityproperty(player1, "z");
		drawstring(x-xDif, z-y-yDif, font, "*", z);
 
nedflandeurse said:
Kratus said:
nedflandeurse
Yeah, now I understand. As a suggestion, you can also try to use the "drawstring" function in the level update script. I'm using this method for a lof of things, sometimes is better than spawn text entities.

Kratus
Thanks again.

Hi nedflandeurse
I checked in Sor2x scripts in updatelevel "bike_stage.c" is the only one I can find right now with "drawstring"
I don't understand anything about how to use this for text spawn + structure of code...
My nightmare starts again I suppose. "shiver"... 2014...2015...  :-[

Code:
	//DEFINE PLAYER LEADER, THE ONE THAT CONTROLS BGSPEED
	if(player1 != NULL()){
		leader  = player1;
		iPIndex = 0;
		setglobalvar("leader", iPIndex);
		x 		= getentityproperty(player1, "x");
		y 		= getentityproperty(player1, "y");
		z 		= getentityproperty(player1, "z");
		drawstring(x-xDif, z-y-yDif, font, "*", z);

Hi nedflandeurse
If you want, send me a link to your game and I can take a look in your code
 
Back
Top Bottom