When I read the standard on blocked AI script, I can see that the on blocked event is used to handle blocking doors. I am wondering if the event fires every time a creature is blocked, and if that can be used to have a creature react to other obstacles in the area. Has anyone ever messed with this?
When does the on blocked event fire?
Débuté par
M. Rieder
, août 07 2011 04:21
#1
Posté 07 août 2011 - 04:21
#2
Posté 08 août 2011 - 07:57
Don't think anyone really knows.
From my understanding, it fires whenever the creature has to stop because something is in their way, creature, door, or whatever. But that is just conjecture.
From my understanding, it fires whenever the creature has to stop because something is in their way, creature, door, or whatever. But that is just conjecture.
#3
Posté 09 août 2011 - 01:43
Well, I experimented with a script that made a soldier attack a barricade when it blocked the soldier's path and it didn't work. I wasn't very persistent, though, because I have bigger fish to fry right now. If I ever figure something out, I'll post it.
#4
Posté 18 août 2011 - 03:09
Hi Matt,
If a creature is wandering around and they bump into an object that is blocking their path, then the creature can react to the blocking object using the GetBlockingDoor() function. From what I have seen of OC, it looks like you can also determine the "object type" to help decide how said creature will react to the given blocking object. However, I have only ever seen it check for creatures and doors. (*) Doors can then be bashed or opened according to intelligence of the creature ... and I guess other blocking creatures may possibly be attacked.
(*) Although the function description implies it will only ever work if the blocking object is a door.
Check out gb_comp_blocked.
Lance.
If a creature is wandering around and they bump into an object that is blocking their path, then the creature can react to the blocking object using the GetBlockingDoor() function. From what I have seen of OC, it looks like you can also determine the "object type" to help decide how said creature will react to the given blocking object. However, I have only ever seen it check for creatures and doors. (*) Doors can then be bashed or opened according to intelligence of the creature ... and I guess other blocking creatures may possibly be attacked.
(*) Although the function description implies it will only ever work if the blocking object is a door.
Check out gb_comp_blocked.
Lance.
Modifié par Lance Botelle, 18 août 2011 - 03:10 .
#5
Posté 18 août 2011 - 04:48
I'd imagine it has to be something which is "blocking", it won't do it if it's just baked into the walkmessh or something they can path around, the engine will just path them where they need to go.
Not sure if that means it will ignore walkmesh cutters and placeables which can be bashed.
Be a good thing to test and document.
Not sure if that means it will ignore walkmesh cutters and placeables which can be bashed.
Be a good thing to test and document.
#6
Posté 18 août 2011 - 11:00
In my experience, usable placeables that have their collision status set to 'true' don't seem to fire the OnBlocked event at all. Creatures that walk into them simply stop dead in their tracks, and don't seem to be able to walk around them. It may suggest that only a very few blockage types might be supported (probably only creatures and doors).
I've also had trouble getting the entire party to bash the same placeable at once. It seems that once you switch focus to another character, the previously controlled party member stops attacking it. Shift-selecting the entire party certainly allows you to get them all to attack it once, but the non-PC party members still tend to give up. That may suggest that AI doesn't work well against placeables.
I've also had trouble getting the entire party to bash the same placeable at once. It seems that once you switch focus to another character, the previously controlled party member stops attacking it. Shift-selecting the entire party certainly allows you to get them all to attack it once, but the non-PC party members still tend to give up. That may suggest that AI doesn't work well against placeables.





Retour en haut






