Get in a plateform/wall (using script)

NED

Well-known member
Hello,
As some of you know, my project will have  "game systems"
1- "regular beat'em up type" with some custom stuffs.
2- "Kind of wrestling type" with really few of the features you can see in 2D wrestling games.

For the type2, I have a regular stage with a wrestling ring. I'm still coding it to have the best feeling, then I'll swap with some graphic variation, but using the same code.

For the moment, the ring is using this wall code:
Code:
wall 299 584 90 -20 758 858 160 67

and I would like to make the "get in the ring" movement possible without jumping.
I tried different stuffs in the past, but nothing can make it right for themoment.

At the moment, my idea is to use 4 variations of ladder climb script.
for each direction UP, DOWN, LEFT, RIGHT.

But I don't know how to edit the ladder script to have something working.

Any help is welcome.
Thanks

BTW : I have some display layer problems on the ring sprite, but I givent up on it, since there is absolutly no solution to fix it. And I'm not a professionnal, so I don't have to make a perfect looking game.
 
Bloodbane said:
Hmm... your running animation has 8 frames so if you want to loop from 4th frame(3), it should be: loop 1 3 11

11 = 3 + 8

Strange, because this don't make sense at all. If you have only 8 frames, the ending loop should be the last frame (7) and not an inexistent index. Like LOOP 1 3 7.
This is something I spotted some time ago: LOOP doesn't check if the endloop is a existent index and will loop the last frame anyway.
 
I have to admit I still don't understand this number logic.

As a reminder my animation have 16 frames (2 X 8)
3 first frames are played 1 time only

BTW : I'm still looking for a way to force landing in the startting frame of the follow anim.
(Without using landframe)
 
O Ilusionista said:
Strange, because this don't make sense at all.

I had same feeling years ago but when I discovered that my projectile didn't loop properly i.e missing a frame, I made some trial n error to fix it and I figured out that, I need to add 1 to loop setting as shown in my calculation above

nedflandeurse said:
I'm still looking for a way to force landing in the startting frame of the follow anim.

Do you want a scripted forced land? I could add a line to drop player to ground before changing animation
 
I had same feeling years ago but when I discovered that my projectile didn't loop properly i.e missing a frame, I made some trial n error to fix it and I figured out that, I need to add 1 to loop setting as shown in my calculation above

Yeah, same here. If you want to make a loop from frame 1 to frame 7 (using openborstats), you need to set the end loop to 7 and not 6 as it would be. Just add 1 at the frame number and you are done.
 
So BB's setting is OK, right?

@Bloodbane
As I'm thingking to the force-land stuff in "getring" script.
Perhaps it can be combined/inculde some velocity stopper as well to avoid moving more during follow anim?
 
So BB's setting is OK, right?
It works, for sure. It its right is another question :)

maxman said:
You need velo001 animation script. You can put the values to all 0 for an entity to stop moving at all.

Yeah, I strongly suggest to use velo001 or dasher function with 0 as all values and not stop function. Because the later nullify all character velocities, including walking speed.
 
Sorry for the late reply, here's the updated script:
getring.c
Code:
void main()
{// Script for being blocked by wall
    void self = getlocalvar("self");
    int x = getentityproperty(self, "x");
    int y = getentityproperty(self, "a");
    int z = getentityproperty(self, "z");
    float Vy = getentityproperty(self,"tossv");
    int Direction = getentityproperty(self, "direction");
    void vAniID = getentityproperty(self,"animationID");
    void vAniPos = getentityproperty(self, "animpos");
    int dx = 5;

    if(Direction == 0){ //Is entity facing left?        
      dx = -dx; //Reverse Dist to match facing
    }

    if(vAniID == openborconstant("ANI_ATTACKUP") && checkwall(x,z-5)<=70){
      changeentityproperty(self, "position", NULL(), NULL(), 0); // instantly drops character to ground
      performattack(self, openborconstant("ANI_FOLLOW1"));
    } else if(vAniID == openborconstant("ANI_ATTACKDOWN") && checkwall(x,z+5)<=70){
      changeentityproperty(self, "position", NULL(), NULL(), 0); // instantly drops character to ground
      performattack(self, openborconstant("ANI_FOLLOW2"));
    } else if(vAniID == openborconstant("ANI_RUN") && vAniPos < 2 && checkwall(x+dx,z)>y && checkwall(x+dx,z)<=70){
      performattack(self, openborconstant("ANI_FOLLOW3"));
    }
}

I added line to instantly drops character to ground
Try this and tell me if this works :)
 
Back
Top Bottom