Zaxtor, on 19 January 2016 - 06:26 PM, said:
It works but how we reverse it.
So the thing "undo" the blocking first wall?
I have a global tempb1,2,3 or so (works the same) as temp
Replace the
orvar temp2 1
with either
andvar temp2 32766
(32767 minus the-value-you-are-trying-to-remove)
or, if you _know_ the wall is already blocking,
xorvar temp2 1
The latter method is more useful when dealing higher bits as the maths is easier
Fox, on 19 January 2016 - 10:09 PM, said:
It's tricky, the wall pushing sound is checker internally only for hard-coded operators. I suppose stopactorsound <actor> <sound> with the player actor id should work, but I haven't tested it. It's also not a 100% solution since theoretically it would cut the sound after it has been playing for 1 tic.
I tried that way first but as you said you still get a short burst of the sound. Sounded longer than 1/30th of a second too, wonder if there is a delay between stoping a sound and it actually stopping, such as letting a audio buffer finish emptying or something (not that that would normally be an issue, just curious).
Trooper Dan, on 19 January 2016 - 11:43 PM, said:
(EVENT_WORLD) What is that?
I empirically found out that it runs once per game tic. Because my sound hack worked I think the sequence really is:
(Eduke does hardcoded wall detection, plays sounds)
EVENT_WORLD
EVENT_GAME * lots
and not
(Eduke does hardcoded wall detection, plays sounds)
EVENT_GAME * lots
EVENT_WORLD
Basically I intercepted every game event and logged a different number when each ran so I could see the order in which things ran and discovered EVENT_WORLD which until then I wrongly assumed was related to initialisation. Don't like resorting to undocumented events but EVENT_WORLD can be useful.
TTFN,
Jon