You are not logged in.
Hi guys
I'm starting to learn how to use dev mode and scripts I got spawn a pnj and another one now I would like him to attack each other but it doesn't work I tried with the command ai2_attack civ_victim_1 civ_victim_11 he looks at himself but doesn't face each other How to do it ? Thanks again
Offline
Welcome. Sorry, but I don't know what a PNJ is. Your command sounds like it should work, though. Maybe the AIs are not active for some reason, or maybe their team matters. Someone else here might be able to help with this.
Check out the Anniversary Edition Seven at ae.oni2.net!
Offline
Try changing both to different teams using chr_changeteam, then do the ai2_attack.
Offline
Thank you for your answers
So I tried with (chr_changeteam civ_victim_1 Syndicate) it doesn't work, I made a mistake in the commande or is it ok? I also give a weapon to the pnj I tried the command ai2_attack (civ_victim_1 civ_victim_11) but it doesn't even attack with a weapon, does the weapon have ammunition inside or not ?,
Offline
If you give a weapon it should have ammo. Can you make a video of what are you doing? It will be easier to help you.
Offline
Presumably you are talking about civ_victim_1 and civ_victim_11 from level 4?
If I remember correctly, civ (civilians) aren't supposed to fight. They cannot.
So you would have to A) take other characters or B) do a few modifications on the civ characters.
For case B you would do this:
- Work through XML tutorial: https://wiki.oni2.net/XML:Basic_tutorial
- For some extra read up: https://wiki.oni2.net/XML:BINA/OBJC/CHAR
- Do actual modifications on level4's CHAR file in Oni\AE\GameDataFolder\level4_Final
-- Remove NonCombatant from <OSD><Flags>
-- Change the Job tag (if necessary) to ...
<Job>
<Type>None</Type>
<PatrolPathId>0</PatrolPathId>
</Job>
- put the modification into a package: https://wiki.oni2.net/Making_a_mod_package
-- if that is too difficult use an existing package but with a level 4 folder to it
--- Oni\AE\AEInstaller\packages\24100HD_Training_Room_Textures\oni\level4_Final
Last edited by paradox-01 (08/27/20 06:08)
Offline
I can't send links I'm not authorized, I just made exactly the commands but here's how the NPC with his weapon (civ_victim_1) doesn't attack civ_victim_11 I also made the command chr_changeteam on civ_victim_1 but when I display the report on the NPC it puts me "neutral". here's how I proceed:
-ai2 spawn civ_victim_11
-ai2_comehere civ_victim_11
-chr_changeteam civ_victim_1
-chr_giveweapon civ_victim_1 (name of the weapon)
-ai2_attack civ_victim_1 civ_victim_11 1
Offline
Paradox gave me an idea maybe you can try the commands here:
ai2_neutralbehavior [ai_name:string | script_id:int] behavior:string - sets up an AI's neutral-interaction - ai2_neutralbehavior neutral_3 none
ai2_noncombatant [ai_name:string | script_id:int] non_combatant:int{0 | 1} - sets or clears an AI's non-combatant state - ai2_noncombatant A1_intro01 1
ai2_panic [ai_name:string | script_id:int] timer:int - makes an AI panic or not panic - ai2_panic A1_s_red02 300
Especially the ai2_noncombatant try set it to 0 to civ_victim_11.
You can post links if you remove the "http" part.
Offline
Okay, thank you if I understand correctly:
ai2_neutral behavior civ_victim_1 none
ai2_noncombatant civ_victim_1 1
ai2_panic civ_victim_1 300
The problem is that when I type the ai2_panic command, the game crashes.
youtu.be/7-JAQV0iwYs
Here's a video I made to show you how I proceed or, worse, if it doesn't work, I do what paradox has sent .
Last edited by kozo (08/26/20 16:08)
Offline
Try
ai2_noncombatant civ_victim_1 0
.
Offline