Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
scifista42

Advanced DECORATE related questions...

Recommended Posts

Hello, recently I encountered some problems when DECORATing and I would be grateful if you could enlight my mind, or rather answer several of my questions. (you should also know that I want my mod to be playable in both ZDoom and Zandronum)


1. First, the most important, what the hell is messed up with Zandronum's actor inheritance system? I noticed that when your custom weapon inherits from some of normal Doom weapons, then when you fire, the fire sound of the parent weapon is played, even if I remove all sound functions from the code. Example:

Actor Shotgun2 : Shotgun replaces Shotgun
{
  States {
    Fire:
      XXXY A 2
      XXXY B 5 A_FireBullets(6.4, 1.6, 8, 5, "BulletPuff")
      XXXY C 10
      goto Ready
  }
}
There's no sound function in the Fire state, but when playing in Zandronum, I hear sound of a shotgun. Note that in ZDoom everything is fine, I hear no sound.
This also didn't work:
Actor Shotgun2 : Shotgun 3222
And nor did this:
    Fire:
      XXXY A 2 A_PlaySound("new/mycoolsound1")
      XXXY B 5 A_FireBullets(6.4, 1.6, 8, 5, "BulletPuff")
      XXXY C 10
      goto Ready
In the example above, the weapon plays the new sound along with shotgun's sound. I tried a lot of other ploys, but finally I had to...
Actor Shotgun2 : DoomWeapon 3222
...redefine the whole shotgun code except the parts I needed to change.
So, back to the question: What the hell? :D


2. I need to make a nonblocking object vulnerable ONLY by radius damage with a certain Damage Type, and everything other (including hitscans!) must pass through and the object also shouldn't be autoaimed. I tried everything, but even if I could use NOAUTOAIM flag (which I cannot because of Zandronum), I wouldn't succeed. Bullets keep hitting the object, and when I try NOBLOCKMAP, then it becomes totally invulnerable.
Even the radius damage isn't necessary, all I need is to remove the actor when its master is killed, since all these objects are spawned by single one actor. So if the above isn't possible... would it be to make an object impervious to all kinds of damage and physical interaction, while it can be killed/removed by its master? Again, I tried this, but whenever I use NOBLOCKMAP or NOINTERACTION, the actor seems to be unkillable and unremovable, and otherwise bullets keep hitting it, autoaimed or not.


3. Is there some easy way to create an inventory item which will make the player "speak"? I want to say, to play a sound on player's VOICE channel, so it can be overriden by another speech (voice sound). I took a look at Brutal Doom code and I found it has been done by a lot of inventory checking in player's Spawn and See states. I would like to know if there's any embarassingly easier way, like making the pickup play its sound in its states? The item will be given to player by A_GiveToTarget function.


4. Is there a way to get player's current viewheight (is different when standing and when crouching), so it can be used as a function parameter for A_SpawnItemEx? I need to spawn (spawn!) a certain thing in front of player's face, even when he's crouching. But I cannot use A_FireCustomMissile or similar weapon-based functions, because the spawned thing must have a specified velocity.


*5. Not actually DECORATE, but is there an easy method (tools etc.) how to work with color translation, easier than "I need to replace dark green with pink, let's try these numbers and test ingame... Hmm, ugly, now I try these numbers... Hmm, ugly too, now try..."
Translation "152:159=20:27","76:79=28:31","247:247=39:39"

Thank you for any help! :-)

Share this post


Link to post
scifista42 said:

Not actually DECORATE, but is there an easy method (tools etc.) how to work with color translation, easier than "I need to replace dark green with pink, let's try these numbers and test ingame... Hmm, ugly, now I try these numbers... Hmm, ugly too, now try..."


Yes, there is, and it is called SLADE 3.





As for your other questions:

Zandronum bugs are Zandronum bugs. But you can always redefine a weapon's AttackSound.

For making something nonshootable yet vulnerable to splash damage, you're in luck, the VULNERABLE flag does just that. Of course, Zandronum support is not guaranteed.

For items that have special effects, read up the ZDoom wiki page for the CustomInventory item.

And player view height isn't one of the variables exposed to DECORATE expressions, but you might be able to use ACS with GetActorViewHeight and call that from a DECORATE expression with ACS_ExecuteWithResult.

Share this post


Link to post
Gez said:

Yes, there is, and it is called SLADE 3. [IMG THAT MADE ME ASHAMED]

ÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁÁhhhhhhhhhhhhhhhhhhhh!!!!!!!!!!!!!!!!!!!!!!!
Why I didn't notice it? :)

Unfortunately, VULNERABLE flag doesn't seem to be supported by Zandronum. And I understand that it complicates the situation very much. Any possibility to go round that?


But anyway thank you a lot :)

Share this post


Link to post

If you can't use VULNERABLE, you have the "ghost monster" route. Make the thing shootable, but give it a height and radius of zero. It'll be able to noclip through walls, though; but radius damage is the only way to kill it. (Along with monster melee attacks if it instigates infighting.)

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
Sign in to follow this  
×