Moving platfrom

esn23

Active member
how hard is it to code a moving platform that moves up and down and can be jumped on?  Can it be done without the use of script?
 
There are 2 mandatory elements you must have to make moving platforms:
1. Immunity to gravity
Either use antigravity 100 or subject_to_gravity 0
2. Moving ability (duh)
Either use move and/or movea  OR use script

For #2, if your moving platform is animated, using the former is not bad idea but if itsn't  , script is the most efficient way
 
Oh sorry, I forgot the most important element which is the platform itself. Set by using platform command.

I don't have example of platform moving up and down but I do have one that moves left and right

name Platbot1
type none
setlayer 2
facing 1
aggression 1
antigravity 100
subject_to_wall  0
subject_to_obstacle 0
subject_to_platform 0
animationscript  data/scripts/prscript.c

anim idle
    loop 1
    delay 80
    offset 31 34
    platform 31 34 -32 -32 32 32 7 7
    @cmd dasher -0.5 0 0 1
    frame data/chars/misc/platform/platbot1.png
    @cmd dasher 0.5 0 0 1
    frame data/chars/misc/platform/platbot1.png
 
No, the simplest compatible script file to use is lescript.c
So you need to change this line:

animationscript  data/scripts/prscript.c

to this:

animationscript  data/scripts/lescript.c
 
Back
Top Bottom