Working light-based stealth system ?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

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!)
Post Reply
User avatar
Hgluzowski
Posts: 47
Joined: Sun Jul 08, 2018 8:11 am

Working light-based stealth system ?

Post by Hgluzowski »

Alright, so I am making a mod that will be based around light-based stealth system, but I don't have really a clue how to make it work.

Also, I want add new hud element that will indicate the light level of current player's location (including dynamic lights) that will appear in more classic HUD and that without bar HUD.
User avatar
Void Weaver
Posts: 724
Joined: Thu Dec 18, 2014 7:15 am
Contact:

Re: Working light-based stealth system ?

Post by Void Weaver »

Well, I guess there is no simple answer for such "simple" question, since stealth mechanics is quite complicated system and apparently it impossible simulate true stealth system without ACS\Zscript scripting or (probably) a lot of DECORATE spaghetti-hacks.

And ofc you must write whole bestiary from scratch for such system. As shows a quite good example of similar system in SneakyDoom (here official thread but all links are dead), the monsters may be inherited from a few basic ones. In general, the similar question already was discussed here.
Spoiler: just demo of SneakyDoom
The main decorate f-tions for monster-actors most likely will be A_LookEx(LOF_NOSOUNDCHECK|LOF_NOSEESOUND), A_JumpIfTargetInLOS, A_ClearTarget, A_Wander, and different inventory f-tions.

What about "true" invisibility power regardless of stealth system it can be made with help of SetPlayerProperty(0,1,PROP_NOTARGET) and A_ClearTarget, OR via getting of double PowerInvisibility with Powerup.Mode "Cumulative". I mean something like this.
User avatar
Hgluzowski
Posts: 47
Joined: Sun Jul 08, 2018 8:11 am

Re: Working light-based stealth system ?

Post by Hgluzowski »

Ok, I excepted that, but what about new hud element, I mean, it can be done by (whatever)INFO, but to make it work on basis that changes if some set light level is reached.

This is basically what I want to do:
https://vignette.wikia.nocookie.net/thi ... 0417012524
Post Reply

Return to “Scripting”