Advice: How to get an NPC to avoid stepping in a Trigger
#1
Posté 26 juin 2013 - 08:26
using the [ | ] castle wall with the hole in it for the space; have a walkmesh helper over it to allow it to be walked on, and floor placeables covering it to be the intact floor. I have two triggers; one for the pit itself and one to see if a Dwarf or a Rogue notices the weakened floor and warns the party. In any event, once the trigger is set off, floor pieces are destroyed and entering character (and anyone else in the trigger) drops to another part of the area, knocked down, takes damage, yadda yadda yadda...
My question is this: when either (1) the pit is revealed or (2) someone says "hey, avoid the right hand side of this corridor, it will collapse" how do I prevent NPCs from entering the trigger? Clearly if you see a huge hole in the floor, you don't step there... but NPC AI is not the brightest in the world. The other trigger is larger and encompasses the first trigger; but a "move away from" action does not seem like the best solution... (choppy, at best). So I ask, is there something I can set on the trigger that would say "hey, NPC guy, don't walk here" but will not prevent the space from being walked on (say, by a dumb player).
#2
Posté 26 juin 2013 - 08:33
Modifié par kamal_, 26 juin 2013 - 08:37 .
#3
Posté 26 juin 2013 - 08:40
#4
Posté 26 juin 2013 - 11:08
You can make n-directional triggers by detecting which waypoint/ipoint is closest (and inside the trigger) and running a conditional based on which is closest.EpicFetus wrote...
only issue there is making it bi-directional... and the fact that, if a fight breaks out near it, all of a sudden they all lose their senses and fall in (the later is likely going to happen anyway, but yeah).
Modifié par kamal_, 26 juin 2013 - 11:08 .
#5
Posté 26 juin 2013 - 11:08
#6
Posté 26 juin 2013 - 11:11
Didn't view the whole thing to see if he did exteriors as well, but my dynamic jumping code will dynamically assign falling damage based on the map's terrain (obviously exterior only).Tchos wrote...
On a related note, this video has a nice method of falling into a pit. Some good ideas here, even if you don't use the plugin.
Modifié par kamal_, 26 juin 2013 - 11:12 .
#7
Posté 26 juin 2013 - 11:52
ergo
if(!GetIsPc()) return;
just the simplest version of course but you are over analysing you problem.
#8
Posté 26 juin 2013 - 11:54
Modifié par Tchos, 26 juin 2013 - 11:56 .
#9
Posté 27 juin 2013 - 12:32
kamal_ wrote...
Didn't view the whole thing to see if he did exteriors as well, but my dynamic jumping code will dynamically assign falling damage based on the map's terrain (obviously exterior only).Tchos wrote...
On a related note, this video has a nice method of falling into a pit. Some good ideas here, even if you don't use the plugin.
It would be possible to adapt Kamal's jumping code so that NPCs who know the pit is there jump across it, rather than try to go around it.





Retour en haut






