The "How do I..." Thread
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.
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.
- TheDoomGuy
- Posts: 260
- Joined: Thu Dec 14, 2006 4:08 am
Re: The "How do I..." Thread
Fixed, nevermind.
Last edited by TheDoomGuy on Thu Oct 14, 2010 11:06 pm, edited 1 time in total.
- Salad Viking
- Posts: 752
- Joined: Tue Apr 20, 2010 8:58 pm
- Location: In high orbit
Re: The "How do I..." Thread
Why are you using cluster 5? Try redefining cluster 1 and using that (it shouldn't make a difference, though).
Re: Hubs and ACS math
Yes, I followed the wiki's directions and created the .o file with the A_START and A_END file headers and inserted them into the wad. I appended the map scripts to import the library file, but Doom Builder's ACS script compiler simply comes up with, "Invalid Declarator."b00mstick wrote:Did you compile the included script as a [wiki]library[/wiki], and used correct [wiki]scope[/wiki] for data types? Make sure you're using #import for libraries, as noted in wiki.Dave_B wrote:At the moment I'm creating a hub based wad that utilizes Doom 3 and Quake 4 style 'objectives' messages that can reviewed with the press of a key. This seems to be working ok within the same map, but if i leave the map nothing appears until i return to the map in which the it was activated. I am using an external script which is included by each map's own script for the necessary scripting to try and make it 'global'. Also, I have had the same problem using the switch counting function. How do I fix this?
Re: The "How do I..." Thread
Can you show me the code? PM it to me if you'd like. I'll figure it out for you.
- Demolisher
- Posts: 1749
- Joined: Mon Aug 11, 2008 12:59 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Winchester, VA
- Contact:
Re: The "How do I..." Thread
I could never get #import to work either. I just gave up and used global variables and redefined functions.
Re: Hubs and ACS math
Problem has been fixed, thanks anyway.Dave_B wrote:Yes, I followed the wiki's directions and created the .o file with the A_START and A_END file headers and inserted them into the wad. I appended the map scripts to import the library file, but Doom Builder's ACS script compiler simply comes up with, "Invalid Declarator."b00mstick wrote:Did you compile the included script as a [wiki]library[/wiki], and used correct [wiki]scope[/wiki] for data types? Make sure you're using #import for libraries, as noted in wiki.Dave_B wrote:At the moment I'm creating a hub based wad that utilizes Doom 3 and Quake 4 style 'objectives' messages that can reviewed with the press of a key. This seems to be working ok within the same map, but if i leave the map nothing appears until i return to the map in which the it was activated. I am using an external script which is included by each map's own script for the necessary scripting to try and make it 'global'. Also, I have had the same problem using the switch counting function. How do I fix this?
Re: The "How do I..." Thread
Would anyone know how to create a forcefield effect where the field is invisible by default but briefly fades into visibility and out again when shot or bumped repeatedly, if this is at all possible? I've tried a rudimentary effect that does this, but only for each odd number it gets shot (i.e. 1st, 3rd, 5th times etc.).
Re: The "How do I..." Thread
You could do that pretty simply. Set up an invisible line with your forcefield, make it "block everything". Set it's activation to "player bumps" and "projectile hits", and "monster bumps" if you wish. Create a script like this. Make sure you give the line the spcial 226, [wiki]ACS_ExecuteAlways[/wiki] and not plain [wiki]ACS_Execute[/wiki] or it will wait each time for the script to run it's course.
Code: Select all
script 5 (int f)
{
int a;
for(a = 0; a < 60; a +=3)
{
translucentline(f,a);
delay(1);
}
for(a = 60; a > 0; a -=3)
{
translucentline(f,a);
delay(1);
}
}
Re: The "How do I..." Thread
Thanks for that, works great 

- juizzysquirt
- Posts: 126
- Joined: Sun Jan 04, 2009 3:29 pm
- Location: Knee-Deep in L.A. Meltdown
Re: The "How do I..." Thread
Here's the deal: I've made a PDA for player as a weapon, I have custom key that starts the ACS-script that uses SetWeapon to bring it up and set up inner workings. The script has a suspend; -command, but I'm having trouble selecting back the previous weapon.
Is there a function that returns the class name of currently selected weapon as a string? That could be used in beginning of the script for that purpose. I'd like this to work with any weapons mod, so setting up an array of predefined strings won't do. I don't want the PDA to be accessible by browsing through weapons either...
Doesn't the flashlight in some D3-mod work this way?
Is there a function that returns the class name of currently selected weapon as a string? That could be used in beginning of the script for that purpose. I'd like this to work with any weapons mod, so setting up an array of predefined strings won't do. I don't want the PDA to be accessible by browsing through weapons either...
Doesn't the flashlight in some D3-mod work this way?
- 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
Not really. There's [wiki]CheckWeapon[/wiki], but that returns a True or False on the class name you give it. There's really no other way around it I'm afraid, you're dealing with a technical limitation of ACS.b00mstick wrote:Is there a function that returns the class name of currently selected weapon as a string?
- juizzysquirt
- Posts: 126
- Joined: Sun Jan 04, 2009 3:29 pm
- Location: Knee-Deep in L.A. Meltdown
Re: The "How do I..." Thread
Too bad...NeuralStunner wrote:Not really. There's [wiki]CheckWeapon[/wiki], but that returns a True or False on the class name you give it. There's really no other way around it I'm afraid, you're dealing with a technical limitation of ACS.b00mstick wrote:Is there a function that returns the class name of currently selected weapon as a string?
Wait, wouldn't it be possible to replace the base Weapon-class and add there custom states for raising and lowering pda? That would be inherited automatically to every custom weapon?

- 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
No. It doesn't work that way.b00mstick wrote:Wait, wouldn't it be possible to replace the base Weapon-class and add there custom states for raising and lowering pda?
- juizzysquirt
- Posts: 126
- Joined: Sun Jan 04, 2009 3:29 pm
- Location: Knee-Deep in L.A. Meltdown
Re: The "How do I..." Thread
Uups, I forgot SetActorState doesn't work for weapons, and there really isn't way to replace base class. Well, maybe it would be selected just like normal weapon then...
- Demolisher
- Posts: 1749
- Joined: Mon Aug 11, 2008 12:59 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Winchester, VA
- Contact:
Re: The "How do I..." Thread
Not a How Do I..., but what is the limit on user variable arrays?