attack sound does not start

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!
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!)
User avatar
Enjay
 
 
Posts: 27302
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: attack sound does not start

Post by Enjay »

I suspect you only did half of what Jarewill said. Did you also add your player class to a gameinfo section in a mapinfo lump like the page Jarewill linked to suggests?
Jarewill
 
 
Posts: 1855
Joined: Sun Jul 21, 2019 8:54 am

Re: attack sound does not start

Post by Jarewill »

Have you defined the playerclass in KEYCONF?
The command that you need is addplayerclass.
Edit: Oops, I didn't saw your post again Enjay, apologies.
I was using KEYCONF the entire time, so I didn't even know it was possible in MAPINFO.
And MAPINFO's gameinfo definition still confuses me for GAMEINFO
Last edited by Jarewill on Tue Dec 24, 2019 2:47 pm, edited 1 time in total.
doommodder
Posts: 26
Joined: Mon Dec 23, 2019 12:50 pm

Re: attack sound does not start

Post by doommodder »

my pc did not save the file but the code is that, and the MAPINFO is this code

Code: Select all

GameInfo
{
   PlayerClasses = "MyPlayer"
}
User avatar
Enjay
 
 
Posts: 27302
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: attack sound does not start

Post by Enjay »

Your mapinfo calls your player "MyPlayer" and your decorate calls it "DoomPlayer2". They need to have the same name.
doommodder
Posts: 26
Joined: Mon Dec 23, 2019 12:50 pm

Re: attack sound does not start

Post by doommodder »

thanks for the tips I should have succeeded
User avatar
Redneckerz
Spotlight Team
Posts: 1146
Joined: Mon Nov 25, 2019 8:54 am
Graphics Processor: Intel (Modern GZDoom)

Re: attack sound does not start

Post by Redneckerz »

doommodder wrote:hi
now I've got another question.
I want change the pistol with another gun but my every attempt did not work, how should i do?
this is my code:
May i suggest taking a stroll through the ZDoom forums? Perhaps you can look and hazard a guess which you think is the accurate function to achieve what you want.

The reason i suggest this is because of this:
doommodder wrote:I tried as you said but it doesn't work.
You want to learn modding. This is great! But one does not learn simply from asking a question and recieving code in return - With a likely chance of it not working instantly as is the case here. So, lets try a different approach - And have you hazard a guess what the correct function should be, and perhaps, why you think it should be that function. :)
doommodder
Posts: 26
Joined: Mon Dec 23, 2019 12:50 pm

Re: attack sound does not start

Post by doommodder »

you are absolutely right, but the fact is that I am Italian and I am 15 years old.
I speak English relatively well but they are all commonly used words, nothing specific, plus I do not study computer science but I study fashion and this is because I like to make mods for doom I like it but I would not do it as a job (I mean IT).
to finish I asked how to do it just because I'm at the very first codes and I don't know what they are for so if I ask for something I will be satisfied with just a couple of links to the guides of the wiki, then I managed to do everything by myself the rest of the mod , how to add altfires and add textures and make them read by doombuilder 2.
however I understand what you mean and I agree very much, it would be easier for me if there were such detailed and precise guides also in Italian
User avatar
Enjay
 
 
Posts: 27302
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: attack sound does not start

Post by Enjay »

doommodder wrote:you are absolutely right, but the fact is that I am Italian and I am 15 years old.
I do not know a single 15 year old British native English speaker who could communicate as effectively in Italian, French, German, Spanish... as you do in English (and I know several hundred 15 year olds via my work). (Perhaps the few exceptions being people with one French (etc) parent - but then they are natively bilingual I suppose.)

Redneckerz's advice is still good though. Most of the Wiki pages are reasonably clearly written (albeit in English) and many of the pages have example code. So that could still be your first place to look when trying to figure something out. If you're struggling to figure something out from one of the pages, then you could post about it on the forum. It's always worth trying to figure something out for yourself though because that way you tend to learn it more eff4ectively and are therefore more likely to remember it next time you need it.
User avatar
Redneckerz
Spotlight Team
Posts: 1146
Joined: Mon Nov 25, 2019 8:54 am
Graphics Processor: Intel (Modern GZDoom)

Re: attack sound does not start

Post by Redneckerz »

doommodder wrote:you are absolutely right, but the fact is that I am Italian and I am 15 years old.
I speak English relatively well but they are all commonly used words, nothing specific, plus I do not study computer science but I study fashion and this is because I like to make mods for doom I like it but I would not do it as a job (I mean IT).
I figured as much (Both being non-native and being a youngster) hence why i took a different approach to this. Part of my everyday work is to explain things to people of different age, so i have to find something what works for someone.

In this thread, i noticed you have a keen interest in modding Doom through DECORATE or DEHACKED code or even source code. It never is wrong to ask a question for feedback - That's where this forum is for :) But if a question is followed by another question, instead of outputting code, i prefer guidance differently, if you know what i mean.

Neither Enjay's approach or mines is ''wrong'', its just how we both try to help you the way we best can.

Also, A+ on studying fashion and following what you want - If anything, DoomGuy could use a fashion styled mod :wink:
doommodder wrote: however I understand what you mean and I agree very much, it would be easier for me if there were such detailed and precise guides also in Italian
Unfortunately language specific guides are not a thing here yet, but Graf has been working on language support of GZDoom for some time now.

So here's this: If there is any specific background question you would want to ask that is not directly code related as Community Guide's like Enjay and Blue Shadow are finitely better at that, just write me a private message and ill try to explain to the best of my efforts. Its the least i can do. :)
User avatar
Enjay
 
 
Posts: 27302
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: attack sound does not start

Post by Enjay »

Redneckerz wrote:Neither Enjay's approach or mines is ''wrong'', its just how we both try to help you the way we best can.
For what it's worth, I don't think our methods are particularly different. My early replies provided code but from that point on I pointed doommodder towards particular wiki pages, or explained what needed to be done without fixing it myself. So, we're probably on a very similar page, maybe even the same one. ;)
User avatar
Redneckerz
Spotlight Team
Posts: 1146
Joined: Mon Nov 25, 2019 8:54 am
Graphics Processor: Intel (Modern GZDoom)

Re: attack sound does not start

Post by Redneckerz »

Enjay wrote:
Redneckerz wrote:Neither Enjay's approach or mines is ''wrong'', its just how we both try to help you the way we best can.
For what it's worth, I don't think our methods are particularly different. My early replies provided code but from that point on I pointed doommodder towards particular wiki pages, or explained what needed to be done without fixing it myself. So, we're probably on a very similar page, maybe even the same one. ;)
I disagree, your approach is terrible! How is he going to learn? :wink:

I kid i kid. The difference here lies in that you opt to keep on providing code alongside wiki links, whereas i merely make the suggestion to look into the wiki first.

Similar concepts, except you are a lot more forgiving for the topicstarter than i am. :lol:
doommodder
Posts: 26
Joined: Mon Dec 23, 2019 12:50 pm

Re: attack sound does not start

Post by doommodder »

thank you all for the support you are giving me, in addition I realized that I enjoy it more trying to reuse myself rather than copying someone else's work.
if you managed to nidirmi to the wiki pages you would help me a lot.
doommodder
Posts: 26
Joined: Mon Dec 23, 2019 12:50 pm

Re: attack sound does not start

Post by doommodder »

merry christmas
doommodder
Posts: 26
Joined: Mon Dec 23, 2019 12:50 pm

Re: attack sound does not start

Post by doommodder »

i have another problem in my wad.
I would like to replace all the weapons of doom II, all those from the pistol to the rocket launcher I managed, but when I came to have to replace the plasma gun when I start it it tells me that it did not manage to find the weapon in question (plasma gun)

Code: Select all

Actor DualLaser : Weapon replaces Plasmagun
{
	Weapon.AmmoUse 1
	Weapon.SlotNumber 6
	Weapon.AmmoGive 60
	Weapon.AmmoType "Cell"
	Inventory.PickupMessage "You picked up the Dual Laser"

	States
	{
	Ready:
		DUAL A 1  A_WeaponReady
		Loop
	Deselect:
		DUAL A 1  A_Lower
		Loop
	Select:
		DUAL A 1  A_Raise
		Loop
	Fire:
		DUAL A 0  A_FireCustomMissile ("D_Laser",0,1,4,0,0,0)
		DUAL A 0  A_FireCustomMissile ("D_Laser",0,1,-4,0,0,0)
		DUAL A 1  A_GunFlash
		DUAL A 0  A_Recoil(5)
		DUAL A 0  A_PlaySound ("FIRELASERS", CHAN_WEAPON)
		DUAL AB 2 
		DUAL CD 1 A_SetPitch (Pitch-0.50)
		DUAL DC 1 A_SetPitch (Pitch+0.50) 
		DUAL BA 5 
		DUAL A 10  A_ReFire
		DUAL A 5
		goto ready
	Hold:
		DUAL A 0  A_Jump(256, "Hold1", "Hold2", "Hold3", "Hold4", "Hold5")
		goto Held0
	Hold1:
		DUAL A 0  A_FireCustomMissile ("D_Laser",0,1,4,0,0,0)
		DUAL A 0  A_FireCustomMissile ("D_Laser",0,1,-4,0,0,0)
		goto Held0
	Hold2:
		DUAL A 0  A_FireCustomMissile ("D_Laser",2,1,4,0,0,0)
		DUAL A 0  A_FireCustomMissile ("D_Laser",2,1,-4,0,0,0)
		goto Held0
	Hold3:
		DUAL A 0  A_FireCustomMissile ("D_Laser",-2,1,4,0,0,0)
		DUAL A 0  A_FireCustomMissile ("D_Laser",-2,1,-4,0,0,0)
		goto Held0
	Hold4:
		DUAL A 0  A_FireCustomMissile ("D_Laser",1,1,4,0,0,1)
		DUAL A 0  A_FireCustomMissile ("D_Laser",1,1,-4,0,0,1)
		goto Held0
	Hold5:
		DUAL A 0  A_FireCustomMissile ("D_Laser",-1,1,4,0,0,1)
		DUAL A 0  A_FireCustomMissile ("D_Laser",-1,1,-4,0,0,1)
		goto Held0
	Held0:
		DUAL A 1  A_GunFlash
		DUAL A 0  A_Recoil(5)
		DUAL A 0  A_PlaySound ("FIRELASERS", CHAN_WEAPON)
		DUAL AB 2 
		DUAL CD 1 A_SetPitch (Pitch-0.50)
		DUAL DC 1 A_SetPitch (Pitch+0.50) 
		DUAL BA 5
		DUAL A 10  A_ReFire
		DUAL A 5
		goto ready
	Flash:
		DUAL EF 1 Bright A_Light1
		goto lightdone
	Spawn:
		DUSP A -1
		stop
		
	}
}
ACTOR D_Laser : FastProjectile
{
	Radius 13
	Height 8
	Speed 180
	Damage (5*random(5,10))
	Projectile
	+RANDOMIZE
	RenderStyle Add
	Alpha 0.75
	DeathSound "weapons/plasmax"
	Obituary "$OB_MPPLASMARIFLE"
	Decal "GatDecal"
	States
	{
	Spawn:
		LSER A 1 Bright
		Loop
	Death:
		LAZR ABCDE 4 Bright
		Stop
	}
}
doommodder
Posts: 26
Joined: Mon Dec 23, 2019 12:50 pm

Re: attack sound does not start

Post by doommodder »

hasty tell me where am i wrong?
i tried to replace the bfg9000 with the same weapon and it didn't give me any errors
Post Reply

Return to “Scripting”