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
ReedtheStrange
Posts: 226
Joined: Sun Sep 11, 2011 3:27 pm

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

Post by ReedtheStrange »

How do I code weapons to automatically deselect after running out of ammo?
User avatar
Ravick
Posts: 2047
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

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

Post by Ravick »

You don't need to to so, its the default behavior. But if you rly want it, use a [wiki]A_JumpIfNoAmmo[/wiki] in your Ready "state".

_______

Two questions:

- How do I make an actor be afected by wind? I've noticed that weapons and most decorations do not move in this case.

- Let's say a monster have called its own instance of a script with A_ExecuteAlways. How could I make it terminate the script via ACS?
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

ReedtheStrange wrote:How do I code weapons to automatically deselect after running out of ammo?
[wiki]A_ReFire[/wiki] checks if you have ammo for one more shot, if not it does a weapon change. There is also [wiki]A_CheckReload[/wiki].
Ravick wrote:- How do I make an actor be afected by wind? I've noticed that weapons and most decorations do not move in this case.
Have you tried using [wiki=Actor_flags#WINDTHRUST]WINDTHRUST[/wiki] flag?
- Let's say a monster have called its own instance of a script with A_ExecuteAlways. How could I make it terminate the script via ACS?
[wiki]ACS_ExecuteAlways[/wiki] cannot be terminated or suspended via another script ([wiki]ACS_Terminate[/wiki] or [wiki]ACS_Suspend[/wiki]). However, you can do so from within the script itself by using [wiki]terminate[/wiki] and [wiki]suspend[/wiki] functions.
User avatar
ShadowTiger
Posts: 615
Joined: Sat Nov 07, 2009 7:32 pm
Location: New York

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

Post by ShadowTiger »

Is there a way to make a player walk over a trigger line and have a PolyObject (And its mirror) move?
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

Just change the trigger of the line to "Player walks over" instead of "Player presses use".
User avatar
ShadowTiger
Posts: 615
Joined: Sat Nov 07, 2009 7:32 pm
Location: New York

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

Post by ShadowTiger »

Yes, that's implied, though I must have had a brainfart because although a switch that you will now walk over is tied to a door, how would you die it to a polyobject? Linedef action 202 is Door Generic. What is "PolyObject Activate?" :P

This here implies that I am missing something important here.

Also I bungle polyobjects like nobody's business.
Blue Shadow
Posts: 5043
Joined: Sun Nov 14, 2010 12:59 am

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

Post by Blue Shadow »

I suggest referring to this [wiki=PolyObjects]page[/wiki]. At the bottom you'll find all of the polyobject related specials like [wiki]Polyobj_DoorSlide[/wiki], [wiki]Polyobj_DoorSwing[/wiki], [wiki]Polyobj_Move[/wiki], etc
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

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

Post by cocka »

This here implies that I am missing something important here.
The trick is that you set one of the action specials for polyobject on the line you walk over. Not on one of the lines of the specific polyobject.
User avatar
ReedtheStrange
Posts: 226
Joined: Sun Sep 11, 2011 3:27 pm

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

Post by ReedtheStrange »

Is there a way to disallow the player from selecting a weapon that is out of ammo?

Actually, I think I may have figured out how. However, my method only makes sense with throwable weapons. But then again, that's the only weapon type that I could imagine wanting to do that with.
User avatar
insightguy
Posts: 1730
Joined: Tue Mar 22, 2011 11:54 pm

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

Post by insightguy »

Is there any way to lock the player's view to a limit? They cant see whats behind them or can mouse look limited to a limited area.

How do I keep the player stationary to prevent him from moving on his own will? (acs will move the player on fixes points.)

How do i make an actor have a random colored armor? (i want to have one decorate marine actor with different colored armor for each spawn.)
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 »

ReedtheStrange wrote:Is there a way to disallow the player from selecting a weapon that is out of ammo?
If ammo isn't optional, that should be default.
User avatar
cocka
Posts: 1520
Joined: Sat Jul 02, 2011 7:21 am
Location: Hungary

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

Post by cocka »

I don't want to open a new topic for this. Just a question: Does Zdoom support the Passthru activation mode?

This wad: http://www.doomworld.com/idgames/?id=12365

uses Passthru on MAP02 at a bookcase, but it only works with Zandronum. (obviously because it is an older version of zdoom)

Will zdoom support passthru feature in the future?
User avatar
ReedtheStrange
Posts: 226
Joined: Sun Sep 11, 2011 3:27 pm

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

Post by ReedtheStrange »

What's the least glitchy way to make a blow-away wall?
User avatar
Naniyue
Posts: 884
Joined: Fri Mar 13, 2009 8:06 pm

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

Post by Naniyue »

I'm finally working on the traveling merchant for Heretics of DooM, but how can I make him work for any map without modifying the maps? He spawns after you when you start a level, but how do I activate him and thus my ACS code for shopping? I can make merchants just fine in my own map, but activating those is map dependent.

EDIT: I could just make an anytime shop HUD, but I wanted to go a little more realistic route.
User avatar
Ravick
Posts: 2047
Joined: Sun Aug 22, 2010 10:59 pm
Location: Tubarão, Brasil
Contact:

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

Post by Ravick »

How do I prevent the player from being moved by explosions or blasts for a while?

Can I do it with mass? I yes, how do I change the player's mass in game?
Locked

Return to “Editing (Archive)”