Hello,
I've been trying to generate some scripts to have NPCs bashing custom placeables when they are near them. The idea is something similar to how NPCs react when they have a door blocking their way.
So far I've been able to get the NPCs attack the placeable object, but after only one attack, they just keep going.
Any suggestions on how to have them attack until the placeable object is destroyed? Any help is appreciated. Thanks!
NPC bashing placeable
Débuté par
Avalancho33
, sept. 13 2011 10:06
#1
Posté 13 septembre 2011 - 10:06
#2
Posté 13 septembre 2011 - 10:18
post your script.
#3
Posté 13 septembre 2011 - 10:36
Right now I'm at work, I thought I had a copy of the script on this computer.
Basically, it works like this. I went with a script OnHeart running on the placeable that does the following:
Checks if there is a NPC within range using CheckEnemyGroupingOnTarget()
Loop through the NPCs using GetNearestCreature()
Use AssignCommand Clear all actions for the NPC
Use AssignCommand to ActionAttack the placeable.
It works for the first attack and then the NPC ignores the object and keeps moving.
I can post the script I have once I get home.
Basically, it works like this. I went with a script OnHeart running on the placeable that does the following:
Checks if there is a NPC within range using CheckEnemyGroupingOnTarget()
Loop through the NPCs using GetNearestCreature()
Use AssignCommand Clear all actions for the NPC
Use AssignCommand to ActionAttack the placeable.
It works for the first attack and then the NPC ignores the object and keeps moving.
I can post the script I have once I get home.
#4
Posté 13 septembre 2011 - 11:50
#include "nw_i0_generic" at the top of your script then use DetermineCombatRound(oChest) instead of ActionAttack
#5
Posté 14 septembre 2011 - 03:15
Tested it last night, it worked. Thanks a lot!
#6
Posté 14 septembre 2011 - 05:30
Lightfoot8 wrote...
#include "nw_i0_generic" at the top of your script then use DetermineCombatRound(oChest) instead of ActionAttack
Now that's sharp..





Retour en haut






