Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 01/03/10 11:01

Tudorge
Member
From: Romania, Bucharest
Registered: 10/26/09
Website

Team switch. Scripting BSL help

I did some modifications to my favourite level of the OTA script, TCTF HQ.
The modifications we're just message-level and team-level (setting up teams chars and names). I didn't stay to mod the awareness. (modified arena_teams and arena_score.bsl)
My question is: Could someone think of a way to switch teams in-game? To activate a script function like chr_changeteam through a move? Or even a button?
Could you program in the script so that you get the result: Press (action button) to switch to opposite team ? It would really help for lots of other scripts.

Offline

#2 01/03/10 11:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Team switch. Scripting BSL help

Use chr_wait_animation.  You can look through the TRAM files in level0_Final to see the names of the animations.  So let's say you want to use the taunt animation as a trigger.  You see a TRAM file called TRAMKONCOMtaunt1.oni, so you say:

[blah blah setup code]
fork LookForSwitchKey
[blah blah more code]

func LookForSwitchKey
{
   chr_wait_animation 0 KONCOMtaunt1
   [code to cycle teams]
   fork LookForSwitchKey
}

There's also a 99% complete table on the wiki here that you can use to find any animation name without hunting through the GDF looking for TRAMs.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#3 01/03/10 11:01

Tudorge
Member
From: Romania, Bucharest
Registered: 10/26/09
Website

Re: Team switch. Scripting BSL help

I have never modified any of the level files. Can you email or pm me to show me the tool you all use to view oni files? I really want to learn to mod more.

Offline

#4 01/03/10 12:01

Iritscen
Moderator
From: NC, USA
Registered: 10/22/07

Re: Team switch. Scripting BSL help

You don't actually need to modify any of them, just look at their names. smile  If you have the AE installed, then look under Edition>GameDataFolder>level0_Animations to find the TRAM files.  Or use the wiki link in my last post, which may or may not be easier.

The AE also comes with OniSplit, which allows you to split the game data into .oni files at will.  There's a wiki page called "OniSplit" that documents most of what it can do.  But so far your idea won't require actual binary modding, just BSL.


Check out the Anniversary Edition Seven at ae.oni2.net!

Offline

#5 01/05/10 08:01

Tudorge
Member
From: Romania, Bucharest
Registered: 10/26/09
Website

Re: Team switch. Scripting BSL help

AE exports all the files from the .dat files?
I just started using OniUnpacker, and It's great because you can see the thins you want to mod.
Is it possible to move all animations for the tanker on Konoko? It would really be fun to play with big_smile.
And about the team arena, how can you make everyone, every single person in the game ignore you? And be invincible, and intangible. I'm trying a prototype of spectator mode.

Offline

#6 01/05/10 12:01

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Team switch. Scripting BSL help

Tudorge: Here is a tutorial to add moves to a character:
http://oni.bungie.org/community/forum/v … 970#p17970

Some helpful commands that you can add to the BSL script:

Hides HUD and messages:
gs_show_ui = 0
ui_suppress_prompt = 1

AI's ignore you:
ai2_ignore_player = 1

Makes you invisible and super tiny:
chr_givepowerup 0 invis -1
chr_mini_me = 1
chr_mini_me_amount = .01

Invincible and untouchable:
chr_invincible 0 1
chr_unstoppable 0 1

Offline

#7 01/05/10 13:01

Tudorge
Member
From: Romania, Bucharest
Registered: 10/26/09
Website

Re: Team switch. Scripting BSL help

I knew about ai2_ignore but didn't know why invis is -1, probably makes it infinite.
Anyway, i was thinking, if we add a spectator mode, with messages telling you to respawn in x seconds.
Thanks, now im trying to export some files and edit them, after learning a bit i'll start to experiment with my script.
Have some more questions:
Did these people who made the game used in BungieFramework the command gs_show_ui for the scripted scenes (cut scenes) ? I didn't see all the scripts.
And does shapeshift use any kind of code? Like a script command, change char or similar?
Thanks, and thanks for the scripting list you sent me.

Offline

#8 01/06/10 14:01

Tudorge
Member
From: Romania, Bucharest
Registered: 10/26/09
Website

Re: Team switch. Scripting BSL help

I've learnt how to edit a few of the commands here. I could make it work somehow. I still need someone to tell me how to change team in-game, like what command to use besides the var RespawnPlayer.
Thanks for the OTA creators, this is getting more fun, sorry for edditing this, but I need a start on bsl smile.

Last edited by Tudorge (01/06/10 15:01)

Offline

#9 01/06/10 15:01

Tudorge
Member
From: Romania, Bucharest
Registered: 10/26/09
Website

Re: Team switch. Scripting BSL help

Hey I've finally made the chr_wait_animation function to work. At first I'll just keep it to teleport me when I want. So script is fine now, but I have problems on teamchange.
It's fun to use geyser's random flags to teleport anywhere with just the ctrl button big_smile.
But i have a problem, it doesn't teleport me whenever i want. It works after a few tries, but this could mean it doesn't find the animation on char_0 (me). On laptop, i don't use AE, so could it affect somehow the recognition of the animation.
Please tell me how to fix this.

Offline

#10 01/06/10 16:01

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Team switch. Scripting BSL help

You can use chr_set_class to shapeshift to another character, the command is written: chr_set_class 0 striker_easy_1.

Can't you install AE on the laptop or copy the files from the desktop to the laptop?

Sorry, BSL is not my strong point, so I can't help on the other questions.

Offline

#11 01/06/10 16:01

demos_kratos
Member
From: Russia, Volzhskiy
Registered: 08/13/08

Re: Team switch. Scripting BSL help

@Tudorge
Try to use

chr_wait_animtype 0 Taunt

instead of chr_wait_animation. The whole list of animtypes is here - http://geyser.oni2.net/anim/type.txt

Last edited by demos_kratos (01/07/10 15:01)


Jente, du er deilig, du er lekker, ihvertfall nå når jeg drikker.
Baby, du har det som trengs, hva er sannsynligheten for at vi to hopper til sengs?
Kan du si meg det? Jeg er ikke så stø i sannsynlighetsregning.

Offline

#12 01/07/10 09:01

Tudorge
Member
From: Romania, Bucharest
Registered: 10/26/09
Website

Re: Team switch. Scripting BSL help

It works, but only once.
I tried with jump and it still works but the same as taunt.
Is there a way to code this to work every time you make a specific action?
Check it:

arena_players= 1;
    chr_unkillable(char_0, 1); chr_changeteam(char_0, Konoko);
    fork RespawnPlayer(Konoko, char_0, "[g.Bobita]");
    sleep 100; fork AddEnemyTeam();
    sleep 100; fork AddFriendTeam();
    fork ChgTeam
}

And this

#############################Team cycle on taunt prototype
func ChgTeam
{
    chr_wait_animtype Taunt
    fork RespawnPlayer(Konoko, char_0, "[g.Bobita]");
    fork ChgTeam
}

It works a few times more on chr_wait_anim you know.
Oh and, this waits for any taunt animation from everyone? I used a modified re-spawn player function for this. And a modified score system and randomizing munition and messages.

Last edited by Tudorge (01/07/10 09:01)

Offline

#13 01/07/10 15:01

demos_kratos
Member
From: Russia, Volzhskiy
Registered: 08/13/08

Re: Team switch. Scripting BSL help

sorry, chr_wait_animtype 0 Taunt.


Jente, du er deilig, du er lekker, ihvertfall nå når jeg drikker.
Baby, du har det som trengs, hva er sannsynligheten for at vi to hopper til sengs?
Kan du si meg det? Jeg er ikke så stø i sannsynlighetsregning.

Offline

#14 01/29/10 18:01

s10k
Member
Registered: 01/14/07
Website

Re: Team switch. Scripting BSL help

Try this:

var bool kTeam = 0;
# 0 Konoko 1 Syndicate

#############################Team cycle on taunt prototype
func void ChgTeam()
{
    chr_wait_animation 0 KONCOMtaunt1
        if (kTeam eq 0){
        kTeam=1;
        chr_changeteam(0, Syndicate);
        dmsg "Team Changed to Syndicate"
        }
        else{
        kTeam=0;
        chr_changeteam(0, Konoko);
        dmsg "Team Changed to Konoko"
        }
    sleep 80
    fork ChgTeam
}

Call it from main fuction [func void main(void)]. fork ChgTeam();

If you don't understand something in the code just let me know.

Offline

#15 01/30/10 12:01

Tudorge
Member
From: Romania, Bucharest
Registered: 10/26/09
Website

Re: Team switch. Scripting BSL help

I'll try it soon, thanks for replying.
Thank you very much! It worked fantastically!
Now i'm trying different commands to switch to spectator mode.

Last edited by Tudorge (01/30/10 12:01)

Offline

#16 01/31/10 22:01

Phydur
Member
Registered: 01/13/07

Re: Team switch. Scripting BSL help

i might be wrong. but i think you cant taunt if no one is around you. or something. i remember trying to taunt and it didnt work. so i came to the conclusion that there needed to be an npc near by for it to work...
is this true?


I intentionally spell dang, dange, FYI.

Offline

#17 02/01/10 06:02

Tudorge
Member
From: Romania, Bucharest
Registered: 10/26/09
Website

Re: Team switch. Scripting BSL help

No, all the team change function works properly. To switch to red or blue team, that's how i keep them, just taunt until it says Team changed to "tn". It works from the first taunt, so try not to be interrupted. I've made another script that allows you to not be disturbed during this, but it would  be unfair if you switch all the time, so i've picked the natural way. By the way, how can i set the team i'm in after respawn? I want to keep the team i've been into. If i die while i was in syndicate team, i would respawn as "no team", because after you taunt once, you become tctf, twice goes to syndicate. And you get attacked by both teams after respawn.
I think i'll put respawn + team after team switch, this way it will stop cheating through teams and problems. And i think i should make a no boss warfare arena. This way i can switch through teams, and with the coresponding team, you respawn as the desired class in the team's selected color (red and blue momentarily).
Thanks for all your help, it's nice to see it finally worked.

Offline

#18 02/01/10 06:02

s10k
Member
Registered: 01/14/07
Website

Re: Team switch. Scripting BSL help

Phydur wrote:

i might be wrong. but i think you cant taunt if no one is around you. or something. i remember trying to taunt and it didnt work. so i came to the conclusion that there needed to be an npc near by for it to work...
is this true?

yes you need to have a enemy close to you. However we are talking about OTA so...

Offline

#19 09/01/10 09:09

Tudorge
Member
From: Romania, Bucharest
Registered: 10/26/09
Website

Re: Team switch. Scripting BSL help

Can anyone who made Ota answer some questions for me?
I'd like to know how to deactivate the "air quality" function, or the fog all along.
The menu from the game ( i have tctf HQ 1.1 ) does not work. If it were to work I could use all the functions like fog, arena, weapons etc. . I saw the f2 and f3 keys bound in a script but they did not work in game.
And lastly, I edited the character spawns and teams, but now they don't have any awareness. Is ai2_makeaware the only command to make the bots live (have an idea where to go)? I see something about awareness antioni. Do i need to change both ArenaAwereness and ArenaAwereness0 functions?

Last edited by Tudorge (09/01/10 09:09)

Offline

#20 09/03/10 07:09

Tudorge
Member
From: Romania, Bucharest
Registered: 10/26/09
Website

Re: Team switch. Scripting BSL help

I couldn't find on oni wiki about this. Is this just me, that the menu is not working?

Offline

#21 09/04/10 07:09

Tudorge
Member
From: Romania, Bucharest
Registered: 10/26/09
Website

Re: Team switch. Scripting BSL help

Someone?
Those bots are fighting but some are just standing. This happens on respawn too.
I think I figured the fog problem.
Please help!

Offline

#22 09/04/10 13:09

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

Re: Team switch. Scripting BSL help

I don't know. hmm I haven't looked at OTA in a long time...


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

#23 09/04/10 15:09

EdT
Moderator
From: Los Angeles, CA
Registered: 01/13/07
Website

Re: Team switch. Scripting BSL help

Are you on a Mac or PC?  If you are on a Mac the F2 and F3 keys won't work.

Offline

#24 09/04/10 16:09

Tudorge
Member
From: Romania, Bucharest
Registered: 10/26/09
Website

Re: Team switch. Scripting BSL help

No I use PC.

Offline

#25 09/04/10 16:09

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

Re: Team switch. Scripting BSL help

I don't really know what to do about the F2\F3 keys either. If they don't work, they don't work. You sure you followed the directions correctly? You may need to activate dev mode to start it, I don't recall.


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

Board footer

Powered by FluxBB