nedflandeurse said:OK,
Say me if I undertand right. The hard part is tweaking both sprite shapes, right?
BTW : it might be used as a tutorial.
maxman said:Piccolo, you can use setlayer so characters don't show their hands or something for the right side of that platform. I noticed in the clown stage that setlayer is not used as you said or maybe it's not set right.
Piccolo said:maxman said:Piccolo, you can use setlayer so characters don't show their hands or something for the right side of that platform. I noticed in the clown stage that setlayer is not used as you said or maybe it's not set right.
Yeah I tried to do that, but can't get it to work without creating new visual problems (such as entity not displayed in front of the right side of the platform when it should be) . Plus, as these platforms are generated and spawned randomly, I would need to change setlayer procedurally.
maxman said:Wow! That looks very clever, White Dragon! Are shadows scripted when it comes to the top of the platforms? I bet that would be very useful for Piccolo if he sees it for the clown stage (I guess).
Piccolo said:Looks good, seems to have all the featuresI wonder if you can concatenate blocks with this method though.
name test_bigplatform
type none
shadow 0
facing 1
gfxshadow 0
setlayer 1 #195
#antigravity 100
subject_to_wall 0
subject_to_platform 0
subject_to_obstacle 0
subject_to_hole 0
subject_to_screen 0
subject_to_gravity 1
no_adjust_base 0
height 77
load test_bigplatform1
load test_bigplatform2
onspawnscript @script
#import "data/scripts/lib.c"
void main() {
void self = getlocalvar("self");
void subent;
setentityvar(self, 0, "walkable_platform");
clearspawnentry();
setspawnentry("name","test_bigplatform1");
subent = spawn();
bindentity(subent,self,0,0,0,1,0);
clearspawnentry();
setspawnentry("name","test_bigplatform2");
subent = spawn();
bindentity(subent,self,0,-70,0,1,0);
/*bindentity(entity, target, int x, int z, int a, int direction, int bindanimation)
~Bind entity to target, so the target moves, the entity moves.
~x, z, a: relative to target.
~direction: 0 no change 1 same direction as target -1 opposite direction as target 2 always right -2 always left
~bindanimation: 0 No effect. 1 Keep same animation as the target. 2 Also keep same frame as the target. 4 Kill the entity if the animation doesn't match.
~To unbind a entity, use bindentity(entity, NULL());
~Notice: You can combine those values for bindanimation, so it can be 6 which means 2 and 4.*/
}
@end_script
script @script
#import "data/scripts/lib_level.c"
void main() {
void self = getlocalvar("self");
check_zpos_platform(self);
}
@end_script
anim idle
loop 1
delay 120
offset 149 204
platform 149 210 -93 -147 204 121 76 77
frame data/chars/misc/empty.gif
name test_bigplatform1
type none
shadow 0
gfxshadow 0
facing 1
setlayer 204
#antigravity 100
subject_to_wall 0
subject_to_platform 0
subject_to_obstacle 0
subject_to_screen 0
subject_to_gravity 0
anim idle
loop 1
delay 120
offset 149 204
frame data/bgs/debug/components/test_bigplatform1.gif
#frame data/chars/misc/empty.gif
name test_bigplatform2
type none
shadow 0
gfxshadow 0
facing 1
#antigravity 100
subject_to_wall 0
subject_to_platform 0
subject_to_obstacle 0
subject_to_screen 0
subject_to_gravity 0
anim idle
loop 1
delay 120
offset 149 134
frame data/bgs/debug/components/test_bigplatform2.gif
updatescript @script
#import "data/scripts/lib_level.c"
void main() {
check_shadow(180,-5,0,256,50,220,0,0);
}
@end_script
spawn test_bigplatform 1
coords 200 240
at 0
Piccolo said:Hehe so shadows are scripted, cool. I'll try your solution tomorrow !
Edit : can you provide the images files you use for this example (test_bigplatform1.gif and test_bigplatform2.gif) ?