The "How do I..." Thread

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Carbine Dioxide
Posts: 1935
Joined: Thu Jun 12, 2014 3:16 pm
Location: Anywhere.

Re: The "How do I..." Thread

Post by Carbine Dioxide »

How would I add the doom palette to an actor using SLADE? If impossible, how would I add it to the sprite using SLADE?
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: The "How do I..." Thread

Post by amv2k9 »

Carbine Dioxide wrote:How would I add the doom palette to an actor using SLADE? If impossible, how would I add it to the sprite using SLADE?
You can convert sprites to any palette you need, or to several different other formats; right-click on the sprite and select "Convert To", if I have the name correct; don't have slade here in front of me to check.

A question of my own:

In this mod of mine, when the ammo is low for one of your weapons, its supposed to leech a bit of ammo when you hit enemies, bleeding or non-bleeding, with a melee attack. It's not supposed to do that on walls:

Code: Select all

ACTOR MeleeWandPuff : StaffPuff
{
 +PUFFONACTORS
 +PUFFGETSOWNER
 Translation "0:255=%[0.0,0.0,0.0]:[2.0,2.0,2.0]"
 RenderStyle "Translucent"
 ProjectileKickback 200
 Alpha 0.25
 States
 {
 Crash:
  TNT1 A 0
  TNT1 A 0 A_TakeFromTarget("SidheStamina",4)
  TNT1 A 0 A_JumpIfInTargetInventory("WarWandCrystal",25,"Puffs")
  TNT1 A 0 A_GiveToTarget("WarWandCrystal",2)
  Goto Puffs
 XDeath:
  TNT1 A 0
  TNT1 A 0 A_TakeFromTarget("SidheStamina",4)
  TNT1 A 0 A_JumpIfInTargetInventory("WarWandCrystal",25,"PuffEnd")
  TNT1 A 0 A_GiveToTarget("WarWandCrystal",2)
 Puffs:	
  TNT1 AAAAAAAA 0 A_SpawnItemEx("MeleeWandPuffSeeThru",0,0,0,frandom(2,4),0,frandom(-2,2),random(1,360))
  FRB1 EFGH 2
 PuffEnd:
  TNT1 A 1
  Stop
 Death:
  TNT1 A 0
  TNT1 A 0 A_Jump(256,"Puffs")
  Goto Puffs
 }
}
For some reason, the puff is entering the Crash state when it hits walls and giving back ammo, even though according to the wiki article on [wiki]actor states[/wiki]:
Death
Defines the normal death sequence... Also entered by projectiles when hitting a wall (or an actor as well if the Crash and/or XDeath states are not defined).
User avatar
Carbine Dioxide
Posts: 1935
Joined: Thu Jun 12, 2014 3:16 pm
Location: Anywhere.

Re: The "How do I..." Thread

Post by Carbine Dioxide »

I converted it to doom palette, and it made my sprite all weird colored.

EDIT: I think it's fixed now.
Last edited by Carbine Dioxide on Mon Sep 22, 2014 1:22 pm, edited 1 time in total.
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: The "How do I..." Thread

Post by amv2k9 »

Carbine Dioxide wrote:I converted it to doom palette, and it made my sprite all weird colored.
It helps if the sprite is close to doom palette to begin with; otherwise you'll get dropped colors, colors changed to wierd ranges, etc.
User avatar
Athel
Posts: 777
Joined: Wed Aug 21, 2013 11:31 am
Location: New Jersey

Re: The "How do I..." Thread

Post by Athel »

Rofl. OK, I'm new to (ab)using A_Jump. How do I fix my thing?
User avatar
TheMightyHeracross
Posts: 2100
Joined: Sun Aug 18, 2013 9:41 am
Location: Philadelphia, PA

Re: The "How do I..." Thread

Post by TheMightyHeracross »

edward850 wrote:It's time for another exciting round of WHEELFOLLOW THE CODE LOGIC! Today's contestant appears to be someone who doesn't pay attention to his own code! Let's watch what happens!
Dude, will you quit it with these sarcastic remarks? He posted it here for help, not to be made fun of by some scumbag for his errors.
User avatar
NeuralStunner
 
 
Posts: 12328
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: No Preference
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: The "How do I..." Thread

Post by NeuralStunner »

TheMightyHeracross wrote:Dude, will you quit it with these sarcastic remarks? He posted it here for help, not to be made fun of by some scumbag for his errors.
And hey, namecalling certainly gives you the moral high ground here.

Oh, and that there was actual sarcasm. Edward's post was more of a satire, and while it does look a bit mean-spirited, it 's still informative. In short, most of the code is never even being used, so of course it doesn't work. The issue of jumping a state to itself is also addressed.

I don't think fellowzdoomer was particularly offended, though.
User avatar
zrrion the insect
Posts: 2432
Joined: Thu Jun 25, 2009 1:58 pm
Location: Time Station 1: Moon of Glendale

Re: The "How do I..." Thread

Post by zrrion the insect »

Ed forgot to put [sarcasm][/sarcasm] around what he was saying.
User avatar
Athel
Posts: 777
Joined: Wed Aug 21, 2013 11:31 am
Location: New Jersey

Re: The "How do I..." Thread

Post by Athel »

Nah, I actually got a good laugh out of it. So... I can't have an A_Jump State reference itself?
Blue Shadow
Posts: 5040
Joined: Sun Nov 14, 2010 12:59 am

Re: The "How do I..." Thread

Post by Blue Shadow »

amv2k9 wrote:when the ammo is low for one of your weapons, its supposed to leech a bit of ammo when you hit enemies, bleeding or non-bleeding, with a melee attack. It's not supposed to do that on walls
Use the Melee state for hitting non-bleeding actors, and use the Crash state for hitting walls.

http://zdoom.org/wiki/Classes:BulletPuff
User avatar
amv2k9
Posts: 2178
Joined: Sun Jan 10, 2010 4:05 pm
Location: Southern California

Re: The "How do I..." Thread

Post by amv2k9 »

Blue Shadow wrote:Use the Melee state for hitting non-bleeding actors, and use the Crash state for hitting walls.
Thanks!
User avatar
edward850
Posts: 5886
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: The "How do I..." Thread

Post by edward850 »

fellowzdoomer wrote:Nah, I actually got a good laugh out of it. So... I can't have an A_Jump State reference itself?
Well you can but doing so as the very first frame with no delay is madness and has a remote chance of catastrophic failure.

However, your actual problem is nothing is going to your newly defined states, which has been mentioned at least 3 times now.
User avatar
Athel
Posts: 777
Joined: Wed Aug 21, 2013 11:31 am
Location: New Jersey

Re: The "How do I..." Thread

Post by Athel »

:o um... what do you mean? My revenantChase should make the ArchvileBoss chase after the player in RevenantForm, and fires in its revenant form. What has to happen in the states?
User avatar
edward850
Posts: 5886
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Re: The "How do I..." Thread

Post by edward850 »

But how does it ever get there? You aren't listening to us at all! You have a self contained set of states that all goto each other, sure, but nothing ever jumps to them in the first place. None of those frames will ever be seen.
User avatar
Athel
Posts: 777
Joined: Wed Aug 21, 2013 11:31 am
Location: New Jersey

Re: The "How do I..." Thread

Post by Athel »

*facepalm* I think I finally get it now. Jeez man. Quit yelling, people are trying to sleep! xD

I'm understanding this as I'm using A_Jump wrong.Im new at decorate, so..
Well, kinda new.

Edit: waaait... Does this mean I have to make a TurnBack state that goes to See? Or is See a general See for everything?

(This is the last time I base something on Korax.)
Locked

Return to “Editing (Archive)”