>>>>>>>>NOW V3 updated 28/09/10<<<<<<<<
you need to 1st copy this movement2.gs to the scripts folder (REPLACE ANY OLDER COPIES BEFORE V3)
then add it to the dizzy.gs list.
you need to replace the custom movement code at the bottom section of func HandlerPlayerUpdate()
with
//Custom movement
custommove = PlayerGet(P_CUSTOMMOVE);
if(custommove==0) // engine default
{
PlayerSet(P_W,CM_BOXW);
PlayerSet(P_H,CM_BOXH);
}
else
if(custommove==1) // scripted default
{
CM2_Update();
}
add to the end of def.gs or gamedef.gs
int laddbott
int laddtop
int laddx
int climbtype
int clde
int del
the next part is added in game.gs and will be called when the ladder or rope is activated
//////////////////
//rope climbing
//////////////////
func RopeCollide()
{
PlayerSet(P_Y, PlayerGet(P_Y) -2);
PlayerSet(P_X,laddx);
if(PlayerGet(P_CUSTOMMOVE)==0){PlayerEnterScripted();}
PlayerSet(P_TILE, 28);
if(PlayerGet(P_FLIP)==0){PlayerSet(P_X,laddx);}
if(PlayerGet(P_FLIP)==1){PlayerSet(P_X,laddx+16);}
scub = InventoryHasItem(ID_SCUBA);
if(scub==1){PlayerSet(P_TILE, 56);}
WaitFrames(6);
PlayerSet(P_CUSTOMMOVE,1);
CM2_EnterIdle();
}
//////////////////
//ladder climbing
//////////////////
func LadderCollide()
{
PlayerSet(P_Y, PlayerGet(P_Y) -2);
PlayerSet(P_X,laddx);
if(PlayerGet(P_CUSTOMMOVE)==0){PlayerEnterScripted();}
PlayerSet(P_TILE, 26);
scub = InventoryHasItem(ID_SCUBA);
if(scub==1){PlayerSet(P_TILE, 56);}
WaitFrames(6);
PlayerSet(P_CUSTOMMOVE,1);
CM2_EnterIdle();
}
add this code into BeginNewGame() to initialise the 2 variables
climbtype=0;del=0;
the ladder activates when you hit a collider. this needs to be the length of the ladder.
you need tell it the ladder top and bottom positions.
also it needs to know the x position when dizzy is on the ladder
the x position must be a multiple of 4.
//////////////////
//rope collider
//////////////////
func CollideObject_1000_1() // moved into collision with rope
{
laddtop=164;
laddbott=244;
laddx=596;
clde=1000;idx=ObjFind(clde);ObjSet(idx,O_DISABLE,1);
climbtype=1;
RopeCollide();
}
//////////////////
//ladder collider
//////////////////
func CollideObject_1001_1() // moved into collision with ladder
{
laddtop=164;
laddbott=242;
laddx=684;
clde=1001;idx=ObjFind(clde);ObjSet(idx,O_DISABLE,1);
climbtype=0;
LadderCollide();
}
finally here are the tiles for dizzy climbing. you will need to re-colour the aqualung ones to match your game
dizzy climb tiles v3 zip