Page 47 of 972

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

Posted: Tue Oct 12, 2010 12:07 pm
by TheDoomGuy
Fixed, nevermind.

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

Posted: Tue Oct 12, 2010 12:53 pm
by Salad Viking
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

Posted: Tue Oct 12, 2010 7:30 pm
by Dave_B
b00mstick wrote:
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?
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.
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."

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

Posted: Tue Oct 12, 2010 7:55 pm
by Ceeb
Can you show me the code? PM it to me if you'd like. I'll figure it out for you.

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

Posted: Tue Oct 12, 2010 8:31 pm
by Demolisher
I could never get #import to work either. I just gave up and used global variables and redefined functions.

Re: Hubs and ACS math

Posted: Tue Oct 12, 2010 10:29 pm
by Dave_B
Dave_B wrote:
b00mstick wrote:
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?
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.
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."
Problem has been fixed, thanks anyway.

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

Posted: Wed Oct 13, 2010 8:17 am
by Dave_B
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

Posted: Wed Oct 13, 2010 11:26 am
by Ceeb
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

Posted: Wed Oct 13, 2010 10:25 pm
by Dave_B
Thanks for that, works great ;)

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

Posted: Tue Oct 19, 2010 11:02 am
by juizzysquirt
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?

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

Posted: Tue Oct 19, 2010 11:13 am
by NeuralStunner
b00mstick wrote:Is there a function that returns the class name of currently selected weapon as a string?
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.

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

Posted: Tue Oct 19, 2010 11:31 am
by juizzysquirt
NeuralStunner wrote:
b00mstick wrote:Is there a function that returns the class name of currently selected weapon as a string?
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.
Too bad...

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? :wink:

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

Posted: Tue Oct 19, 2010 11:42 am
by NeuralStunner
b00mstick wrote:Wait, wouldn't it be possible to replace the base Weapon-class and add there custom states for raising and lowering pda?
No. It doesn't work that way.

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

Posted: Tue Oct 19, 2010 11:49 am
by juizzysquirt
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...

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

Posted: Sat Oct 23, 2010 5:08 pm
by Demolisher
Not a How Do I..., but what is the limit on user variable arrays?