scifista42
Member

Posts: 308
Registered: 05-12 |
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:
code:
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:
code:
Actor Shotgun2 : Shotgun 3222
And nor did this:
code:
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...
code:
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..."
code:
Translation "152:159=20:27","76:79=28:31","247:247=39:39"
Thank you for any help! :-)
|