Jump from walls / edges

NED

Well-known member
Basically, I'm trying to understand how to do triangle jump (Chun Li wall jump move) But with an automatic move done like triangle jump kick...

I would like it to be possible on screen edge, walls and vertical surface of obstacles and platforms.

I've seen in the BK chinese mod I won't name here...

Is there a way to use this feature?
Thanks
 
It's doable, though for obstacles, you have to set platform in their texts first to make it easier to detect.

Currently I only have wall jump script. No script for screen edge jump nor platform jump yet

Oh about triangle jumpkick, I think that's different story. Referring to Punisher's and Nick Fury's triangle jump kick, it is performable after their jump kick hits something not because they are near wall, screen edge or platform
 
Wall jump requires keyscript like this:

walljump.c

void main()
{
    int iPlIndex = getlocalvar("player"); //Get calling player
    void vSelf = getplayerproperty(iPlIndex , "entity"); //Get calling entity
    void vAniID = getentityproperty(vSelf,"animationID"); //Get current animation ID
    void vAniPos = getentityproperty(vSelf, "animpos"); //Get current animation frame
    int iDir = getentityproperty(vSelf, "direction");  //Get current facing direction
    int x = getentityproperty(vSelf, "x");
    int y = getentityproperty(vSelf, "a");
    int z = getentityproperty(vSelf, "z");

    void iUp = playerkeys(iPlIndex, 1, "moveup"); // New key status of "Up"
    void iDown = playerkeys(iPlIndex, 1, "movedown"); // New key status of "Down"
    void iLeft = playerkeys(iPlIndex, 1, "moveleft"); // New key status of "Left"
    void iRight = playerkeys(iPlIndex, 1, "moveright"); // New key status of "Right"
    void iJump = playerkeys(iPlIndex, 1, "jump"); //New key status of "Jump"
    void iSpecial = playerkeys(iPlIndex, 1, "Special"); //New key status of "Special"
    void iAttack = playerkeys(iPlIndex, 1, "attack"); //New key status of "Attack"
    void iAttack2 = playerkeys(iPlIndex, 1, "attack2"); // New key of "Attack 2"
    void iAttack3 = playerkeys(iPlIndex, 1, "attack3"); // New key of "Attack 3"

    if(vAniID == openborconstant("ANI_JUMP")){
    if(iJump && iDir == 1 && y <= checkwall(x+15,z)){
        changeentityproperty(vSelf, "direction", 0);
        tossentity(vSelf, 3, -1, 0); // Wall Jump
      } else if(iJump && iDir == 0 && y <= checkwall(x-15,z)){
        changeentityproperty(vSelf, "direction", 1);
        tossentity(vSelf, 3, 1, 0); // Wall Jump
      }
    }
}

Copy this in a file name walljump.c, save it in data/scripts folder then declare it like this:

keyscript data/scripts/walljump.c

To perform wall jump, simply jump against a wall then press jump when character is blocked by wall. The character will change direction, jumps higher WITHOUT changing animation

HTH
 
I tried to apply it and tested it on my "wrestling level" (the crowd area are delimited by using walls code.
But for some reason it don't seems to work for me.
I think I succedeed 1 time to do the wall jump during my repeted attemps.
Strange. I don't get it.... ???
 
that code won't trigger on that special case there you make platforms using wall?

It would work there, this code only detects wall

So, it would trigger while you are not near a wall, but ABOVE a wall, no?

Nope. The code compares wall height with current altitude therefore if player is above a wall, wall jump won't be performed

I think I succedeed 1 time to do the wall jump during my repeted attemps.
Strange. I don't get it....

Hmmm... try to get blocked by the wall before attempting wall jump
 
Bloodbane said:
Hmmm... try to get blocked by the wall before attempting wall jump

pDJGWi9.jpg


I finally get what was my problem on wall jump code.
It seems to work only from neutral jump
Code:
anim	jump
It don't causes problem for jump forward if you don't have "custom" anims for them.

I would like this one to work on these kind of jumps too

Code:
anim	forwardjump
anim	runjump

-Also, what can be changed to use a custom wall jump anim if success?
-Does such a code can be edited to detect edge of screen, or a new complete script have to be created?
 
Code:
void main()
{
    int iPlIndex = getlocalvar("player"); //Get calling player
    void vSelf = getplayerproperty(iPlIndex , "entity"); //Get calling entity
    void vAniID = getentityproperty(vSelf,"animationID"); //Get current animation ID
    void vAniPos = getentityproperty(vSelf, "animpos"); //Get current animation frame
    int iDir = getentityproperty(vSelf, "direction");  //Get current facing direction
    int x = getentityproperty(vSelf, "x");
    int y = getentityproperty(vSelf, "a");
    int z = getentityproperty(vSelf, "z");

    void iUp = playerkeys(iPlIndex, 1, "moveup"); // New key status of "Up"
    void iDown = playerkeys(iPlIndex, 1, "movedown"); // New key status of "Down"
    void iLeft = playerkeys(iPlIndex, 1, "moveleft"); // New key status of "Left"
    void iRight = playerkeys(iPlIndex, 1, "moveright"); // New key status of "Right"
    void iJump = playerkeys(iPlIndex, 1, "jump"); //New key status of "Jump"
    void iSpecial = playerkeys(iPlIndex, 1, "Special"); //New key status of "Special"
    void iAttack = playerkeys(iPlIndex, 1, "attack"); //New key status of "Attack"
    void iAttack2 = playerkeys(iPlIndex, 1, "attack2"); // New key of "Attack 2"
    void iAttack3 = playerkeys(iPlIndex, 1, "attack3"); // New key of "Attack 3"

    if(vAniID == openborconstant("ANI_JUMP") || openborconstant("ANI_JUMPFORWARD") || openborconstant("ANI_RUNJUMP")){ 
     if(iJump && iDir == 1 && y <= checkwall(x+15,z)){
        changeentityproperty(vSelf, "direction", 0);
        tossentity(vSelf, 3, -1, 0); // Wall Jump
      } else if(iJump && iDir == 0 && y <= checkwall(x-15,z)){
        changeentityproperty(vSelf, "direction", 1);
        tossentity(vSelf, 3, 1, 0); // Wall Jump
      }
    }
}

This should work. || means OR.  So you can usually add extra animation checks to scripts like this without any problems.

CHANGES ARE TO LINE 22
Code:
if(vAniID == openborconstant("ANI_JUMP") || openborconstant("ANI_JUMPFORWARD") || openborconstant("ANI_RUNJUMP")){

I tested it as far as it doesnt crash but I have no walls to test it on :P


- For other questions  I would like to know the same thing.  Using something like this for edge of screen would be useful.
 
Thanks BeasTie, It can be used for other jumps now.

But for some reason, now when I use it for regular (neutral) jump, my character only flips horzontally whithout doing the proper wall jump.

And when I do it in a run jump, it cancels with another run jump (very fast). The worst on this situation is that you can do run wall jump even when there is no wall around, just in every random places. ???
 
Beastie's solution is correct though I must remind you that there's velocity setting or I should say, there's scripted jumping set during wall jump like this:

Code:
tossentity(vSelf, 3, 1, 0);

This line is similar to jumpframe 0 3 1 0

For jumps with different speed such as running jump, you need to make different line for that like this:

Code:
    if(openborconstant("ANI_RUNJUMP")){ 
     if(iJump && iDir == 1 && y <= checkwall(x+15,z)){
        changeentityproperty(vSelf, "direction", 0);
        tossentity(vSelf, 3, -2, 0); // Wall Jump
      } else if(iJump && iDir == 0 && y <= checkwall(x-15,z)){
        changeentityproperty(vSelf, "direction", 1);
        tossentity(vSelf, 3, 2, 0); // Wall Jump
      }
    }

If you want to insert this to code, remove runjump check in the previous line first so they become this:

Code:
    if(vAniID == openborconstant("ANI_JUMP") || openborconstant("ANI_FORWARDJUMP")){ 
     if(iJump && iDir == 1 && y <= checkwall(x+15,z)){
        changeentityproperty(vSelf, "direction", 0);
        tossentity(vSelf, 3, -1, 0); // Wall Jump
      } else if(iJump && iDir == 0 && y <= checkwall(x-15,z)){
        changeentityproperty(vSelf, "direction", 1);
        tossentity(vSelf, 3, 1, 0); // Wall Jump
      }
    }

    if(openborconstant("ANI_RUNJUMP")){ 
     if(iJump && iDir == 1 && y <= checkwall(x+15,z)){
        changeentityproperty(vSelf, "direction", 0);
        tossentity(vSelf, 3, -2, 0); // Wall Jump
      } else if(iJump && iDir == 0 && y <= checkwall(x-15,z)){
        changeentityproperty(vSelf, "direction", 1);
        tossentity(vSelf, 3, 2, 0); // Wall Jump
      }
    }

The worst on this situation is that you can do run wall jump even when there is no wall around, just in every random places.

That's totally strange! there's wall check function defined here so the script won't perform wall jump if there's no wall at all

-Does such a code can be edited to detect edge of screen, or a new complete script have to be created?

For this one I got a working one:

void main()
{
    int iPlIndex = getlocalvar("player"); //Get calling player
    void vSelf = getplayerproperty(iPlIndex , "entity"); //Get calling entity
    void vAniID = getentityproperty(vSelf,"animationID"); //Get current animation ID
    void vAniPos = getentityproperty(vSelf, "animpos"); //Get current animation frame
    int iDir = getentityproperty(vSelf, "direction");  //Get current facing direction
    int x = getentityproperty(vSelf, "x");
    int y = getentityproperty(vSelf, "a");
    int z = getentityproperty(vSelf, "z");
    int XPos = openborvariant("xpos"); //Get screen edge's position
    int Screen = openborvariant("hResolution"); // Get screen width
   
    void iUp = playerkeys(iPlIndex, 1, "moveup"); // New key status of "Up"
    void iDown = playerkeys(iPlIndex, 1, "movedown"); // New key status of "Down"
    void iLeft = playerkeys(iPlIndex, 1, "moveleft"); // New key status of "Left"
    void iRight = playerkeys(iPlIndex, 1, "moveright"); // New key status of "Right"
    void iJump = playerkeys(iPlIndex, 1, "jump"); //New key status of "Jump"
    void iSpecial = playerkeys(iPlIndex, 1, "Special"); //New key status of "Special"
    void iAttack = playerkeys(iPlIndex, 1, "attack"); //New key status of "Attack"
    void iAttack2 = playerkeys(iPlIndex, 1, "attack2"); // New key of "Attack 2"
    void iAttack3 = playerkeys(iPlIndex, 1, "attack3"); // New key of "Attack 3"

    if(vAniID == openborconstant("ANI_JUMP") || vAniID == openborconstant("ANI_FORWARDJUMP")){
      if(iJump){
        if(iDir == 1 && y <= checkwall(x+15,z)){
          changeentityproperty(vSelf, "direction", 0);
          tossentity(vSelf, 3, -1, 0); // Wall Bounce
        } else if(iDir == 0 && y <= checkwall(x-15,z)){
          changeentityproperty(vSelf, "direction", 1);
          tossentity(vSelf, 3, 1, 0); // Wall Bounce
        } else if(iDir == 0 && x <= XPos+10){
          changeentityproperty(vSelf, "direction", 1);
          tossentity(vSelf, 3, 1, 0); // Edge Bounce
        } else if(iDir == 1 && x >= XPos+Screen-10){
          changeentityproperty(vSelf, "direction", 0);
          tossentity(vSelf, 3, -1, 0); // Edge Bounce
        }
      }
    }
}

I have inserted FORWARDJUMP in it
 
Since I'm not yet done with the wall jump code (wall only)
I'm only using this one for the moment.
I'm still encountering strange problems.

In every place, levels with or without walls, close or not close from a wall:

Vertical jump = Rachel flips horizontally to do her vertical jump back turned.
Jump forward = seems to be OK
Run jump = Rachel flips horizontally and runjumps in the other way

Seems like for some reason "Vertical" and "Run" wall jumps are done even if there is not wall around. :-\

This is how is the script now.
Slightly edited with the run jump custom elements.

Code:
void main()
{
    int iPlIndex = getlocalvar("player"); //Get calling player
    void vSelf = getplayerproperty(iPlIndex , "entity"); //Get calling entity
    void vAniID = getentityproperty(vSelf,"animationID"); //Get current animation ID
    void vAniPos = getentityproperty(vSelf, "animpos"); //Get current animation frame
    int iDir = getentityproperty(vSelf, "direction");  //Get current facing direction
    int x = getentityproperty(vSelf, "x");
    int y = getentityproperty(vSelf, "a");
    int z = getentityproperty(vSelf, "z");

    void iUp = playerkeys(iPlIndex, 1, "moveup"); // New key status of "Up"
    void iDown = playerkeys(iPlIndex, 1, "movedown"); // New key status of "Down"
    void iLeft = playerkeys(iPlIndex, 1, "moveleft"); // New key status of "Left"
    void iRight = playerkeys(iPlIndex, 1, "moveright"); // New key status of "Right"
    void iJump = playerkeys(iPlIndex, 1, "jump"); //New key status of "Jump"
    void iSpecial = playerkeys(iPlIndex, 1, "Special"); //New key status of "Special"
    void iAttack = playerkeys(iPlIndex, 1, "attack"); //New key status of "Attack"
    void iAttack2 = playerkeys(iPlIndex, 1, "attack2"); // New key of "Attack 2"
    void iAttack3 = playerkeys(iPlIndex, 1, "attack3"); // New key of "Attack 3"

    if(vAniID == openborconstant("ANI_JUMP") || openborconstant("ANI_FORWARDJUMP")){ 
     if(iJump && iDir == 1 && y <= checkwall(x+15,z)){
        changeentityproperty(vSelf, "direction", 0);
        tossentity(vSelf, 3, -1, 0); // Wall Jump
      } else if(iJump && iDir == 0 && y <= checkwall(x-15,z)){
        changeentityproperty(vSelf, "direction", 1);
        tossentity(vSelf, 3, 1, 0); // Wall Jump
      }
    }

    if(openborconstant("ANI_RUNJUMP")){ 
     if(iJump && iDir == 1 && y <= checkwall(x+15,z)){
        changeentityproperty(vSelf, "direction", 0);
        tossentity(vSelf, 3, -2, 0); // Wall Jump
      } else if(iJump && iDir == 0 && y <= checkwall(x-15,z)){
        changeentityproperty(vSelf, "direction", 1);
        tossentity(vSelf, 3, 2, 0); // Wall Jump
      }
    }
}

Any idea, what can be the cause of these errors?
Thanks

EDIT---------------
As a test I tried to allow only 1 type of jump and it works.
Exemple with wall jump only from "forward jump"

Code:
void main()
{
    int iPlIndex = getlocalvar("player"); //Get calling player
    void vSelf = getplayerproperty(iPlIndex , "entity"); //Get calling entity
    void vAniID = getentityproperty(vSelf,"animationID"); //Get current animation ID
    void vAniPos = getentityproperty(vSelf, "animpos"); //Get current animation frame
    int iDir = getentityproperty(vSelf, "direction");  //Get current facing direction
    int x = getentityproperty(vSelf, "x");
    int y = getentityproperty(vSelf, "a");
    int z = getentityproperty(vSelf, "z");

    void iUp = playerkeys(iPlIndex, 1, "moveup"); // New key status of "Up"
    void iDown = playerkeys(iPlIndex, 1, "movedown"); // New key status of "Down"
    void iLeft = playerkeys(iPlIndex, 1, "moveleft"); // New key status of "Left"
    void iRight = playerkeys(iPlIndex, 1, "moveright"); // New key status of "Right"
    void iJump = playerkeys(iPlIndex, 1, "jump"); //New key status of "Jump"
    void iSpecial = playerkeys(iPlIndex, 1, "Special"); //New key status of "Special"
    void iAttack = playerkeys(iPlIndex, 1, "attack"); //New key status of "Attack"
    void iAttack2 = playerkeys(iPlIndex, 1, "attack2"); // New key of "Attack 2"
    void iAttack3 = playerkeys(iPlIndex, 1, "attack3"); // New key of "Attack 3"

    if(vAniID == openborconstant("ANI_FORWARDJUMP")){ 
     if(iJump && iDir == 1 && y <= checkwall(x+15,z)){
        changeentityproperty(vSelf, "direction", 0);
        tossentity(vSelf, 3, -1, 0); // Wall Jump
      } else if(iJump && iDir == 0 && y <= checkwall(x-15,z)){
        changeentityproperty(vSelf, "direction", 1);
        tossentity(vSelf, 3, 1, 0); // Wall Jump
      }
    }

}

Looks like, it tilts when you give it more jump types. ????

EDIT2------------------------

Seems fixed now.
I separated all the jumps in differents "controllers" and it works!
I also edited the jump X Y values, but this is not the reason.
This is what I get now :

Code:
void main()
{
    int iPlIndex = getlocalvar("player"); //Get calling player
    void vSelf = getplayerproperty(iPlIndex , "entity"); //Get calling entity
    void vAniID = getentityproperty(vSelf,"animationID"); //Get current animation ID
    void vAniPos = getentityproperty(vSelf, "animpos"); //Get current animation frame
    int iDir = getentityproperty(vSelf, "direction");  //Get current facing direction
    int x = getentityproperty(vSelf, "x");
    int y = getentityproperty(vSelf, "a");
    int z = getentityproperty(vSelf, "z");

    void iUp = playerkeys(iPlIndex, 1, "moveup"); // New key status of "Up"
    void iDown = playerkeys(iPlIndex, 1, "movedown"); // New key status of "Down"
    void iLeft = playerkeys(iPlIndex, 1, "moveleft"); // New key status of "Left"
    void iRight = playerkeys(iPlIndex, 1, "moveright"); // New key status of "Right"
    void iJump = playerkeys(iPlIndex, 1, "jump"); //New key status of "Jump"
    void iSpecial = playerkeys(iPlIndex, 1, "Special"); //New key status of "Special"
    void iAttack = playerkeys(iPlIndex, 1, "attack"); //New key status of "Attack"
    void iAttack2 = playerkeys(iPlIndex, 1, "attack2"); // New key of "Attack 2"
    void iAttack3 = playerkeys(iPlIndex, 1, "attack3"); // New key of "Attack 3"

    if(vAniID == openborconstant("ANI_JUMP")){ 
     if(iJump && iDir == 1 && y <= checkwall(x+15,z)){
        changeentityproperty(vSelf, "direction", 0);
        tossentity(vSelf, 3.5, -1.5, 0); // Wall Jump
      } else if(iJump && iDir == 0 && y <= checkwall(x-15,z)){
        changeentityproperty(vSelf, "direction", 1);
        tossentity(vSelf, 3.5, 1.5, 0); // Wall Jump
      }
    }

    if(vAniID == openborconstant("ANI_FORWARDJUMP")){ 
     if(iJump && iDir == 1 && y <= checkwall(x+15,z)){
        changeentityproperty(vSelf, "direction", 0);
        tossentity(vSelf, 3.5, -1.9, 0); // Wall Jump
      } else if(iJump && iDir == 0 && y <= checkwall(x-15,z)){
        changeentityproperty(vSelf, "direction", 1);
        tossentity(vSelf, 3.5, 1.9, 0); // Wall Jump
      }
    }

    if(vAniID == openborconstant("ANI_RUNJUMP")){ 
     if(iJump && iDir == 1 && y <= checkwall(x+15,z)){
        changeentityproperty(vSelf, "direction", 0);
        tossentity(vSelf, 3.2, -2.5, 0); // Wall Jump
      } else if(iJump && iDir == 0 && y <= checkwall(x-15,z)){
        changeentityproperty(vSelf, "direction", 1);
        tossentity(vSelf, 3.2, 2.5, 0); // Wall Jump
      }
    }

}

NOW, I'll try the edge detect code. :)
 
I finally applied the wall AND edge script.
Again I edited your script to have different jump values depending on the type of jump.
It works really well.

Code:
void main()
{
    int iPlIndex = getlocalvar("player"); //Get calling player
    void vSelf = getplayerproperty(iPlIndex , "entity"); //Get calling entity
    void vAniID = getentityproperty(vSelf,"animationID"); //Get current animation ID
    void vAniPos = getentityproperty(vSelf, "animpos"); //Get current animation frame
    int iDir = getentityproperty(vSelf, "direction");  //Get current facing direction
    int x = getentityproperty(vSelf, "x");
    int y = getentityproperty(vSelf, "a");
    int z = getentityproperty(vSelf, "z");
    int XPos = openborvariant("xpos"); //Get screen edge's position
    int Screen = openborvariant("hResolution"); // Get screen width
   
    void iUp = playerkeys(iPlIndex, 1, "moveup"); // New key status of "Up"
    void iDown = playerkeys(iPlIndex, 1, "movedown"); // New key status of "Down"
    void iLeft = playerkeys(iPlIndex, 1, "moveleft"); // New key status of "Left"
    void iRight = playerkeys(iPlIndex, 1, "moveright"); // New key status of "Right"
    void iJump = playerkeys(iPlIndex, 1, "jump"); //New key status of "Jump"
    void iSpecial = playerkeys(iPlIndex, 1, "Special"); //New key status of "Special"
    void iAttack = playerkeys(iPlIndex, 1, "attack"); //New key status of "Attack"
    void iAttack2 = playerkeys(iPlIndex, 1, "attack2"); // New key of "Attack 2"
    void iAttack3 = playerkeys(iPlIndex, 1, "attack3"); // New key of "Attack 3"

    if(vAniID == openborconstant("ANI_JUMP")){
      if(iJump){
        if(iDir == 1 && y <= checkwall(x+15,z)){
          changeentityproperty(vSelf, "direction", 0);
          tossentity(vSelf, 3.4, -1.5, 0); // Wall Bounce
        } else if(iDir == 0 && y <= checkwall(x-15,z)){
          changeentityproperty(vSelf, "direction", 1);
          tossentity(vSelf, 3.4, 1.5, 0); // Wall Bounce
        } else if(iDir == 0 && x <= XPos+10){
          changeentityproperty(vSelf, "direction", 1);
          tossentity(vSelf, 3.4, 1.5, 0); // Edge Bounce
        } else if(iDir == 1 && x >= XPos+Screen-10){
          changeentityproperty(vSelf, "direction", 0);
          tossentity(vSelf, 3.4, -1.5, 0); // Edge Bounce
        }
      }
    }

    if(vAniID == openborconstant("ANI_FORWARDJUMP")){
      if(iJump){
        if(iDir == 1 && y <= checkwall(x+15,z)){
          changeentityproperty(vSelf, "direction", 0);
          tossentity(vSelf, 3.4, -1.9, 0); // Wall Bounce
        } else if(iDir == 0 && y <= checkwall(x-15,z)){
          changeentityproperty(vSelf, "direction", 1);
          tossentity(vSelf, 3.4, 1.9, 0); // Wall Bounce
        } else if(iDir == 0 && x <= XPos+10){
          changeentityproperty(vSelf, "direction", 1);
          tossentity(vSelf, 3.4, 1.9, 0); // Edge Bounce
        } else if(iDir == 1 && x >= XPos+Screen-10){
          changeentityproperty(vSelf, "direction", 0);
          tossentity(vSelf, 3.4, -1.9, 0); // Edge Bounce
        }
      }
    }

    if(vAniID == openborconstant("ANI_RUNJUMP")){
      if(iJump){
        if(iDir == 1 && y <= checkwall(x+15,z)){
          changeentityproperty(vSelf, "direction", 0);
          tossentity(vSelf, 3.2, -2.5, 0); // Wall Bounce
        } else if(iDir == 0 && y <= checkwall(x-15,z)){
          changeentityproperty(vSelf, "direction", 1);
          tossentity(vSelf, 3.2, 2.5, 0); // Wall Bounce
        } else if(iDir == 0 && x <= XPos+10){
          changeentityproperty(vSelf, "direction", 1);
          tossentity(vSelf, 3.2, 2.5, 0); // Edge Bounce
        } else if(iDir == 1 && x >= XPos+Screen-10){
          changeentityproperty(vSelf, "direction", 0);
          tossentity(vSelf, 3.2, -2.5, 0); // Edge Bounce
        }
      }
    }
}

Now, the idea is to find a way to make wall jumps possible on big obstacles like street phone cab.
i64qcvY.png


After looking at my phone obstacle code
Code:
name	phone
type    obstacle
shadow  0
gfxshadow  0#1#-----no shadow!!
health  30#20
diesound  data/sounds/glass.wav
nolife  1
#flash   obfla
noatflash 1
offscreenkill  2000
candamage  obstacle npc enemy#player(ses debris ne touchent pas un player)
#flip 1

anim idle
	loop	0
	delay	5
	offset	100 163#164
	bbox   60 18 80 147
      platform   50 169 0 0 95 95 12 140
	frame	data/chars/misc/phone1.gif
	
anim fall
	loop	0
	delay	7#5
	offset	100 163#164
	hitfx   data/sounds/indirectobsta.wav#indirect.wav
	attack	60 18 80 147 5 1 1 0 6 30#20#(ses debris touchent)
	frame	data/chars/misc/phone2.gif
	frame	data/chars/misc/phone3.gif

I can see the height (140) could be used in script to determine if a jump is possible on it. But how?
 
Strange, I saved this script and called it as keyscript but it doesn't works. It doesn't trigger the wall

keyscript data/scripts/walljump.c

Code:
void main()
{
    int iPlIndex = getlocalvar("player"); //Get calling player
    void vSelf = getplayerproperty(iPlIndex , "entity"); //Get calling entity
    void vAniID = getentityproperty(vSelf,"animationID"); //Get current animation ID
    void vAniPos = getentityproperty(vSelf, "animpos"); //Get current animation frame
    int iDir = getentityproperty(vSelf, "direction");  //Get current facing direction
    int x = getentityproperty(vSelf, "x");
    int y = getentityproperty(vSelf, "a");
    int z = getentityproperty(vSelf, "z");
    int XPos = openborvariant("xpos"); //Get screen edge's position
    int Screen = openborvariant("hResolution"); // Get screen width
    
    void iUp = playerkeys(iPlIndex, 1, "moveup"); // New key status of "Up"
    void iDown = playerkeys(iPlIndex, 1, "movedown"); // New key status of "Down"
    void iLeft = playerkeys(iPlIndex, 1, "moveleft"); // New key status of "Left"
    void iRight = playerkeys(iPlIndex, 1, "moveright"); // New key status of "Right"
    void iJump = playerkeys(iPlIndex, 1, "jump"); //New key status of "Jump"
    void iSpecial = playerkeys(iPlIndex, 1, "Special"); //New key status of "Special"
    void iAttack = playerkeys(iPlIndex, 1, "attack"); //New key status of "Attack"
    void iAttack2 = playerkeys(iPlIndex, 1, "attack2"); // New key of "Attack 2"
    void iAttack3 = playerkeys(iPlIndex, 1, "attack3"); // New key of "Attack 3"

    if(vAniID == openborconstant("ANI_JUMP") || vAniID == openborconstant("ANI_FORWARDJUMP")){ 
      if(iJump){
        if(iDir == 1 && y <= checkwall(x+15,z)){
          changeentityproperty(vSelf, "direction", 0);
          tossentity(vSelf, 3, -1, 0); // Wall Bounce
        } else if(iDir == 0 && y <= checkwall(x-15,z)){
          changeentityproperty(vSelf, "direction", 1);
          tossentity(vSelf, 3, 1, 0); // Wall Bounce
        } else if(iDir == 0 && x <= XPos+10){
          changeentityproperty(vSelf, "direction", 1);
          tossentity(vSelf, 3, 1, 0); // Edge Bounce
        } else if(iDir == 1 && x >= XPos+Screen-10){
          changeentityproperty(vSelf, "direction", 0);
          tossentity(vSelf, 3, -1, 0); // Edge Bounce
        }
      }
    }
}
 
i use a different wall jump on my projects, i got from volcanic, he use it on blaze on bare knuckle VI if i remember right, it detect walls and screen borders

check on fantastic four demo on spiderman it uses follow3 animation and call it on jump animation, i dont remember right but i change some things to work for my resolution from the original are from bare knucle VI, or vacuum or bare knucle Z i forgot eheheh

[attachment deleted by admin]
 
Back
Top Bottom