nedflandeurse said:The position of offset (in X) will determine how character is displayed or hide by ofstacle/plateform....
maxman said:I wonder if setlayer for that huge platform could work. (I fear it won't.)
Piccolo said:maxman said:I wonder if setlayer for that huge platform could work. (I fear it won't.)
I guess it would create either picture 1 or picture 2 effect.
I've come up with a solution. It's certainly not the best nor the most economic but I think I'll continue with this one, because I want to have shadows.
- Platform as platform is created via wall
- Platform as sprite is drawn on panel
(These two points allow shadow drawn by the engine)
- Platform as sprite is also drawn via two entities. Basically, one of these entities allow proper masking when player is in front and on the left side of the platform, while the other allow proper masking when player is behind and on the right side.
- Both of these entities become invisible when player altitude > platform wall altitude. What is visible in these conditions is the platform drawn on the panel (which "support" shadows).
- In addition, the first entity become invisible when x distance from player is greater than a certain value. So that it doesn't mask the player when he is on the right side of the platform.
The main drawbacks of this method are that it's not global and specific to one entity (and that you have to draw the platform on the panel if you want shadows). The main benefits are that you don't need to edit sprites and you still have shadows.
For a global method (see my clown stage) you'll also need to have mutiple entities but each of these entities should draw a part of the platform sprite.
White Dragon said:hiihihi
Piccolo I advice you a setlayer game!![]()
Piccolo said:White Dragon said:hiihihi
Piccolo I advice you a setlayer game!![]()
What do you mean ? Using setlayer and changing it when "necessary" ? Did you use such a technique to solve this problem in your mod ?
name wsample
type panel
shadow 0
facing 1
antigravity 100
subject_to_wall 1
subject_to_platform 1
subject_to_obstacle 1
gfxshadow 1
anim idle
loop 1
delay 120
offset 149 199
platform 149 204 -77 -147 191 121 70 130
frame data/chars/misc/wsample.png
name plathalf
type none
shadow 0
facing 1
gfxshadow 1
antigravity 100
subject_to_wall 1
subject_to_platform 1
subject_to_obstacle 1
anim idle
loop 1
delay 120
offset 149 199
platform 149 204 -77 -147 191 121 70 130
frame data/chars/misc/plathalf.png
name plat1
type panel
shadow 0
gfxshadow 1
facing 1
antigravity 100
subject_to_wall 1
subject_to_platform 1
subject_to_obstacle 1
setlayer 51
anim idle
loop 1
delay 120
offset 149 199
platform 149 204 -77 -147 191 121 70 130
frame data/chars/misc/plat2.png
spawn plathalf
coords 180 230
at 0
spawn plat1
coords 180 230
at 0
White Dragon said:Good work maxman!!
White Dragon said:Piccolo said:White Dragon said:hiihihi
Piccolo I advice you a setlayer game!![]()
What do you mean ? Using setlayer and changing it when "necessary" ? Did you use such a technique to solve this problem in your mod ?
No divide it into trangles and set the right layer for these triangles![]()
maxman said:Yeah Ned, mine works.I had been trying to fix it for 4 or 5 days (with countless tries) for Piccolo.
maxman said:Yeah Ned, mine works.I had been trying to fix it for 4 or 5 days (with countless tries) for Piccolo. It was tough at first, but when I got to that method of splitting later on, it works.
Try to split them in a simple way.