display problems of a platform using entity.

NED

Well-known member
My BG already have a ring using platform code.
It is working perfectly.
But everything was on one layer.

I have added a new layer as and entity to display the ring/mat more realistically.
This is the code of entity
Code:
name	rmat1
type    none
shadow	0
health  99999999#1
diesound  data/sounds/wood.wav
nolife  1
noatflash 1
nomove 1 1# pas de move - pas de turn
#gfxshadow 0#1
	
anim	idle
	loop	1
	delay	6
	offset	720 580
#	bbox	22 15 36 81
	frame	data/sprites/rmat1.gif

This is the code of my level
Code:
# File modified by Level Editor on 2010-08-04
# File modified by Level Editor on 2010-08-04
music		data/music/ring.bor#rushmore.bor
panel		data/bgs/1/ringc1.gif	none				none
#background	data/bgs/1/ring2.gif 
order           A
#spawn1  195 0 0#145  110
#spawn2  175  110
#spawn3  155  115
#spawn4  185  115
nohit   1
 settime  0
 notime  1
cameraoffset 0  -50#-100
cameratype 0#1
gravity  -15.8#-16
direction both

light -98 -55
at 0

shadowalpha  2
at  0


spawn  resetvar
	coords  100  268
	at  0


group    1 1#1 1
at      0


#wall {xpos} {zpos} {upperleft} {lowerleft} {upperright} {lowerright} {depth}{alt} 
#wall 162 466 240 162 755 833 130 55
#wall 162 466 240 318 162 466 755 318 833 466 130 55#130 55
#OLD-RING-ORI)wall 162 466 78 0 593 671 155 55#130 55
wall 299 584 100 0 738 838 170 67#66#130 55
#578          ----190



spawn  rmat1
	coords  720 580#646  259
#        health  999
#	map  1
	at  0




spawn  mex
	coords  646  259
        health  999
#	map  1
	at  0

My problem is that the ring is not displayed correctly.
-1st- it is facing the wrong way, I want to flip it hozirontally without changing the original picture

-2nd- When you mount on the ring the ring is still displayed in front of you...
(check the picture with green cross) >:(
Other contacts with the ring are OK.

ring121212.jpg


How can I fix it?
Thanks

--------------------

Anyone can explain how to fix these problems?
I tried my best today, but still stuck...

problem 1 must be something about flipping entities I don't have found it...
Problem 2 I don't know how to give a character an upper layer if he's on the ring.
 
For your first question, you can check flip command.  You need to use flip 1 to spawn that entity.
As for the second question, I don't think it can be solved with a single trick. If your platform is a single entity, it has to be either in front of or behind your character. You'd have to spawn several fake entities to cover the edge and plan your walkable area carefully, with well designed offsets.
Believe me, it is not an easy task.



[attachment deleted by admin]
 
I used this flip entry in my level file

Code:
spawn  rmat1
	coords  717 579#720 580#646  259
	at  0
	flip 1

It still don't flip? What's wrong with my work?

For the 2nd thing layer display of platform, this is what I was affraid to hear...
It's sad that there is nothing in the engine to simulate it. It could be very useful...

The major problem, is there is nothing to explain to Openbor that an entity who is in altitude have to be displayed in front of the ring...

It's a sheme since most of my levels will be based on this ring scheme (out of the street levels on motorcycle ones...) :-[

Is there something that can fix it. Something else than entity, I don't know?
 
try changing the ring offset and setlayer 0




you can flip the ring in level
with
spawn ring
flip1 <-----------direction
coords 100 200
at 0

or using facing in the the ring.txt
facing 0 (left)
facing 1 (right)
 
The offset is already on the bottom of the ring skirt.
It allows to go in front of the ring and be a little hidden when you're on the sides, naturally it hides you when you are behind the ring.
But the problem is still here. It hide you when you are on the ring.

I tested both methods for flipping the entity.
No chance... :-[

If only a setting would allow to be displayed in front of an obstacle when you're on it... :-\
 
read manual, remove conflicting code from header and try again.flip command works fine.

this is totallly wrong:

spawn  rmat1
coords  717 579#720 580#646  259
at  0
flip 1


AT is like the end of whole spawn command, you pasted flip after command ended.If you keep making mistakes like this then i dont know, try something easier and practice more or check your code many many times.
 
About flipping the sprite.
It's fixed. Really stupid error by me... :-[

I'm still wondering how cutting the ring in small pieces would work the right way... :-\

BTW. on WHSJE, It seems that the obstacles produce some similar effect.
I'm always in the same Zplane, just jumped on the obstacle and be displayed in front of it when I'm on the top...

whsjeobstacle00.jpg


This is exactly what I would for the ring.
 
cant you ahve ring floor graphics in the stage panel picture? try to make the right using platform in stage, dont try to make it by making platform in entity.
 
yes rmat1 is the ring entity (ring mat)
This is what I had :

Level code
Code:
music		data/music/ring.bor#rushmore.bor
panel		data/bgs/1/ringc1.gif	none				none
#background	data/bgs/1/ring2.gif 
order           A
spawn1  195 0 0
#spawn1  195 0 0#145  110
#spawn2  175  110
#spawn3  155  115
#spawn4  185  115
nohit   1
 settime  100#0
# notime  1
cameraoffset 0  -80#-50#-100
cameratype 0#1
gravity  -15.8#-16
direction both

light -98 -55
at 0

shadowalpha  2
at  0


spawn  resetvar
	coords  100  268
	at  0


group    1 1
at      0

wall 299 584 100 0 738 838 170 67#66#130 55

spawn  rmat1# ring sprite
	flip 1
	coords  719 579#720 580#646  259
	at  0

spawn  mex
	coords  1263 0#646  259
        health  999
	at  0

Entity code (rmat1)
Code:
name	rmat1
type    none#obstacle
shadow	0
health  99999999#1
diesound  data/sounds/wood.wav
nolife  1
noatflash 1
nomove 1 1# pas de move - pas de turn

anim	idle
	loop	1
	delay	6
	offset	720 580
	frame	data/sprites/rmat1.gif

Level sprite and ring obstacle sprite ziped. (very small file)
http://www.mediafire.com/?n7tannpkx3ady4x
 
Good news, the problem is quite resolved.
I changed the offset of the ring/mat to something different. (bottom of the ring in BG)
From the black cross to the red cross:
ring2o.jpg


This is how it works now.
ring3s.jpg

As you can see both foreground and background layering is OK.
whe you're on the ring too.
The sides of ring display behind the characters but I think this is not a major problem.

What do you guys think of it?
 
Back
Top Bottom