Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 28/7/11 1:23

Lukas Kreator
Member
Registered: 7/5/10

Barabbas Regeneration

Just something I made in free time...

Well, I found a way to use the chr_wait_animation and chr_wait_health commands in a inverse way, and decided to test it. Sorry if someone has already done this... And I know I could have made it better using the Daodan 3.0, but it is more strategic this way.

var bool regening;
var bool can_regen;
var bool full_health;

var int hp;

func barab_main()
{
    chr_set_class(0, "barabus")

    regening = false
    can_regen = true
    full_health = true

    fork check_regen
    fork check_health
    fork regen
}

func regen()
{
    chr_wait_animation(0, "ELICOMpunch_heavy")
    if (can_regen eq true)
    {
        hp = 20
        dmsg("[g. Regeneration!]")
        chr_animate(0, "BARABpowerup_start")
        sleep(20)
        fork do_regen
        sleep(1200)
        dmsg("[g. Regeneration ready!]")
        can_regen = true
    }
    fork regen
}

func check_regen()
{
    regening = false
    chr_wait_animation(0, "BARABpowerup")
    regening = true
    sleep(10)
    fork check_regen
}

func check_health()
{
    full_health = true
    chr_wait_health(0, 199)
    full_health = false
    sleep(10)
    fork check_health
}

func do_regen
{
    chr_animate(0, "BARABpowerup")
    sleep(45)
    if (regening eq true)
    {
        if (full_health eq false)
        {
            hp = hp + 20
            chr_set_health(0, hp)

            fork do_regen
        }
    }
    if (full_health)
    {
        dmsg("[g. Full health!]")
    }
}

Just call "fork barab_main" from the main function of any level. I've been using the airport, btw.

Oh and don't worry, I'm also working on my tool wink

Last edited by Lukas Kreator (28/7/11 1:31)

Offline

#2 28/7/11 3:03

Mukade
Member
From: Ottawa, Ontario - Canada
Registered: 29/5/07

Re: Barabbas Regeneration

Would it be possible to bind it to a key? I know you Gumby made it so that you can firstly bind a key to "block" (which doesn't actually have a function really since block is automatic) and made it so that when you pressed "block", it made you shapeshift. Would you know how to do something like that, or is it even possible?


"He looks mean enough to tear my arm off and beat me to death with it. In fact, he looks mean enough to tear his OWN arm off and beat me to death with it."

Offline

#3 28/7/11 3:29

Lukas Kreator
Member
Registered: 7/5/10

Re: Barabbas Regeneration

Ah, you can bind this to any key using the Daodan 3.0.

You just have to change this line of the script:

chr_wait_animation(0, "ELICOMpunch_heavy")

To something like this:

d_waitforkeypress("q")

But I haven't tested much of the Daodan 3.0, so I'm not sure how you use that function.

Offline

#4 28/7/11 4:05

Samer
Member
From: Lebanon
Registered: 4/9/09
Website

Re: Barabbas Regeneration

can u tell us common folk who don't get bsl what it does ?


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Offline

#5 28/7/11 5:42

Mukade
Member
From: Ottawa, Ontario - Canada
Registered: 29/5/07

Re: Barabbas Regeneration

It's basically a way, that if you're using barabas, you can use his regeneration.

And sorry Lukas, I thought you had to type that in everytime you wanted to regenerate. I didn't completely go over the script, so I didn't see how it was executed. Either way, a keypress would still be better, would let you use your super punch.


"He looks mean enough to tear my arm off and beat me to death with it. In fact, he looks mean enough to tear his OWN arm off and beat me to death with it."

Offline

#6 28/7/11 5:52

Samer
Member
From: Lebanon
Registered: 4/9/09
Website

Re: Barabbas Regeneration

u can add make a new tram out of the regeneration animation example ELICOMbk_fw_kick .. u'll copy the tram of the barabas regeneration and copy the first part from konoko's willow kick, then in ur script i guess u'll put : 
chr_wait_animation(0, "ELICOMpunch_bk_fw_kick")  now when u want barabas to regenerate u perform the willow kick,

and u can make it into a package ^^


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Offline

#7 28/7/11 11:23

Yoriko
Member
From: Sweden, Gothenburg
Registered: 15/2/11

Re: Barabbas Regeneration

So, when can I expect that you do the same thing for Mukades devil star Lukas? big_smile


-I noticed that the hackers of oni community made a lot of modifications before they locked me up, do you have any idea what they want with an old game? -Modifications? What kind of modifications?
-Hard to tell, without getting a look at things but it looks like they're repurposing it. -Why?
-Beats me, all the game has is brutal melee combat and furious gunplay. -I dont like the sound of that.....

Offline

#8 28/7/11 11:52

Lukas Kreator
Member
Registered: 7/5/10

Re: Barabbas Regeneration

lol, unfortunately I don't know if that is doable, and I have to work on some other things. But maybe I try that in the future.

The theory is: give the death star to the player (chr_giveweapon), make him shoot (I don't know what command use), disarm the player (chr_disarm, but I'm not sure if it works).

Offline

#9 28/7/11 12:24

TOCS
Member
From: Denmark
Registered: 4/4/07

Re: Barabbas Regeneration

It would be cool to see a video featuring this, because I've no idea on how to use this. I'm much more used to Source/Quake Engine console commands.

Offline

#10 28/7/11 12:31

Lukas Kreator
Member
Registered: 7/5/10

Re: Barabbas Regeneration

Ah, just do the C+P with Barabas and he will start regenerating. The regeneration takes time to complete and you have to wait until it finishes or you are interrupted. When you start regenerating, you get very low health, and your health increases with time. After some seconds, when you have full health, the regeneration will stop. Beware, however: if you start the regeneration and someone knock you down in the first seconds, you will get very low health and most likely die.

I would make a video, but I'm currently on a kinda low-end computer.

Offline

#11 28/7/11 12:50

TOCS
Member
From: Denmark
Registered: 4/4/07

Re: Barabbas Regeneration

It sounds cool, but I don't know the procedure of installing custom scripts like that. In games like Quake and Counter-Strike you just create a .cfg file and 'exec' it during the game. It seems like you have to overwrite files, or am I just totally wrong?

EDIT: Anyway I got it working. It would be rather cool if you could make the script detect how much health you're already at, so it won't have to reset.

Last edited by TOCS (28/7/11 12:54)

Offline

#12 28/7/11 13:16

Samer
Member
From: Lebanon
Registered: 4/9/09
Website

Re: Barabbas Regeneration

how about my suggestion to use the willow kick ? that way u get to keep the heavy punch.


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Offline

#13 28/7/11 13:20

Yoriko
Member
From: Sweden, Gothenburg
Registered: 15/2/11

Re: Barabbas Regeneration

Would it be possible to link this to a new key combo? Like bk_bk_bk_punch


-I noticed that the hackers of oni community made a lot of modifications before they locked me up, do you have any idea what they want with an old game? -Modifications? What kind of modifications?
-Hard to tell, without getting a look at things but it looks like they're repurposing it. -Why?
-Beats me, all the game has is brutal melee combat and furious gunplay. -I dont like the sound of that.....

Offline

#14 28/7/11 13:22

Samer
Member
From: Lebanon
Registered: 4/9/09
Website

Re: Barabbas Regeneration

i don't think so.


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Offline

#15 28/7/11 13:37

TOCS
Member
From: Denmark
Registered: 4/4/07

Re: Barabbas Regeneration

If it could be used by the press of a button, didn't reset the animation every time you regenerate and could cater for your health, it would be awesome! smile

Offline

#16 28/7/11 13:40

Gumby
Member
From: Seattle, WA, USA
Registered: 30/8/07

Re: Barabbas Regeneration

If you are using the Daodan 3.0, just use d_regen *character* 1 when you want to enable regeneration. wink


Iritscen: roll
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours

Offline

#17 28/7/11 13:43

Samer
Member
From: Lebanon
Registered: 4/9/09
Website

Re: Barabbas Regeneration

gumby where do u get the daodon 3 from big_smile ? it doesn't come with the anniversary edition right ? cz the one i have in the details says version 1 :\


Join our Oni Facebook Group
Check My YouTube Channel for my Oni Videos.
Check My Wiki page for all my stuff

Offline

#18 28/7/11 13:50

TOCS
Member
From: Denmark
Registered: 4/4/07

Re: Barabbas Regeneration

Yeah, I'd like that too.

So basically you can just bind the d_regen to a key like 'b', and it'll work? Or is the function hard-coded into the .dll file?

Offline

#19 28/7/11 14:02

Lukas Kreator
Member
Registered: 7/5/10

Re: Barabbas Regeneration

I've tested it, but I find the d_regen regeneration too low.

And yes, you can bind it to any key or combo.

Give me just a moment and I'll make a Daodan 3.0 version...

Last edited by Lukas Kreator (28/7/11 14:08)

Offline

#20 28/7/11 14:13

TOCS
Member
From: Denmark
Registered: 4/4/07

Re: Barabbas Regeneration

But where did you even get the Daodan 3.0? yikes

Offline

#21 28/7/11 14:19

Lukas Kreator
Member
Registered: 7/5/10

Re: Barabbas Regeneration

At the Daodan 3.0 Beta thread.

When I use "d_waitforkey("x")" it simply fires without waiting for anything, and on the next call, it crashes.

Maybe the "keys" argument is an enum?

Last edited by Lukas Kreator (28/7/11 14:35)

Offline

#22 28/7/11 14:35

TOCS
Member
From: Denmark
Registered: 4/4/07

Re: Barabbas Regeneration

Thanks! But the d_regen doesn't really work. I select Barabas, work my self down to about 40 - 50 hp, type in "d_regen barabus 1" and it just tells me the parameter is enabled. Does it need a keypress to activate?

Offline

#23 28/7/11 14:37

Lukas Kreator
Member
Registered: 7/5/10

Re: Barabbas Regeneration

No no, try "d_regen 0 1", but keep in mind that you won't start doing the animation and particles, it will just make your health go up.

Offline

#24 28/7/11 14:40

TOCS
Member
From: Denmark
Registered: 4/4/07

Re: Barabbas Regeneration

Oh, I see it's similar to the 'elderrune' cheat. tongue I'd prefer your script any day then. smile

Offline

#25 28/7/11 14:46

Lukas Kreator
Member
Registered: 7/5/10

Re: Barabbas Regeneration

Oh, thanks, but I'm trying to adapt my script to the Daodan 3.0. If I can, we will be able to activate and deactivate the regeneration at will, through any key on the keyboard.

Offline

Board footer

Powered by FluxBB