You are not logged in.
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 : 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
Offline
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
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
Offline
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
Ur, yeah, sorry about that.
I got busted. I never actually tested the whole thing.
Offline
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
Offline
Yeah, remove thier inventory when you spawn them. ^_^
Iritscen:
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours
Offline
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
Offline
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
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
Offline
Oh, right. Yeah, I forgot.
Iritscen:
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours
Offline
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
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.
Offline
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
Offline
You could also try killing them and then reviving them.
Iritscen:
Iritscen: it's amazing this program even works
Gumby: i know
Iritscen: and that statement applies to my code, not just yours
Offline
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!
(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
Offline
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
Completed it without cheat. Is fun. I don't like konoko new move so I commented it (#).
[b.Kerr]: I'm die...
Try change it too
[b.Kerr]: I'm feeling the dead...
or something.
it remembers me my first scripts. Keep the good work.
Offline
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
Offline
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 7010ai2_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