Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 10/28/09 04:10

dream996
Member
Registered: 03/15/09

script command problem

after the chump comes out ...the area ( the ground will turn into lines ! (why? and does it have to be a easy_striker ?>?????and can that chump fight ???

how can you take control of A ai ?

what is spawn ????

and that script command  console is a bit wired ( doesnt always comes out , * after i press f1 and something else or *

Last edited by dream996 (10/28/09 05:10)


PunBB bbcode test

Offline

#2 10/28/09 08:10

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

Re: script command problem

The purpose of the ai2_chump is simply to test pathfinding.  The idea was for the devs to be able to see the pathfinding grid and watch the chump as it followed Konoko to see how it chose a path along the grid.  I don't know of a way to change the enemy that is spawned or to make him fight.

I'll leave the question about taking control of an AI to someone else more knowledgeable, but I don't think it's possible.

"What is spawn?"  I don't know what you're asking.

The console is just glitchy for some people.  The only glitch I've had personally was that the console would not show up at all in high resolutions.  It works reliably at 1024x768 for me.


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

Offline

#3 10/28/09 08:10

Leus
Member
From: Boone, NC
Registered: 05/28/09
Website

Re: script command problem

To "spawn" means to create something new, so to "spawn" an enemy is to make him appear in the level.

Hopefully that's what you're asking.


If we don't change the direction we're going, we'll likely end up where we're headed.

Offline

#4 10/28/09 14:10

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

Re: script command problem

The only way to change what the chump spawns as is through engine hacking.


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

#5 10/28/09 14:10

Phydur
Member
Registered: 01/13/07

Re: script command problem

To control AI:
type "who" and a list of characters will appear (if any characters are in range.)
look for the # symbol. thats the number you want. then type
"chr_focus chr_index:int"  where chr_index:int = the number you want. then type
"ai2_takecontrol 0"

so for example, if you where in the beginning of the dream lab level you would type

who

and it would say
konoko (class k4_G, #0)
IntroMuro (class muro_generic, #1) (state none)
see how it says #1? thats the chr_index number you want, so type

chr_foucs 1
ai2_takecontrol 0

and now you're controlling muro.
to switch back to konoko, type

chr_focus 0

be careful though. i haven't used it too much so you might find glitches.
one thing i do know, if you kill konoko, its game over,even if you're controlling someone else.
and i think if they have a gun they'll try an shoot at konoko, even if you're controlling them.
this is all in the command console, of course.

oh, and remember to give control back to the AI, by typing "ai2_takecontrol 1" before swtiching back to konoko, because otherwise they'll just stand there. i think.

Last edited by Phydur (10/28/09 14:10)


I intentionally spell dang, dange, FYI.

Offline

#6 10/28/09 15:10

dream996
Member
Registered: 03/15/09

Re: script command problem

nothing come out after i press who in the cmd =[


PunBB bbcode test

Offline

#7 10/28/09 15:10

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

Re: script command problem

You had characters standing near you at the time?


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

Offline

#8 10/28/09 15:10

dream996
Member
Registered: 03/15/09

Re: script command problem

right in front of me


PunBB bbcode test

Offline

#9 10/28/09 16:10

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

Re: script command problem

Was it the chump?  Or other characters?


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

Offline

#10 10/28/09 16:10

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

Re: script command problem

I just tried it smile it works for me, thanks Phydur, it's fun to play as the bad guys and just make them walk off the ledge tongue
I should be studying :S bye big_smile


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

Offline

#11 10/28/09 17:10

dream996
Member
Registered: 03/15/09

Re: script command problem

other characters...


PunBB bbcode test

Offline

#12 10/28/09 18:10

Leus
Member
From: Boone, NC
Registered: 05/28/09
Website

Re: script command problem

Yeah "who" did nothing for me either, but I just typed the number I knew they spawned as because I was just spawning them manually anyway...  Lol...  So, that focus/takecontrol 0 combo is cool.  I kind of have a script idea based on it now.   smile


If we don't change the direction we're going, we'll likely end up where we're headed.

Offline

#13 10/28/09 21:10

Phydur
Member
Registered: 01/13/07

Re: script command problem

hmmm maybe "who" is a windows only command?
*edit*
well, i checked the wiki, and its in the list for both windows and Mac.
so i donno.
maybe gumby, or someone else can help you...?

*edit2*
Try entering

co_display=1

do you see any console text when you type things in? after you hit enter, I mean?
if you don't, that might fix it.

Last edited by Phydur (10/28/09 21:10)


I intentionally spell dang, dange, FYI.

Offline

#14 10/28/09 22:10

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

Re: script command problem

very interesting... i found out about the "focus" command, but i hadn't thought to combine it with the ai2_takecontrol command big_smile

if you want to make it so that you don't loose when Mai dies (if your willing to go through the trouble that is) you would have to edit the BINACJBOCharacter file for each level i believe and change Konoko's flags, there should be a "you loose" flag there, if that is deleted, then you wont loose when she dies smile

this combo of commands could definately open some new doors in scripting... ill definately look into some new concepts when i have time


"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

#15 10/28/09 22:10

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

Re: script command problem

Or you could just edit the "you_lose" function in the scripts...


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 10/28/09 23:10

Leus
Member
From: Boone, NC
Registered: 05/28/09
Website

Re: script command problem

Or you could just edit the "you_lose" function in the scripts...

Yeah.

Speaking of which, isn't that just a function that's instructed to be called when <event> happens--in this case death?  'Cause I typed the name of a function of mine into a character's <die> tags in the BINACHAR but it doesn't execute when they die...  Hrm.


If we don't change the direction we're going, we'll likely end up where we're headed.

Offline

#17 10/29/09 00:10

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

Re: script command problem

That's how it should work...I've used it many times before and never had a problem...


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

#18 10/29/09 00:10

Phydur
Member
Registered: 01/13/07

Re: script command problem

hey leus, im curious, did my sugestion work?
for the dev console thing?

and while im posting, i'd like to mention again that a long time ago i had an idea for a "treasure hunt" game
now that we can make our own flags, its possible!
i'd do it myself, but i dont have the time, realy.
but basicly have a bunch of random locations where a set item could be found (say the LSI?)
and when you pick it up you win.
this would be better for a multiplayer game as you could compete wtih other players to find the item first...
but thats not possible yet...
its simple but a fun idea.
maybe one of you guys could make it...


I intentionally spell dang, dange, FYI.

Offline

#19 10/29/09 00:10

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

Re: script command problem

Phydur wrote:

hey leus, im curious, did my sugestion work?
for the dev console thing?

and while im posting, i'd like to mention again that a long time ago i had an idea for a "treasure hunt" game
now that we can make our own flags, its possible!
i'd do it myself, but i dont have the time, realy.
but basicly have a bunch of random locations where a set item could be found (say the LSI?)
and when you pick it up you win.
this would be better for a multiplayer game as you could compete wtih other players to find the item first...
but thats not possible yet...
its simple but a fun idea.
maybe one of you guys could make it...

That would be very easy to do.


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

#20 10/29/09 00:10

Leus
Member
From: Boone, NC
Registered: 05/28/09
Website

Re: script command problem

Yeah the co display thing was the problem.  Also I'll think about that treasure hunt idea.  smile


If we don't change the direction we're going, we'll likely end up where we're headed.

Offline

#21 10/29/09 04:10

dream996
Member
Registered: 03/15/09

Re: script command problem

Phydur_ please can i have the list from that wiki

co_display=1  there is     int32: 1     comes out
then i tried who again ........but nothing come out either
right now i just need the WHO working and it will be mission complete !!! i tried the foucs cmd it works fine =]
by the way one more question can you use cmd to type cheat> ????

Last edited by dream996 (10/29/09 05:10)


PunBB bbcode test

Offline

#22 10/29/09 06:10

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

Re: script command problem

You don't type the cheat codes on the console, but there are scripting-command equivalents for a number of cheats.  See the table on the "Cheats" page on the wiki.


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

Offline

#23 10/29/09 09:10

dream996
Member
Registered: 03/15/09

Re: script command problem

i wanna know it coz....when u are in a dev mode and u press F1 the cmd wont work again unless u start the whole oni again ....


PunBB bbcode test

Offline

#24 10/29/09 13:10

Phydur
Member
Registered: 01/13/07

Re: script command problem

dream996 wrote:

i wanna know it coz....when u are in a dev mode and u press F1 the cmd wont work again unless u start the whole oni again ....

wiki wrote:

If you press an illegal key during console input (such as F1), the input display will freeze : hit Tab a few times to fix.

use the ~ key, or whatever key you have the console set to, again to turn it off first.

http://wiki.oni2.net/Developer_Mode

http://wiki.oni2.net/PC_vs_Mac
http://ssg.oni2.net/commands.htm

and nothing happens when you enter "who"?
thats weird. it should show something...
does it really not do anything at all?

Last edited by Phydur (10/29/09 14:10)


I intentionally spell dang, dange, FYI.

Offline

#25 10/29/09 18:10

dream996
Member
Registered: 03/15/09

Re: script command problem

nope ....

i will tell u wat i did

first i click level one

f12activate deve mode

M for the cmd

type co_display (int32 : 1  comes out

and then i type who .....

nothing come out  neutral

Last edited by dream996 (10/29/09 18:10)


PunBB bbcode test

Offline

Board footer

Powered by FluxBB