Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 06/06/08 06:06

gmsly
Member
From: VY CMa
Registered: 05/17/08

HOW to let npc move to flag?

I write this but striker_01 ro striker_02 all can not move to flag
but why I replace  striker_01 ro striker_02 with barabus ....and barabus can move to the flag 0 ...why sad

        ...
        ai2_spawn striker_01
        chr_teleport striker_01 1
        ai2_spawn striker_01
        ai2_movetoflag striker_01 0

        ai2_spawn striker_02
        chr_teleport striker_02 1
        ai2_spawn striker_02
        ai2_movetoflag striker_02 0

        ai2_spawn striker_03
        chr_teleport striker_03 1
        ai2_spawn striker_03
        ai2_movetoflag striker_03 0
        ...

Last edited by gmsly (06/06/08 06:06)

Offline

#2 06/06/08 08:06

coool
Member
From: China Haikou
Registered: 02/12/08

Re: HOW to let npc move to flag?

You can ask me,just in Baidu,
and,it's better to ask this question here:
http://oni.bungie.org/community/forum/v … m.php?id=4

you can use this:
ai2_movetoflag(ai_name,flag id)
or just use chr_teleport

Last edited by coool (06/06/08 08:06)

Offline

#3 06/06/08 09:06

gmsly
Member
From: VY CMa
Registered: 05/17/08

Re: HOW to let npc move to flag?

I use "ai2_movetoflag(ai_name,flag id)" but it can not work

Last edited by gmsly (06/06/08 09:06)

Offline

#4 06/06/08 09:06

m2
Member
Registered: 01/22/07

Re: HOW to let npc move to flag?

I'm not sure if it works, but give it a try:

ai2_movetoflag ai_name flag id
ai2_setjobstate ai_name

Offline

#5 06/06/08 15:06

gmsly
Member
From: VY CMa
Registered: 05/17/08

Re: HOW to let npc move to flag?

It still not work...........

Other save point NPC use  teleport  to this save point
and can not walk to flag...
He perhaps is get lost...;)

Offline

#6 06/06/08 18:06

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

Re: HOW to let npc move to flag?

It depends on how far away the flag is. I don't know how well the AI is at travelling large distances. Also, make sure barabus is spelt right, and that he is actually in the level...

...which level are you doing?


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

#7 06/06/08 20:06

gmsly
Member
From: VY CMa
Registered: 05/17/08

Re: HOW to let npc move to flag?

i do this
Level 8 (TCTF Regional HQ)

by the way..
No matter where it is..Barabus die and then will win..Terrible ai 2_ kills
i waited for a long time...to begin next level ..I can do like this .#ai 2_ kills  lol

Last edited by gmsly (06/06/08 20:06)

Offline

#8 06/06/08 21:06

Barneyhater
Member
From: New York City, NY, USA
Registered: 04/13/08
Website

Re: HOW to let npc move to flag?

gmsly wrote:

i do this
Level 8 (TCTF Regional HQ)

by the way..
No matter where it is..Barabus die and then will win..Terrible ai 2_ kills
i waited for a long time...to begin next level ..I can do like this .#ai 2_ kills  lol

if you wanna kill everyone when your in dev mode just press "f6" (is it f6? i think thats it for mac)


"It is not hatred but indifference that will destroy us." -Unknown
"One death is a tragedy. The death of a million is a statistic" -Joseph Stalin

Offline

#9 06/06/08 21:06

gmsly
Member
From: VY CMa
Registered: 05/17/08

Re: HOW to let npc move to flag?

i will fight ...because i do not know if it is too difficult ....then i will change
...

Offline

#10 06/06/08 22:06

gmsly
Member
From: VY CMa
Registered: 05/17/08

Re: HOW to let npc move to flag?

If you are interested in level 8 ...
I did a video about tctf test smile

http://www.youtube.com/watch?v=u6vOxXyjQik

Offline

#11 06/16/08 04:06

m2
Member
Registered: 01/22/07

Re: HOW to let npc move to flag?

I write this but striker_01 ro striker_02 all can not move to flag

Well, I checked it myself. The second striker worked fine, but the first was just standing around. It seems that Oni has some problems to initialize the level and prepare the path for the first striker at the same time. (If you set the path id of striker1 from 0 to 1 it will work without any problem.) To solve you problem, you can use the sleep command to make striker1 move to the flag:

ai2_spawn lobby_striker_01
ai2_spawn lobby_striker_02
ai2_spawn lobby_striker_03
chr_teleport lobby_striker_01 1
chr_teleport lobby_striker_02 1
chr_teleport lobby_striker_03 1
ai2_movetoflag lobby_striker_02 0
ai2_movetoflag lobby_striker_03 0
sleep 10
ai2_movetoflag lobby_striker_01 0

Tested and worked fine.

Last edited by m2 (06/16/08 04:06)

Offline

Board footer

Powered by FluxBB