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
DoomKrakken
Posts: 3489
Joined: Sun Oct 19, 2014 6:45 pm
Location: Plahnit Urff
Contact:

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

Post by DoomKrakken »

Like the "Your Eternal Reward" from Team Fortress 2? While it sounds like a simple idea... the more I think about it, the more I see it's probably going to be way more than you bargained for...

If you want to restrict the playerclasses that can pick them up, then you should take a look at Inventory.RestrictedTo here. Also, take a look at the flag "+INVENTORY.RESTRICTABSOLUTELY".
User avatar
LanHikariDS
Posts: 179
Joined: Tue Aug 04, 2015 11:30 pm
Location: Playing in the snow

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

Post by LanHikariDS »

Pretty much, yes. The disguise will be a simple sprite that doesn't animate, and has a '0' Rotation value. (Honestly, I'm just doing Prop Hunt, in ZDoom)
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1120
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by Jekyll Grim Payne »

If there are several playerclasses, is there a way to disable selecting some of the in a multiplayer game?
Cansteam
Posts: 86
Joined: Fri Aug 01, 2014 9:20 pm

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

Post by Cansteam »

I have 8 enemies, marked 8 to 16 with TIDs.

Now, there are 6 water demons. Kill em, activate script 8, script argument 1 is 1.
2 flamethrower demons, script 8, script argument 1 is 2.
A lightningimp, script 8, script argument 1 is 3.

Here is the code of the wad:

Code: Select all

script 8 (void)
{
print(s:"execute");
delay(1);
    if(thingcount(0,8) && thingcount(0,9) && thingcount(0,10) && thingcount(0,11) && thingcount(0,12) && thingcount(0,13) && thingcount(0,14) && thingcount(0,15) && thingcount(0,16))
    {
    print(s:"Good job for clearing the enemies out. New switches are now available.");
    commanderkeenprompt = true;
   
}
        else
{
delay(1);
        print(s:"CASE TIME");
        acs_execute(9,0,0,0,0);
}
}

int commonsterkill;


script 9 (void)
{
switch(commonsterkill) 
    {
    case 1:
    Print(s:"WATER DEMON KILLED. ", d:commanderenemies, s:"ENEMIEs LEFT TO KILL.");
    commanderenemies --;
    break; //Stops it there
    case 2:
    Print(s:"FLAMETHROWER DEMON KILLED. ", d:commanderenemies, s:"ENEMIEs LEFT TO KILL.");
    commanderenemies --;
    break; //Stops it there
    case 3:
    Print(s:"LIGHTNING IMP KILLED. ", d:commanderenemies, s:"ENEMIEs LEFT TO KILL.");
    commanderenemies --;
    break; //Stops it there
    }
}
Now, it doesn't do anything after the "EXECUTE" or "CASE TIME" print. None. When I kill all 9 enemies, it doesn't congratulate me, and when I kill 1 enemy, it doesn't print anything else other than CASE TIME. Anyone know why?

edit: why must i be ignored?
Last edited by Cansteam on Sun Dec 13, 2015 1:43 pm, edited 1 time in total.
User avatar
TheBadHustlex
Posts: 1914
Joined: Thu Oct 03, 2013 12:50 am
Location: 'stria

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

Post by TheBadHustlex »

A short question concerning ZSDF:

When I execute a script via "special = 80", when does the script actually get executed? Right away, or when the dialog ends?
User avatar
edward850
Posts: 5904
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

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

Post by edward850 »

Any script you execute is added to the end of the script stack for operation, and the script stack will run at the end of the current tick. The only exception to this is *ExecuteWithResult, which must be run on demand to return a result (until you delay it, which it then becomes a normal script).

This excludes the rule of fresh thinkers which will run after scripts typically. The simple rule is never design anything that depends on order, because you can't predict what that order is within the tick unless it's an on demand operation.
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1120
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by Jekyll Grim Payne »

How do I make an object destructible by projectiles but not blocking hitscan attacks?
User avatar
DoomKrakken
Posts: 3489
Joined: Sun Oct 19, 2014 6:45 pm
Location: Plahnit Urff
Contact:

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

Post by DoomKrakken »

Make it a ghost. Use the "+GHOST" flag.
User avatar
Jekyll Grim Payne
Global Moderator
Posts: 1120
Joined: Mon Jul 21, 2008 4:08 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia (Modern GZDoom)
Contact:

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

Post by Jekyll Grim Payne »

DoomKrakken wrote:Make it a ghost. Use the "+GHOST" flag.
That is the exact opposite of what I need.
User avatar
DoomKrakken
Posts: 3489
Joined: Sun Oct 19, 2014 6:45 pm
Location: Plahnit Urff
Contact:

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

Post by DoomKrakken »

How so? Actors with the +GHOST flag can be hit by projectiles, but aren't affected by hitscans, by default.
Cansteam
Posts: 86
Joined: Fri Aug 01, 2014 9:20 pm

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

Post by Cansteam »

How do you change a melee attack's damagetype for a monster?
User avatar
DoomKrakken
Posts: 3489
Joined: Sun Oct 19, 2014 6:45 pm
Location: Plahnit Urff
Contact:

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

Post by DoomKrakken »

Change? Please explain further...?
User avatar
edward850
Posts: 5904
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

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

Post by edward850 »

Cansteam wrote:How do you change a melee attack's damagetype for a monster?
Melee functions have damage types defined directly.
User avatar
TheUnbeholden
Posts: 114
Joined: Sat Jan 22, 2011 5:12 am

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

Post by TheUnbeholden »

For some reason weapon.slotnumber isn't working for me. The weapon won't show up, if I try to give the weapon to the player as soon as I switch away it disappears. Is there any way to fix this? Any reason why it would not be working.. pretty sure that a KEYCONF should (in another mod I'm using) should only be overwriting Player.WeaponSlot, not Weapon.SlotNumber!
User avatar
edward850
Posts: 5904
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

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

Post by edward850 »

Do not mix the deprecated KEYCONF with other weapon slot assignment methods!
Locked

Return to “Editing (Archive)”