Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Patrick

Some more DECORATE questions?

Recommended Posts

Is there a way to detect whether or not an enemy was killed in one shot? I'd like to avoid using ACS if at all possible. I'd played with the possibility of using monster pain states, but this hasn't worked for me too well so far.

The next thing is charging weapons. Does anyone know a mod that has a weapon that allows you to press and hold to charge it? I'd like to see code for it, or if anyone has any ideas on how to do it. The charger in the WRW wad is crap and doesnt work too well for what I want.

Check out 1:05 for what I mean

EDIT: also, is there a way to change crosshair color in ZDoom (without having it tied to health?)

Share this post


Link to post
Patrick said:

Is there a way to detect whether or not an enemy was killed in one shot? I'd like to avoid using ACS if at all possible. I'd played with the possibility of using monster pain states, but this hasn't worked for me too well so far.

It's very hacky, but that's the only way I can think of in pure DECORATE:
1. Give the monster a maximum painchance, so that whenever it's hurt, it goes in its pain state.
2. In its pain state, use A_GiveInventory to give it a token "woundcount" item.
3. In its death state, you can use A_JumpIfInventory to go to a "several shots" death state, and if the jump isn't performed, then it's because the monster was brought directly into its death state without ever getting into the pain state -- a clean one-shot kill, in other words.

The problem being that it results in very ticklish monsters that are easy fodder for a chaingun. But there are no other ways of reliably detecting if the monster is dealt damage without using an ACS script to constantly monitor its health.

Patrick said:

The next thing is charging weapons. Does anyone know a mod that has a weapon that allows you to press and hold to charge it? I'd like to see code for it, or if anyone has any ideas on how to do it. The charger in the WRW wad is crap and doesnt work too well for what I want.

Eriance's Demon Eclipse. The railgun and the devastator, for example.

Patrick said:

EDIT: also, is there a way to change crosshair color in ZDoom (without having it tied to health?)

As a user setting, yes. Hit the console, type "cros<tab>" and it'll show you the different console variables that influence color. Crosshaircolor is one of them.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×