(solved) How to tell the player when an monster is nearby?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
-
YuNoGuy123
- Posts: 7
- Joined: Wed Nov 02, 2016 6:28 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
(solved) How to tell the player when an monster is nearby?
Currently trying to make a system that tells the player when an enemy is close to them, Have absolutely no clue what i'm doing.
Last edited by YuNoGuy123 on Sat Jun 08, 2019 11:52 am, edited 1 time in total.
Re: How to tell the player when an monster is nearby?
With A_RadiusGive, you can give items to actors around the player. The item, in it's AttachToOwner function override, checks if it's a monster and if yes, gives another item back to the player before removing itself. The presence of the second item in the player's inventory then tells the player that a monster is near.
Edit:
There's also RoughMonsterSearch listed in ZScript actor functions, it's not documented but sounds like it would make things much easier.
Edit:
There's also RoughMonsterSearch listed in ZScript actor functions, it's not documented but sounds like it would make things much easier.
-
YuNoGuy123
- Posts: 7
- Joined: Wed Nov 02, 2016 6:28 pm
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia with Vulkan support
Re: How to tell the player when an monster is nearby?
Got it working pretty quickly with A_RadiusGive, thank you!