[Fixed] weird translucency thing

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

weird translucency thing

Postby Cyb » Sat Jan 10, 2004 2:41 am

check out the attached map. Now, if you cross over the walkover line (right in front of the player) the script triggers but the translucency of the demon texture doesn't change. However if you do puke 5 in console then the script works as intended. It also works as intended if you make it an open or enter script.

edit: heh, since randy prolly hasn't looked at this yet, I'm also curious why ACS doesn't support shorthand bit operations like x ^= 1; and such. Of course it's not a priority (nor is it in demand at all I'm sure hehe), but I'm just wondering.
You do not have the required permissions to view the files attached to this post.
Last edited by Cyb on Mon Jan 12, 2004 9:24 am, edited 1 time in total.
Joined: 15 Jul 2003

Postby HotWax » Sat Jan 10, 2004 2:48 am

The only difference I can think of between an open/enter/puke'd script and a line triggering that script is the activator, which in this case is always the player anyway. (Unless puke scripts are triggered by the world) From my limited understanding of ACS, I can't see anything in the script that would be affected by the activator. Definately seems to be a bug.
User avatar
Do what you must, and pay the price later.
Joined: 18 Jul 2003
Location: Idaho Falls, ID

Postby Xaser » Sun Jan 11, 2004 9:52 am

Did you make sure that you set the line to be activated "when player crosses"?
User avatar
Joined: 20 Jul 2003

Postby randi » Mon Jan 12, 2004 3:56 pm

Fixed. The TranslucentLine special was set so that it couldn't be used when activated by a line. I think this was to prevent lines that are given TranslucentLine specials in an editor from inadvertently being activated, but since they get their special set to 0 at load time, I don't need to worry about it.

ACS doesn't have shorthand for those because Raven didn't create any p-codes to do the job. You can use things like += because there are p-codes to add a number to a variable and store the result in the same variable. This is not the same as +, so the object code created for the following two lines is different:
Code: Select allExpand view
a = a + 5;
a += 5;

The first line creates instructions that do this:
Code: Select allExpand view
Push the value of a to the stack.
Push the number 5 to the stack.
Add the top two numbers on the stack.
Store the (new) top number on the stack in the variable a.

The second produces this set of instructions:
Code: Select allExpand view
Push the number 5 to the stack.
Add the top number on the stack to the value of variable a and store the result in variable a.

Making >>= and the like work would mean adding new pcodes or rewriting ACC to do some simple optimization. The former is easier, but it means adding many more p-codes than you might think, because a different one needs to be used for every different type of variable. Since these shortcuts really aren't necessary, I don't think it's worth adding them.
User avatar
Site Admin
Joined: 09 Jul 2003

Postby Cyb » Mon Jan 12, 2004 11:43 pm

I agree, it's not really worth the effort for operations that are used so infrequently, but thanks for the info : )
Joined: 15 Jul 2003

Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests