[an error occurred while processing this directive]
Got it! The decission works! - http://www.doomworld.com Forums


Original message

Da Snoop

melloun@email.cz
195.144.112.180

"Got it! The decission works!" , posted Thu 24 May 05:46user profileedit/delete messagepost reply


Hi, everybody!
Some days ago I posted here a question: How to make the decission? (or something like that). I've figured out how to do it (I'm posting this here, because I think somebody may use it)
:-)

I tried it on simple sector with two switches on the opposite walls. In front of one of the switches I've placed the impassable polygon (through F9), then I put the vertices (and lines) together to make simple line (this is the only way to make "repulsion line" of field, without breaking up the
level structure :-)
The simple line in front of the exit switch has the ACS_Execute special to call up the 1st script and it is 2 units in front of
real (impassable) wall.
The line (impassable wall) has Exit_Normal special.
The switch on the opposite wall has the ACS_Execute special to call up the 2nd script.

Got it? :-)

Well, here are the scripts:

#include "zcommon.acs"

//Generator on/off flag.
int gon;

script 1 (void)
{
if (!gon) {
//Print message.
print (s:"\cGSet the generator on first. Then try it again.");
}

if (gon) {
//Clear the line.
clearlinespecial();
}
}

script 2 (void)
{
//Print message.
print (s:"\cDThe generator has been set on.");

delay(35);

//Set the flag.
gon=1;
}



That's all! But this effect has a bug (I don't know it exactly, but I think it is a bug :-(
When the generator is set on and the player will activate the line in front of the exit switch, second decission in script 1 will clear the line. But the player must hit the switch again, to touch the "real" switch. Somebody may get trapped on this: "I've set on the generator, but the switch isn't working!"

Do somebody know, how to fix this "bug"?

P.S. Sorry, Lazer. I didn't tried it your way, because I don't know how to make see-through door :-(

Minigun is my favorite weapon ;)

 


Replies:

Biffy

mblakely@jpl.nasa.gov
15711332
137.79.57.172

"Re(1):Got it! The decission works!" , posted Mon 11 Jun 14:21user profileedit/delete messagepost reply


Regarding the bug, it looks as if you ought to use the clearlinespecial as part of script two, and eliminate the:

if (gon) {
//Clear the line.
clearlinespecial();


from script one. Otherwise, you are using the second execution
of script one to just clear the line. By the way, don't you
need a line ID for the clearlinespecial?

 

pming

pming@home.com
67389564
24.113.72.154

"Re(1):Got it! The decission works!" , posted Sun 27 May 23:02user profileedit/delete messagepost reply


Hiya.

Not sure if this will make a difference, but try having gon evaluate something specifically:

if(gon <1);
...

if (gon >0);
...

The scripting engine might not be happy with !gon for some reason. Worth a shot anyway....

^_^

Paul L. Ming

"Crazy? ... Crazy like a fox."
--Harry Crumb

 

 

Da Snoop

melloun@email.cz
195.144.112.180

"Re(2):Got it! The decission works!" , posted Sat 2 Jun 05:24user profileedit/delete messagepost reply


I don't know what do you mean, but the variable !gon works well. I have no trouble with it and be sure the engine "likes it" :-}
The ! symbol is the NOT declarator. I haven't tried the < or > declarator. It seems to be much difficult to use for me.
I have solved the problem with invisible line in front of the wall anyway. There's no need to use it that way. If you're interested in my newest decissions, send me mail and I'll send you some examples.

Thanx for your reply anyway. :-}

Minigun is my favorite weapon ;)