Time and pushing the keys

Topics regarding Scripting with Reality Factory
User avatar
Graywolf
Posts: 75
Joined: Mon Apr 14, 2008 8:36 pm
Location: Anchorage, Alaska
Contact:

Re: Time and pushing the keys

Post by Graywolf »

I did a test run on your Combo order... It worked, so the problem lies elsewhere.

Also, you can simply use (self.animate_at_end), and get the same effect as (self.animate_at_end = true). (In fact, you don't even have to use "self.")

BSOD crashes can be a real pain in the @#$ to figure out... Did you "return" after setting think="Combo"?
"So, what's the life of a programmer like?" "...Huh? What life?!"

RF System X:
http://www.realityfactory.info/forum/vi ... f=9&t=3599
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: Time and pushing the keys

Post by Danimita92 »

I did, and it still crashes
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: Time and pushing the keys

Post by Danimita92 »

GrayWolf. If yours works, could you compare it to my script?:

Code: Select all

REMOVED
Last edited by Danimita92 on Sat Aug 02, 2008 2:17 pm, edited 1 time in total.
User avatar
Graywolf
Posts: 75
Joined: Mon Apr 14, 2008 8:36 pm
Location: Anchorage, Alaska
Contact:

Re: Time and pushing the keys

Post by Graywolf »

It worked for me, no problem. So, at this point, I have no clue.
"So, what's the life of a programmer like?" "...Huh? What life?!"

RF System X:
http://www.realityfactory.info/forum/vi ... f=9&t=3599
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: Time and pushing the keys

Post by Danimita92 »

Typical. Okay so I'll have to reinstall Reality Factory. Every certain time I have to do this. Somehow, certain commands stop working or sometimes whole scripts. I'll try using it in a new map. If it still doesn't work, I'll reinstall it yet again.
User avatar
Graywolf
Posts: 75
Joined: Mon Apr 14, 2008 8:36 pm
Location: Anchorage, Alaska
Contact:

Re: Time and pushing the keys

Post by Graywolf »

I use multiple, stripped installations. Basically, I make a copy of a fresh installation, without all the demo stuff. I then use that copy to setup a new system, or reinstall a previous one. Saves disk space and headaches.
"So, what's the life of a programmer like?" "...Huh? What life?!"

RF System X:
http://www.realityfactory.info/forum/vi ... f=9&t=3599
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: Time and pushing the keys

Post by Danimita92 »

Problem is if I make a really cool map and suddenly that happens
User avatar
Graywolf
Posts: 75
Joined: Mon Apr 14, 2008 8:36 pm
Location: Anchorage, Alaska
Contact:

Re: Time and pushing the keys

Post by Graywolf »

What I mean is, I use different installs for each project. The stripped copy just installs the necessary defaults, similar to a repair function. That way, I can keep my resources in place, and my disk space doesn't get devoured by countless copies of demos and default media.
"So, what's the life of a programmer like?" "...Huh? What life?!"

RF System X:
http://www.realityfactory.info/forum/vi ... f=9&t=3599
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: Time and pushing the keys

Post by Danimita92 »

Okay, I think I know how I'm doing this. But right now something unexpected (how strange) is happening (yet again). I added a variable ('cause they are called variables, right? the things you put at the very beginning of the script?) called APRETADO (PRESSED) now if the player's doing an animation from the combo (because I set it so that if it were in the idle animation ANC = 0, and that if ANC = 0 do not wait until it ends) and the player hits the attack button, APRETADO = 1. Now if the player is still hitting the attack button, the combo'll continue. And if APRETADO = 1, it means that he has already hit the attack button, therefore when the current attack animation is complete, it'll do the next. But what happens is that the first attack animation is done and then it stops at the end of the animation, and appears in the RunPlayer order :? ignoring the rest of the order:

Code: Select all

Combo[()
{
    self.ThinkTime=4;
    if(IsKeyDown(K_FIRE) or APRETADO = 1)
    {
    APRETADO = 1;
    if(animate_at_end or ANC = 0)
    {
        ANC=10;
        switch(COMBO)
        {
            case 0
            {
            APRETADO = 0;
            FireProjectileBlind("10mm_shell", "Hand_R", 0, 10, 20, "health");
            AnimateBlend("Walk", 1);
            COMBO=1;
            return 0;
            }
            case 1
            {
                APRETADO = 0;
            FireProjectileBlind("10mm_shell", "Hand_R", 0, 10, 20, "health");
            AnimateBlend("Run", 1);
            COMBO=2;
            return 0;
            }
            case 2
            {
                APRETADO = 0;
            FireProjectileBlind("10mm_shell", "Hand_R", 0, 10, 20, "health");
            AnimateBlend("Jump", 1);
            COMBO=0;
            return 0;
            }
        }
    }
    }
    if(not IsKeyDown(K_FIRE) and APRETADO = 0)
    {
        if(self.animate_at_end)
        {
            COMBO=0;
            self.think="RunPlayer";
            return 0;
        }
    }
}]
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: Time and pushing the keys

Post by Danimita92 »

anybody?
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: Time and pushing the keys

Post by Danimita92 »

Sorry for the triple post :roll:
But I really need to know why it'll freeze on the animation and won't work
Post Reply