Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 05/30/13 20:05

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

bsl questions and problems

I have a few questions and problems with bsl

Issue 1: whenever I type ai2_showhealth = 1 in the developer mode console the game crashes  .. I'm I typing it wrong ? I'm sure I've used it before .. anyone else with this issue ?

Issue 2: I can't figure out what's wrong with this function

func void casey(){
chr_inv_reset 0
chr_set_class 0 casey_b
sleep(20)
chr_givepowerup(0,hypo,6)
}

I want it to set player as casey, clear any held items and then give player 6 hypos .. what's happening is : character class works but no hypos are given, shouldn't the sleep work so the inventory is reset and then the hypos are given ? if I remove the chr_inv_reset and sleep .. the hypos are given but I don't want them to accumulate over already carried items so i need the inventory reset.

Issue 3:

chr_weapon_immune [ai_name:string | script_id:int]

chr_weapon_immune 0
turns it on for player .. but how do i turn it off ? typing it again doesn't work and it doesn't accept 0 or off after it .. i need it temporarily only

Last edited by Samer (05/30/13 20:05)


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

Offline

#2 05/30/13 21:05

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

Re: bsl questions and problems

1) There was an issue with ai2_shownames, probably this is a similar problem, file a bug report on the tracker.

2) Odd, it works for me on the Mac.  Just as a test try this syntax: chr_givepowerup 0 hypo 6

3) I don't see how to turn it off, sorry.  Maybe you can use chr_invincible 0 1 and then chr_invincible 0 0 to turn off.

Offline

#3 05/30/13 22:05

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

Re: bsl questions and problems

1. Ok will do later today
2. Didn't work either hmm it doesn't make sense .. I'll try something else
3. Actually the reason i want to use it is when a character does a particle attack, like Barabas or mutant muro, it affects their allies in the proximity as well, i wanted to protect the allies during the attack so i'd have it wait for the animation, make the allies weapon immune (which also makes them particle immune) then disable it quickly .. With chr invincible or unstoppable they're still knocked down by the particle attacks ... Instead i had it wait for the animation, give the allies powerup shield with low percentage then reset their inventory after, which worked.


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

Offline

#4 05/31/13 03:05

Alloc
Member
From: Germany -> Darmstadt
Registered: 01/14/07
Website

Re: bsl questions and problems

Samer wrote:

Issue 1: whenever I type ai2_showhealth = 1 in the developer mode console the game crashes  .. I'm I typing it wrong ? I'm sure I've used it before .. anyone else with this issue ?

Works here. So either I fixed this when I fixed shownames or it's a problem on your side wink
Just sent you a mail with the current Daodan build.


ONI2.net, link to just any important resource-pages about ONI.

Offline

#5 06/01/13 22:06

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

Re: bsl questions and problems

@Alloc yes it's fixed in the daodan you sent me, sorry took me so long to test it.
I hope the next daodan update will address the particle overload issue, I have some mods planned where several particle containing mods need to be installed together.


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

Offline

#6 06/08/13 05:06

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

Re: bsl questions and problems

show_flags = 1 doesn't do anything
also show_triggervolumes = 1  is not accepted, wiki says it's a mac only command .. is there an alternative to view the tirggervolumes in game ?


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

Offline

#7 06/08/13 05:06

Alloc
Member
From: Germany -> Darmstadt
Registered: 01/14/07
Website

Re: bsl questions and problems

Nope, currently not. We're kinda working on this issue wink


ONI2.net, link to just any important resource-pages about ONI.

Offline

#8 06/08/13 06:06

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

Re: bsl questions and problems

To be exact, show_flags is marked as "exists in Windows but only works on Mac".  You can tell this by the blue box that says OK-M.  Alloc is working to add these to Windows through the DLL, however.


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

Offline

#9 06/08/13 07:06

s10k
Member
Registered: 01/14/07
Website

Re: bsl questions and problems

Samer wrote:

show_flags = 1 doesn't do anything
also show_triggervolumes = 1  is not accepted, wiki says it's a mac only command .. is there an alternative to view the tirggervolumes in game ?

You can use neo's Oni Browser for triggervolume viewing.

Offline

#10 10/08/13 18:10

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

Re: bsl questions and problems

question :
from the wiki

chr_poison [ai_name:string | script_id:int] damage:int interval:int [initial_interval:int] - slowly poisons a character - chr_poison (konoko, 10, 60, 90);

this command is used in the gas chamber in Airport Cargo hangars ...
func void poison_konoko(string ai_name)
{   
    chr_poison (konoko, 10, 60, 90);
}

when the lasers are triggered in the chamber they activate a function called gas, which activates a trigger volume which in turn activates the poison function.
the gas particles by themselves don't cause damage.
if i delete that function poison_konoko it says its missing when the lasers are triggered.

my question is when I call the function poison_konoko via the command line nothing happens at all (in that level) only when it's triggered by the lasers ...
I'm trying to use that poison function somewhere else :
chr_poison (0, 10, 60, 90) for example does nothing ... shouldn't it poison the player slowly ?
while chr_poison (0, 10) makes the character lose 10 health points once.
I understand the first number is the script id of the character the second is damage the third is time interval for how long the effect lasts ? what is the fourth.
and how can I make it work :\


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

Offline

#11 10/08/13 19:10

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

Re: bsl questions and problems

Well, an interval is not a duration.  So "interval" is the time between damage events.  I think "initial_interval" is the amount of time before the damage starts happening; if so, it should take 1.5 seconds for damage to start happening once the gas releases.  The reason for the interval is that as long as Konoko is standing in the TV, this function is being called every frame, so the chr_poison call specifies that Oni will only do damage every x frames.  In order to get it to work on the console line, you have to call the function many times really quickly, as it's used in Oni.  I used the up arrow key to recall the last command, and alternated between mashing up arrow and the return key as quickly as possible, and I was able to damage Konoko a couple times in 50-100 tries.


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

Offline

#12 10/08/13 19:10

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

Re: bsl questions and problems

thanks smile

I couldn't get it to work by alternating inputs so I tried this script

func poison (void)
{
chr_poison (0, 1, 60, 90)   
sleep 1
chr_poison (0, 1, 60, 90)   
sleep 1
fork poison()
}

and used fork poison.
I didn't know that the trigger volume was calling it every frame I thought it called it once ^_^


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

Offline

#13 10/08/13 19:10

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

Re: bsl questions and problems

Yep, in fact Oni gets overloaded when you stand in that kind of TV for too long: http://bugs.oni2.net/ticket/37


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

Offline

#14 10/21/13 20:10

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

Re: bsl questions and problems

is there a command to make a character stay fixed where it is without being passive ?
example a character that has a gun .. i want it to stand and shoot from it's position without moving at all ... even giving the combat ID of stand and shoot and sniper makes it move to try and get a better aim.

I've seen this command : chr_pin_character - pins a character to the ground - *chr_pin_character = 1*
but it doesn't seem to do anything ... either that or I'm not using it properly.

Last edited by Samer (10/21/13 20:10)


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

Offline

#15 10/21/13 21:10

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

Re: bsl questions and problems

Hmm, good question.  I don't know how to make an AI shoot without moving.  Now, I'm not experienced with chr_pin_character, but I do think it refers to stopping all characters from moving, or else only the player character.  It couldn't be used for a single AI because it can only be turned on and off; where would you specify the character to pin?


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

Offline

#16 10/22/13 10:10

Loser
Member
From: somewhere in da Czech Republic
Registered: 01/14/07

Re: bsl questions and problems

chr_pin_character is a variable which locks/releases position of all characters in game world.
When set 1 (chr_pin_character=1), all characters can still be controlled (be it by player or by AI) and will perform all kind of animations, but will not change their XYZ position in the game world; they are "pinned" on the spot they were when the chr_pin_character took effect.

About the behavior I think you would like to achieve - easy&direct method (some sort of predefined AI routine) is unfortunately not possible, as far as my observations go AI is programmed to always follow the player if line of sight is broken (standard circuumstances, Alarm behavior is not considered).

From top of the head (Oni-related apps are forbidden to touch the hardrive till Master's degree is done) it could be maybe possible to simulate such behavior either:

  • via FILM predefined sequences, TrigVolumes and some BSL (possible visual glitches)

  • via custom made patrol paths called from BSL by ai2_dopath command, a net of carefully placed flags, some TrigVols and some BSL (could be unreliable)


"I am just a mere reflection of what I would be."

Offline

#17 10/22/13 10:10

ltemplar
Member
From: Poland
Registered: 08/23/12

Re: bsl questions and problems

Or by value change in: hostile threat definite timer(ONCC) telling AI how long it knows where the player is when spot by it - from 180 (default) to for example 10 (enough to make AI to sit on his "ass" - but this also alert it's h2h behavior unfortunately - so you must make a trade).As alternative to both mentioned earlier by Loser.

Last edited by ltemplar (10/22/13 10:10)

Offline

#18 10/22/13 11:10

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

Re: bsl questions and problems

mmm ok thanks everyone, for the suggestions and clarifications  ... basically we have a sniper who has to shoot through a window, but what happens is when he (as loser said) loses line of sight with player momentarily he leaves his position ... I think I'm gonna go with creating an invisible barrier around him that prevents him from leaving position which can be removed later with env_show command .. or by a continuous command to re-teleport him to his position.


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

Offline

#19 10/22/13 11:10

Dirk Gently
Member
From: Boston, MA
Registered: 06/12/09
Website

Re: bsl questions and problems

I'm no expert when working with this, but could it be possible to force it to not path find? my understanding is that you want the AI to stay in one spot regardless of where a player moves. Couldn't this be done by nuking the patrol and path finding elements or forcing them to remain in one spot.

One way is to get them stuck in an area with no pathfinding grind associated with it, much harder and requires a level rebuild, but some small elements can prevent them from pathfinding out of an area that wouldn't impose problems for a player controller character. For example, in airport checkpoint 2, AI will never be able to get onto the luggage belt that is in that room you start in. Animations are rooted to the floor of the level, only way they could escape a small lip is by jumping, which AI doesn't like to do. It might be possible to create such a lip to enclose where you want them to stand without needing them in invisible walls. This also has the added benefit of making them time out instantly from trying to path find their way-out and fall back on other attack methods, being ranged attacking with weapons.

(this airport example is an inverse example, they will attempt to path find around to get to you, but if the rolls were reversed then you would be seeing them trying to just attack you when they exhaust their ability to path find.

Offline

#20 11/22/13 01:11

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

Re: bsl questions and problems

Iritscen wrote:

Yep, in fact Oni gets overloaded when you stand in that kind of TV for too long: http://bugs.oni2.net/ticket/37

is there any way around it ? I need to have a tunnel where character is poisoned as he is moving through it. it does give that error when character stands in it too long, would splitting it to several smaller tvs instead of one big tv help ? (meaning instead of 1 tv that covers entire tunnel i have several consecutive smaller ones) and after that error happens do all bsl functions stop working or only that one.

Last edited by Samer (11/22/13 01:11)


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

Offline

#21 11/22/13 18:11

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

Re: bsl questions and problems

I don't know of a workaround myself, though I'm not an expert on this subject.  I did a quick test with the fire in Airport and it did break scripting for the rest of the level.  Also, it seems that this overload occurred after several successive immersions in the fire, waiting several seconds between each one.  So this indicates that it's a cumulative problem, and having separate damage-dealing TVs probably will not help.


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

Offline

#22 11/22/13 20:11

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

Re: bsl questions and problems

Samer: Can you email me the files so I can take a look.

Offline

#23 11/29/13 10:11

Michele
Member
From: Italy
Registered: 01/30/13

Re: bsl questions and problems

It works also for me on the Window


I'm Italian and I'm 23. My nickname is .PixeL

Offline

#24 01/01/14 21:01

Samer
Member
From: Lebanon
Registered: 09/04/09
Website

Re: bsl questions and problems

if you use the command ai2_lookatchar on an ai is there a way to stop it ?
I'm using it in a cutscene but I then want the character to look at something else, but the effect of the ai2_lookatchar lasts forever :\ so if I use the command chr_facetoflag for example the lookatchar command overwrites it and they always turn back to look at the character instead of the flag. is there a way to reset a character's view.

Last edited by Samer (01/01/14 21:01)


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

Offline

#25 01/01/14 21:01

s10k
Member
Registered: 01/14/07
Website

Re: bsl questions and problems

I can't test it right now but have you tried to chr_freeze the character after the ai2_look?
Or make it blind? ai2_makeblind
Or forget he saw the character? ai2_forget

Offline

Board footer

Powered by FluxBB