Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 08/09/08 05:08

love_Oni
Member
From: Da Nang, Vietnam
Registered: 05/10/08

A question about a tutorial in Oni's wiki

I have read a tutorial to make simple scripts in Oni's wiki: http://wiki.oni2.net/BSL:Tutorial/Scratch. There is a script likes this (It's placed in the end of the Part 6: Customization):

func void main(void) {
    chr_teleport 0 7010

    ai2_spawn Top_Striker_1
    chr_teleport Top_Striker_1 7008
    chr_givepowerup Top_Striker_1 ammo 15
    chr_givepowerup Top_Striker_1 invis -1
    chr_giveweapon Top_Striker_1 w7_scc

    ai2_spawn Top_Comguy_1
    chr_teleport Top_Comguy_1 7009
    chr_givepowerup Top_Comguy_1 cell 30
    chr_givepowerup Top_Comguy_1 invis -1
    chr_giveweapon Top_Comguy_1 w3_phr

    ai2_spawn OutroTCTF01
    chr_teleport OutroTCTF01 7007

    ai2_spawn WH_Thug_A
    chr_teleport WH_Thug_A 7007
    chr_changeteam WH_Thug_A TCTF

    ai2_spawn griffin
    chr_teleport griffin 7008
    chr_set_health griffin 3900
    chr_changeteam griffin Syndicate

    powerup_spawn hypo 7010
    powerup_spawn ammo 7008
    powerup_spawn invis 7007
    powerup_spawn invis 7009
    weapon_spawn w2_sap 7045   
}

(I changed the order of the functions so you can understand the whole script easier)

You can put the file "tutorial.bsl" in the folder EnvWareHouse and have a try.

The funny thing is smile: The TCTF Agent and thug didn't attack anyone; Griffin's team attacked me and thug, not attack the TCTF Agent and I can only attack Griffin but not the TCTF Agent and thug. (=> confused @_@)

I think there must be somethings wrong in the "chr_changeteam" functions. Do you have any ideas?

Last edited by love_Oni (08/09/08 11:08)


The Boy Who Knew Too Much tongue

Offline

#2 08/09/08 08:08

paradox-01
Member
From: Germany
Registered: 01/14/07

Re: A question about a tutorial in Oni's wiki

I think that's the different between "Neutral" and "Switzerland": team of "Switzerland" doesn't attack at all and TCTF_lite_1 has this flag.

Offline

#3 08/09/08 08:08

love_Oni
Member
From: Da Nang, Vietnam
Registered: 05/10/08

Re: A question about a tutorial in Oni's wiki

So I should change the TCTF Agent's team into other team, right?

How about the thug? He's in "TCTF" team and he didn't attack anyone, even I have seen Griffin attacked him but he didn't resist.


The Boy Who Knew Too Much tongue

Offline

#4 08/09/08 10:08

paradox-01
Member
From: Germany
Registered: 01/14/07

Re: A question about a tutorial in Oni's wiki

Yea. And about that thug: I don't know why but he needs "ai2_dopath WH_Thug_A WH_Thug_A" to become active. (used in original script)

Offline

#5 08/09/08 12:08

Your_Mom
Member
From: Canada
Registered: 01/31/07
Website

Re: A question about a tutorial in Oni's wiki

Ur, yeah, sorry about that.
I got busted. I never actually tested the whole thing. tongue


droid803sig.jpg

Offline

#6 08/09/08 23:08

love_Oni
Member
From: Da Nang, Vietnam
Registered: 05/10/08

Re: A question about a tutorial in Oni's wiki

The script was fixed. I changed the TCTF Agent's and thug's flag to "Konoko" team, and added some new modify here. Have a try!

I still need to improve the script. Some characters drop hypos when they die, but I don't want the powerups to be dropped. Can you help me?

Last edited by love_Oni (08/09/08 23:08)


The Boy Who Knew Too Much tongue

Offline

#7 08/09/08 23:08

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

Re: A question about a tutorial in Oni's wiki

Yeah, remove thier inventory when you spawn them. ^_^


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

#8 08/10/08 04:08

love_Oni
Member
From: Da Nang, Vietnam
Registered: 05/10/08

Re: A question about a tutorial in Oni's wiki

You mean I should use the function "chr_inv_reset [ai_name]"? I tried to add the function "chr_inv_reset Top_Comguy_1", and one of 2 strikers still dropped a hypo.

I don't know why but in these scripts (it's in the attachment, I don't remember who made those scripts), the maker has prevented many characters from dropping their hypos. Maybe you can take a look.

How about making a character drop his powerup(s) after he's die, and what is the function "ai2_setjobstate" used for?

Last edited by love_Oni (08/10/08 04:08)


The Boy Who Knew Too Much tongue

Offline

#9 08/10/08 06:08

paradox-01
Member
From: Germany
Registered: 01/14/07

Re: A question about a tutorial in Oni's wiki

chr_inv_reset doesn't appear to have an effect on drop items. You might want to edit their settings in xml (BINACJBOCharacter) or to use other characters.

Not sure what ai2_setjobstate means.

Last edited by paradox-01 (08/10/08 06:08)

Offline

#10 08/10/08 10:08

love_Oni
Member
From: Da Nang, Vietnam
Registered: 05/10/08

Re: A question about a tutorial in Oni's wiki

Can you tell me more clearly how to edit characters' setting? I'm not very good at the modify working. (There is only one striker in the list which didn't drop hypos, you know)

I have improved the script. There are some features in this time: Griffin and Kerr become better in combat now. Please have a try and tell me if their new combos are good enough to be add in the "Melee Profiles" in the edition. (hm... I'm not good at this thing, again)

Last edited by love_Oni (08/10/08 10:08)


The Boy Who Knew Too Much tongue

Offline

#11 08/10/08 11:08

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

Re: A question about a tutorial in Oni's wiki

Oh, right. Yeah, I forgot.


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

#12 08/10/08 12:08

paradox-01
Member
From: Germany
Registered: 01/14/07

Re: A question about a tutorial in Oni's wiki

The easiest way is to shapeshift the characters with an empty inventory since you are on Windows. (The shapeshifted character has still the same name.)

    ai2_spawn A_t47
    ai2_spawn A_t50
    chr_teleport A_t47 7008
    chr_teleport A_t50 7009
    chr_set_class 1 striker_easy_1
    chr_set_class 2 striker_easy_2
    chr_giveweapon A_t47 w3_phr
    chr_giveweapon A_t50 w7_scc

Do you still want to edit the inventories?

ps: Going to test your new script tomorrow.

Last edited by paradox-01 (08/10/08 12:08)

Offline

#13 08/10/08 15:08

Your_Mom
Member
From: Canada
Registered: 01/31/07
Website

Re: A question about a tutorial in Oni's wiki

It's a wiki for a reason.
Feel free to fix the errors yourself ('cause I'm too lazy to).
make sure it still flows, though.


droid803sig.jpg

Offline

#14 08/10/08 21:08

love_Oni
Member
From: Da Nang, Vietnam
Registered: 05/10/08

Re: A question about a tutorial in Oni's wiki

paradox-01 wrote:

The easiest way is to shapeshift the characters with an empty inventory since you are on Windows. (The shapeshifted character has still the same name.)

    ai2_spawn A_t47
    ai2_spawn A_t50
    chr_teleport A_t47 7008
    chr_teleport A_t50 7009
    chr_set_class 1 striker_easy_1
    chr_set_class 2 striker_easy_2
    chr_giveweapon A_t47 w3_phr
    chr_giveweapon A_t50 w7_scc

You're right, I'll try that.

Do you still want to edit the inventories?

Hm... Not yet.

Although there are quite many hypos in the script, I think I'll make the script a little bit harder, so it would be a good balance.


The Boy Who Knew Too Much tongue

Offline

#15 08/10/08 22:08

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

Re: A question about a tutorial in Oni's wiki

You could also try killing them and then reviving them. smile


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

#16 08/11/08 03:08

love_Oni
Member
From: Da Nang, Vietnam
Registered: 05/10/08

Re: A question about a tutorial in Oni's wiki

Improved the script again. This time, I added the 'win' and 'lose' effect and... also added Konoko's new combo! In game, press "punch" two times to use Konoko's new combo. This combo will look very nice if you attack an armed opponent, especially an rifle-armed opponent. If you don't want to spam the new combo too much, open the .bsl file, locate to the line "func konoko" near the end of the file, and delete the character "#". Have fun! big_smile

(this script will have more toughness if you play it in the edition)

Last edited by love_Oni (08/11/08 06:08)


The Boy Who Knew Too Much tongue

Offline

#17 08/11/08 11:08

paradox-01
Member
From: Germany
Registered: 01/14/07

Re: A question about a tutorial in Oni's wiki

Konoko's disarm combo was something fresh. But in general I don't like auto-combos, sorry. About Griffin's and Kerr's combo: the combos might do more damage but they can't cancel it, so when you evade you can backbreak them. (Not that I do... I've already problem to stay alive to reach the training bot. Griffin's 3900 health points are a bit sick, IMO.)

Offline

#18 08/11/08 14:08

s10k
Member
Registered: 01/14/07
Website

Re: A question about a tutorial in Oni's wiki

Completed it without cheat. Is fun. I don't like konoko new move so I commented it (#).

[b.Kerr]: I'm die... sad

Try change it too

[b.Kerr]: I'm feeling the dead... sad

or something.

it remembers me my first scripts. Keep the good work.

Offline

#19 08/12/08 10:08

love_Oni
Member
From: Da Nang, Vietnam
Registered: 05/10/08

Re: A question about a tutorial in Oni's wiki

Thanks for the advices. I'll use them in the future.

I still have a problem want to solve.

func void main(void) {
chr_teleport 0 7010

ai2_spawn kerr
chr_teleport kerr 7010
chr_changeteam kerr Syndicate
fork kerr
}

func kerr {
chr_wait_animation kerr COMCOMcomb_p_p
sleep 12
chr_unstoppable kerr 1
chr_animate kerr COMCOMcomb_p_p_p
sleep 18
chr_animate kerr STRCOMkick_low
sleep 30
chr_animate kerr COMCOMkick_fw
sleep 26
chr_animate kerr COMCOMpunch_heavy
chr_unstoppable kerr 0
fork kerr
}

In the function "kerr", I typed the line "chr_wait_animation...", so that means Kerr only performs the new combo if he performed the 'punch-punch' move. But when I put the script in and load level 0, I saw he performed the new combo from the beginning of the game, not after a 'punch-punch' move as I thought, and I still don't want it. Do you have any idea how to fix it?


The Boy Who Knew Too Much tongue

Offline

#20 08/12/08 12:08

paradox-01
Member
From: Germany
Registered: 01/14/07

Re: A question about a tutorial in Oni's wiki

I had recently to solve a similar problem.
Well, actually, it's the same: It doesn't mater if a combo or a single attack overwrite troubles us. Tandir and I faced it in our first self-made script one and a half year ago. I don't remember that we were able to fix it.

But today .. you know, time makes you a bit wiser. chr_wait_animation is ignored as soon as the character goes inactive. (For example when you turn you back on them or when they are too far away.)

func void main(void) {
chr_teleport 0 7010

ai2_spawn kerr
chr_teleport kerr 7010
chr_changeteam kerr Syndicate
chr_lock_active kerr
fork kerr
}

func kerr {
chr_wait_animation kerr COMCOMcomb_p_p
### dmsg "Kerr ties to fight before spawn and after death. Right?"
sleep 12
chr_unstoppable kerr 1
chr_animate kerr COMCOMcomb_p_p_p
sleep 18
chr_animate kerr STRCOMkick_low
sleep 30
chr_animate kerr COMCOMkick_fw
sleep 26
chr_animate kerr COMCOMpunch_heavy
chr_unstoppable kerr 0
fork kerr
}

On a side note:The function will be executed even if Kerr might be dead since 10 minutes. It can be fixed as well - but it isn't a critical bug.

Last edited by paradox-01 (08/12/08 15:08)

Offline

Board footer

Powered by FluxBB