// Jump to a specific branch based on hole type or water effect
// Thanks Bloodbane and White Dragon for the help
// Douglas Baldan / O Ilusionista - 2018.07.28
// www.brazilmugenteam.com
void main()
{
int Type = getlocalvar("type"); // Get hole type
void self = getlocalvar("self"); // Get caller
int y = getentityproperty(self,"y"); // Get Y pos
int HP = getentityproperty(self,"health"); // Get caller health
int Vy = getentityproperty(self,"tossv"); // Get Y velocity
if (Vy < 0 && y < -5)
{
switch(Type)
{ // check the hole Type
case 1 : // Type 1 (Water)
spawn01("water",0,0,1);
changeentityproperty(self, "subject_to_maxz", 0);
move(0,2000,0);
break;
case 2 : // Type 2
jumptobranch("branch2", 1); // change "branch2" for the desired branch name, between quotes
break;
//just copy and past the block above and change its value for more options
default : // in case of none of above, continue with the normal behaviour (die)
break;
}
}
}