Page 1 of 1

Alarmpoint Problem

Posted: 23 May 2020, 11:06
by fashahhh
This is probably an easy solve but I can't seem to figure it out.

I have a higher and lower path. When the player uses the higher path they activate a trigger in which the enemy charges the player to the alarmpoint which works fine.

When the player uses the lower path however they avoid the trigger so they can surprise the enemy. In this case the enemy should stand their ground and fight however when you encounter them they instead run off to the alarm point.

Would there be any way to stop them running off when approaching them from the lower path?

Re: Alarmpoint Problem

Posted: 24 May 2020, 06:40
by Buff Skeleton
Unfortunately not, as enemies will always move to their AlarmTag if they have one set as soon as they are triggered, either by an actual trigger or by player sight / contact.

One thing you could do, though, is a bit hacky: have two instances of the Skaarj. One with an AlarmTag placed in the map, and one without in a cube somewhere far away outside the level, but on a trap door right above a teleporter. If the player goes down the lower path, swap the two Skaarj by having it the mover drop, causing the no-alarm Skaarj to teleport in on top of the existing one and telefrag it. Downside: possibly audible death sound, possibly visible blood and gibs.

Or if you're comfortable with UScript, have a custom trigger that removes the first Skaarj and spawns in the second one. You might even be able to just use a custom actor that removes the Skaarj's AlarmTag when triggered instead of spawning in a whole new one. I'm not sure if the engine stores the AlarmTag in memory when the game initializes (like TeamTag) or if it just references it when first triggered. If the latter, swapping it in realtime would work as long as it hasn't been triggered already.

Re: Alarmpoint Problem

Posted: 24 May 2020, 10:48
by fashahhh
Thanks for the response Buff Skeleton. I've tried all sorts to get it working (spawnpoints etc.) and it's much simpler than I first thought. Even though they are a good distance away I placed the Alarmpoint right in front of them. Somehow this alerts them enough to use the pathnodes right to the player. This also works when approaching from the lower side as they will stand their ground now.

Re: Alarmpoint Problem

Posted: 24 May 2020, 18:40
by Buff Skeleton
Ah nice, that works! I thought you needed them to move a longer distance, but if they just basically need to be alerted, then yeah, a single short-distance AlarmPoint would do. Once they reach it, they should break and attack as usual unless you set a pause time or whatever, but without any of that, they'll then switch back to the regular path network. Good solution!