Decorate Weapon

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!)
User avatar
Beetow Brode
Posts: 69
Joined: Sat Sep 24, 2016 1:46 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: "We've Got Hostiles"

Decorate Weapon

Post by Beetow Brode »

I'm having trouble coding for a weapon thats like a foot that shoots a type of custom plasma and for some reason it doesnt wanna work. if someone could tell me what I'm doing wrong please reply! also the weird names are because I was following a tutorial. :3:

Code: Select all

ACTOR FootBoys: Weapon Replaces Chainsaw 20000 {
	Weapon.SelectionOrder 50
	Weapon.AmmoUse 5
	Weapon.AmmoGive 20
	Weapon.AmmoType "Clip"
	
	Inventory.PickupSound "weapon/getfoot"
	Inventory.PickupMessage "Why? Why someones foot?"
	
	States {
	Spawn:
	FUTF A -1
	Stop
	
	Select:
	FUTF A 1 A_RAISE
	Loop
	
	Deselect:
	FUTF A 1 A_LOWER
	Loop
	
	Ready:
	FUTF A 1 A_WEAPONREADY
	Loop
	
	Fire:
	FUTF A 4
	Goto PoopieFire
	
	PoopieFire:
	FUTR B 1 A_PlaySound("Weapon/firefoot",CHAN_WEAPON, 0.7)
	FUTR B 1 A_Recoil (9)
	FUTR B 5 A_FireCustomMissle("PoopieMissile",0,2,0,-8)
	FUTF A 5
	FUTF A 0 A_ReFire("PoopieFire")
	Goto Ready
	
	}
}

ACTOR PoopieMissile : Actor 20001 {
	+RANDOMIZE
	
	Decal "Scorch"
	Projectile
	
	Radius 6
	Height 8
	Speed 20
	Damage 10
	
	DeathSound "weapons/plasmax"
	
	States {
	Spawn
	FB AB 4 Bright
	Loop
	
	Death:
	FB BCD 4 Bright
	Stop
	}
}
Blue Shadow
Posts: 4995
Joined: Sun Nov 14, 2010 12:59 am

Re: Decorate Weapon

Post by Blue Shadow »

What's the actual problem you're having with the weapon? You neglected to mention that.
User avatar
comet1337
Posts: 876
Joined: Fri Sep 25, 2015 3:48 am
Location: elsewhere

Re: Decorate Weapon

Post by comet1337 »

your sprite names for the projetile are only 2 letters, all sprite names need to be 4
stuff with invalid sprites don't spawn IIRC
User avatar
Beetow Brode
Posts: 69
Joined: Sat Sep 24, 2016 1:46 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: "We've Got Hostiles"

Re: Decorate Weapon

Post by Beetow Brode »

Oh shit I forgot to mention that, the actual problem was A_firecustommissle is an invalid parameter. I'm wondering if this is because it has been discontinued and if I can change the parameter to something custom that doesnt have the same parameter that caused it to crash.
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

Re: Decorate Weapon

Post by wildweasel »

Even a deprecated feature should still function. Please show us the exact text of the error.
User avatar
Beetow Brode
Posts: 69
Joined: Sat Sep 24, 2016 1:46 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: "We've Got Hostiles"

Re: Decorate Weapon

Post by Beetow Brode »

User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

Re: Decorate Weapon

Post by Arctangent »

That would be because the word isn't "missle," but "missile."
User avatar
Beetow Brode
Posts: 69
Joined: Sat Sep 24, 2016 1:46 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: "We've Got Hostiles"

Re: Decorate Weapon

Post by Beetow Brode »

"simple spelling mistake"
(laughs in idiot)
User avatar
Beetow Brode
Posts: 69
Joined: Sat Sep 24, 2016 1:46 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: "We've Got Hostiles"

Re: Decorate Weapon

Post by Beetow Brode »

Code: Select all

Line58  Spawn
	Line 59  FBXX AB 4 Bright
	Line60   Loop
Now it says for LINE 58 lines must be exactly 4 chars even tho line 58 defines how it spawns.
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm

Re: Decorate Weapon

Post by Arctangent »

You have to put : after each state label. In this case, Spawn.
User avatar
Beetow Brode
Posts: 69
Joined: Sat Sep 24, 2016 1:46 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: "We've Got Hostiles"

Re: Decorate Weapon

Post by Beetow Brode »

Oh my god I think I'm really bad at making weapons now says FUTF frame A is missing rotations. How do I make it so it only has one Sprite for rotation
User avatar
wildweasel
Posts: 21706
Joined: Tue Jul 15, 2003 7:33 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): A lot of them
Graphics Processor: Not Listed

Re: Decorate Weapon

Post by wildweasel »

Beetow Brode wrote:Oh my god I think I'm really bad at making weapons now says FUTF frame A is missing rotations. How do I make it so it only has one Sprite for rotation
Name it FUTFA0. That's a zero. I'm assuming you named it FUTFA1 or something similar - you need to either have the full set of 8, or specify angle 0 for it to show for all possible rotations.
User avatar
Kappes Buur
 
 
Posts: 4141
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada

Re: Decorate Weapon

Post by Kappes Buur »

Exactly as wildweasel pointed out.

Have a look at the image at https://zdoom.org/wiki/Sprite#Angles and learn about sprite rotations, or in your case no rotation.
User avatar
Beetow Brode
Posts: 69
Joined: Sat Sep 24, 2016 1:46 pm
Graphics Processor: nVidia (Modern GZDoom)
Location: "We've Got Hostiles"

Re: Decorate Weapon

Post by Beetow Brode »

Thnk U Evry 1 who elped me, I called him Futerenth and we have become very good friends
(:

Return to “Scripting”