Hey what's up guys? I have been using platforms quiet a bit now and I was wondering how I could make platforms go up and down automatically?
name TBP4
type none
shadow 0
alpha 0
remove 0
setlayer 1
offscreenkill 5000
antigravity 100
anim idle
@script
void self = getlocalvar("self");
if(frame==0||frame==2){
changeentityproperty(self, "velocity", 0, 0, 0);
}
if(frame==1){
changeentityproperty(self, "velocity", 0, 0, -5);
}
if(frame==3){
changeentityproperty(self, "velocity", 0, 0, 5);
}
@end_script
delay 180
loop 1
offset 0 0
drawmethod 256 256 1 0 0 -1 -1
platform 89 22 -90 -90 39 39 26 1
frame data/bgs/TBase/TBP3.gif
delay 22
frame data/bgs/TBase/TBP3.gif
delay 180
frame data/bgs/TBase/TBP3.gif
delay 22
frame data/bgs/TBase/TBP3.gif
1. When platform moves down, entities would fall instead of 'glued' to platform. This will trigger their WALKOFF animation, if they have any