The "How do I..." Thread

Discuss all aspects of editing for ZDoom.
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.

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

Postby amv2k9 » Sun May 13, 2012 4:22 pm

gerolf wrote:
HandGrenade.wad
How would I make the grenade in the wad I'm attaching come out from above the other sprites? When the grenade is thrown it comes out from under the hand that threw it, I want it to come from above it, so it looks like it was actually tossed.
I can't look at the code right now, but I'll give you some general pointers. Change the spawnheight in the call to A_FireCustomMissile. Also, since its a grenade, you probably want to give it some pitch, and maybe fool around with the grenade actor's Gravity property.
User avatar
amv2k9
Satanic Redux, Order & Chaos, Mutation, and Weapons of Rebellion Series Dev
 
Joined: 10 Jan 2010
Location: Southern California

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

Postby insightguy » Mon May 14, 2012 5:52 am

insightguy wrote:how do you program the player actor to switch modes when you switch weapons?


anyone?
insightguy
 
Joined: 23 Mar 2011

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

Postby cypherphage » Mon May 14, 2012 9:48 am

What do you mean "switch modes"?
User avatar
cypherphage
 
Joined: 27 Feb 2011

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

Postby insightguy » Mon May 14, 2012 12:00 pm

switch sprites. ex. player holding a rifle switches into player holding shotgun
insightguy
 
Joined: 23 Mar 2011

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

Postby cypherphage » Mon May 14, 2012 5:34 pm

A_SelectWeapon seems like what your looking for
User avatar
cypherphage
 
Joined: 27 Feb 2011

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

Postby ChronoSeth » Mon May 14, 2012 5:36 pm

No... I think he wants the player's sprites to change depending on which weapon is selected.

Which would require a whole lot of A_JumpIfInventory hacks, and even then it might not work right.
User avatar
ChronoSeth
You are totally unique... just like everyone else.
 
Joined: 05 Jul 2010

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

Postby Enjay » Mon May 14, 2012 5:54 pm

Is it possible for the player HUD sprites to show the translation being used by the player? ie If I made some weapon sprites with green bits on them somewhere, could I make it so that the green bits changed to the colour that the player sprite has been set to in the options menu?

I think the answer is no but I just thought that I'd check.
User avatar
Enjay
The Force is strong with this one.
 
Joined: 15 Jul 2003
Location: Scotland

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

Postby insightguy » Tue May 15, 2012 12:03 am

@enjay:
I don't think so either. tried and failed.

@ChronoSeth:
the guy who made super skulltag seems to have acomplished that. sarge mark from brutal doom also did it.
insightguy
 
Joined: 23 Mar 2011

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

Postby cypherphage » Tue May 15, 2012 4:06 am

I am pretty sure that none of the hud drawing routines allow translations; although hudmessage allows for translation I am not sure it works with images. You best bet is probably the textures lump.

If you want the player to have different sprites based upon the weapon he is holding, look into playerpawn. I believe you would have to set up a new state per weapon for each state defined in the player pawn and jump to the correct one in each state. for instance

Code: Select allExpand view
//...
Spawn:
    PLAY A 0 A_JumpIfInventory("ShotgunSelected",1,"ShotgunSpawn")    // a check for each weapon like this
    ...
    PLAY A 4 //the final default sprite
   loop
ShotgunSpawn: //each state needs a custom like this
   PLAS A 4
   goto Spawn:
   ...


It would be a pain, so ask yourself how worth it it is
User avatar
cypherphage
 
Joined: 27 Feb 2011

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

Postby ChronoSeth » Tue May 15, 2012 6:34 am

insightguy wrote:@ChronoSeth:
the guy who made super skulltag seems to have acomplished that

He used a specific feature in skulltag which allows it to easily be done. It's a lot more complicated in zdoom.
User avatar
ChronoSeth
You are totally unique... just like everyone else.
 
Joined: 05 Jul 2010

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

Postby insightguy » Tue May 15, 2012 9:30 am

may i ask what that feature is?
insightguy
 
Joined: 23 Mar 2011

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

Postby jpalomo » Tue May 15, 2012 10:08 am

User avatar
jpalomo
 
Joined: 17 May 2010

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

Postby Xtyfe » Tue May 15, 2012 11:52 am

I'm wondering if it's currently possible to stack armor, like how is works in quake games. For example, green armor in quake2 gives 25 armor points but can be stacked to give 50.
Xtyfe
 
Joined: 14 Dec 2007
Location: Kitchener, Ontario

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

Postby ChronoSeth » Tue May 15, 2012 11:56 am

A combination of CustomInventory, BasicArmorBonus, and A_JumpIfArmorType can achieve that effect with some trial and error.
User avatar
ChronoSeth
You are totally unique... just like everyone else.
 
Joined: 05 Jul 2010

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

Postby insightguy » Tue May 15, 2012 10:19 pm

cypherphage wrote:I am pretty sure that none of the hud drawing routines allow translations; although hudmessage allows for translation I am not sure it works with images. You best bet is probably the textures lump.

If you want the player to have different sprites based upon the weapon he is holding, look into playerpawn. I believe you would have to set up a new state per weapon for each state defined in the player pawn and jump to the correct one in each state. for instance

Code: Select allExpand view
//...
Spawn:
    PLAY A 0 A_JumpIfInventory("ShotgunSelected",1,"ShotgunSpawn")    // a check for each weapon like this
    ...
    PLAY A 4 //the final default sprite
   loop
ShotgunSpawn: //each state needs a custom like this
   PLAS A 4
   goto Spawn:
   ...


It would be a pain, so ask yourself how worth it it is

won't be to much of a pain for me cause I can use the same token actors for my weapons for that.
insightguy
 
Joined: 23 Mar 2011

PreviousNext

Return to Editing

Who is online

Users browsing this forum: cocka, Google [Bot], KingShinra and 4 guests