[Fixed] weird translucency thing

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

weird translucency thing

Post by Cyb »

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.
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

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
Xaser
 
 
Posts: 10773
Joined: Sun Jul 20, 2003 12:15 pm

Post by Xaser »

Did you make sure that you set the line to be activated "when player crosses"?
User avatar
randi
Site Admin
Posts: 7749
Joined: Wed Jul 09, 2003 10:30 pm

Post by randi »

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 all

a = a + 5;
a += 5;
The first line creates instructions that do this:

Code: Select all

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 all

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.
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

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

Return to “Closed Bugs [GZDoom]”