View Full Version : aOnDie problem with SpawnAI command

05-08-2010, 12:23 AM
I have set up ai spawner and in aOnDie action (in AI's properties) I have put some actions which will be launched BUT I guess it is not possible cause validator everytime says me about it - it says like "defined aOnDie" in SpawnerAI.... What is that? Why I can't put something in aOnDie action when I am setting AI for spawners?
thank you.

05-08-2010, 06:07 AM
I have seen the same thing. Not sure how Techland programmers set that up and why it is not working. Anyway my workaround of this is to add this actor to an AIGroup of its own. So one AIGroup with only one AI enemy. Then you can use onSingleActorDie in the AIGroup. This works for me. I hope this helps http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif

05-08-2010, 08:48 AM
wow thx! I thought about it in my mind and didn't decide to try it - now I know it will work - THANK YOU! http://forums.ubi.com/images/smilies/11.gif

05-10-2010, 05:15 PM
Hi Seir,
I have 1 problem:

I have created melees and I reached point when slaves on my map should attack player. I've reached this method by attach command etc etc etc, anyway when I put spawner and want my melee method will work at any slave spawning (OnSpawnAction etc) it totally doesn't work - spawner just creates AI but sure with no melee... So I mean OnSpawnAction doesn't work or doesn't work with attach command? I will be happy to send you screenshot with options window.

05-11-2010, 02:04 AM
Attach melee? I don't understand...

05-11-2010, 05:57 PM
never mind =) I said I have created enemies whose attack with melee weapon such as axes and knives. So you will see it in my next map.

05-12-2010, 12:23 AM
Oh I see. There's a "WeaponHands" that is from COJ1 and it might not work. You need to experiment with that.

05-12-2010, 12:56 AM
Um, I used another way, so I will post soon a lot of selections about that. Thank you.

05-13-2010, 03:07 PM
Ok, so I said things work when you set your actions to be triggered in the AIGroup aOnSingleMemberDie. This is partly true as some actions work, others don't. Actions that don't have anything to do with the spawned AI will work, but if you need to use the spawned AI to check some condition it does not work. What I mean is the situation like this:

1. I spawn 1 enemy AI with spawner that belongs to an AIGroup.
2. The AI enemy walks along the path (Waypoints).
3. I kill the enemy.
4. In aOnSingleMemberDie (used AIGroup) I call an action that should be triggered when this spawned AI enemy was within a certain distance from a certain object (I use cnd_ObjectsDistance).

As a result, the step 4 is never executed as this condition cnd_ObjectsDistance never return the proper value. It just does not work with spawned AI. It works if I don't use spawners, but I need to. How do I solve this problem?