Page 1 of 1
Doom in Hexen format issue
Posted: Thu May 09, 2013 6:02 am
by Powerman
Well I am trying to have it so I get a Red key, then lower a few pillars, but There is no way (That I see) of making the sectors or lines need the red key to lower.
RE: Doom in Hexen format issue
Posted: Thu May 09, 2013 6:27 am
by agaures
In Doom in Hexen format, when you look at the properties of a 'thing', it should have a tab named 'action'. In there you can define what you want to happen after the 'thing' is either destroyed or picked up.
RE: Doom in Hexen format issue
Posted: Thu May 09, 2013 2:19 pm
by Powerman
Let me try to elaborate more. So I have so pillars blocking a bridge you need to get over. I want the player to have to get the red key, then press use to lower the pillars, while having the red key. I hope that was slightly more clear.
RE: Doom in Hexen format issue
Posted: Thu May 09, 2013 2:25 pm
by Ænima
Powerman wrote:
Let me try to elaborate more. So I have so pillars blocking a bridge you need to get over. I want the player to have to get the red key, then press use to lower the pillars, while having the red key. I hope that was slightly more clear.
Then you'd have to lower them in a script.
http://zdoom.org/wiki/ACS_LockedExecute
RE: Doom in Hexen format issue
Posted: Thu May 09, 2013 2:28 pm
by Powerman
Thanks :/ I was hoping not to have to resort to ACS, but thanks!
Than am I missing something?
Code: Select all
#include "zcommon.acs"
script 1 (void)
{
if (CheckInventory("RedCard") || CheckInventory("RedSkull"))
{
Print(s:"You use the red key.");
Floor_LowerToNearest (6, 40);
}
else
Print(s:"You need the red key.");
}
RE: Doom in Hexen format issue
Posted: Fri May 10, 2013 3:39 am
by agaures
Powerman wrote:
Thanks :/ I was hoping not to have to resort to ACS, but thanks!
Than am I missing something?
Code: Select all
#include "zcommon.acs"
script 1 (void)
{
if (CheckInventory("RedCard") || CheckInventory("RedSkull"))
{
Print(s:"You use the red key.");
Floor_LowerToNearest (6, 40);
}
else
Print(s:"You need the red key.");
}
You could use the
setlinespecial instead. I find it a lot more flexible.
RE: Doom in Hexen format issue
Posted: Fri May 10, 2013 3:43 am
by Powerman
So How would something like this work? I am completely lost.
RE: Doom in Hexen format issue
Posted: Fri May 10, 2013 4:07 am
by Qent
Oh, I think agaures is suggesting that getting the red key activates a script that enables the switch. I would not recommend that. I would recommend Ænima's method. If you really don't want ACS, then you could use the old method of making the switch itself a locked door that conceals another switch.
RE: Doom in Hexen format issue
Posted: Fri May 10, 2013 4:09 am
by agaures
Gah, never mind. setlinespecial wouldn't work properly in doom in hexen format in this situation. I would highly recommend using UDMF format.
(BTW to make your map cheat proof you could use a bool)
RE: Doom in Hexen format issue
Posted: Fri May 10, 2013 4:13 am
by Powerman
Bool? and I may just sadly switch to Doom in doom? Much easier. Well maybe. I do not know. This should not be so difficult. or at least not such a steep learning curve. And do I need to do anything special with my sector? Besides tagging it?
RE: Doom in Hexen format issue
Posted: Fri May 10, 2013 4:22 am
by agaures
Code: Select all
#include "zcommon.acs"
bool redcard = FALSE;
script 1 (void)
{
if(redcard==TRUE)
{
door_open(1, 16);
}
else
{
print(s:"g3t r3d c3rd!?!?!");
}
}
script 2 (void)
{
redcard = TRUE;
}
In a bool you would have to assign the door linedef to execute script 1, then you would assign the recard to execute script 2.
RE: Doom in Hexen format issue
Posted: Fri May 10, 2013 4:28 am
by Powerman
I figured it out

I forgot to tag lines as execute. Thank you all for helping a Dolt such as myself.