Workaround for Bug #806

Questions specific to OpenMW-CS can be asked, and content development related topics can be discussed here
Post Reply
User avatar
NatalieN
Posts: 43
Joined: 30 Nov 2015, 21:32

Workaround for Bug #806

Post by NatalieN »

Any idea on how to get "one way walls" to work in OpenMW? I'm trying to come up with a workaround for #806 (https://bugs.openmw.org/issues/806). What I'm looking for is some way that the player can walk through an object one direction, but not the other. I'm trying to make a maze where walls appear behind players when they turn around. The ticket suggests that it can be done with scripting, but I'm drawing a blank on how to do that.
User avatar
DestinedToDie
Posts: 1181
Joined: 29 Jun 2015, 09:08

Re: Workaround for Bug #806

Post by DestinedToDie »

I'm thinking you could place an invisible scripted object to the area after the wall and attach a script that checks if getplayerdistance = certain amount, then add a wall.
User avatar
silentthief
Posts: 456
Joined: 18 Apr 2013, 01:20
Location: Currently traversing the Ascadian Isles

Re: Workaround for Bug #806

Post by silentthief »

NatalieN wrote:Any idea on how to get "one way walls" to work in OpenMW? I'm trying to come up with a workaround for #806 (https://bugs.openmw.org/issues/806). What I'm looking for is some way that the player can walk through an object one direction, but not the other. I'm trying to make a maze where walls appear behind players when they turn around. The ticket suggests that it can be done with scripting, but I'm drawing a blank on how to do that.
IIRC in Morrowind this was the default behavior of the interior cells. I recall being so augmented with levitate and speed that I somehow flew through the wall of the mages guild, and was looking into it from outside (in the void). I have not tried 3D creation for Morrowind in a while, and I only dabbled at it before; so I don't know the answer to this --> isn't it possible to set up collision on a wall on only one side? then the wall would just need to be placed and the rest would work itself out.

regarding scripting -- if you need to do this with scripting you would want to set up something like a floor trigger (a section of floor that is the same looking as whatever floor that you are using -- but is the trigger for the wall to become enabled or otherwise active. The triggering script for that floor section would have a check run for "getstandingPC" http://www.uesp.net/morrow/editor/mw_cs ... standingpc

then when the Player walks on it -- then trigger the wall. If you need a suggestion on how to set the entire script up -- feel free to ask and I can toss you an example.

ST
PS -- I *still* think that this should not require a script to set up. Just not able to give you a definite. Perhaps one of the users that are more familiar with 3D could answer this...
User avatar
DestinedToDie
Posts: 1181
Joined: 29 Jun 2015, 09:08

Re: Workaround for Bug #806

Post by DestinedToDie »

silentthief wrote:isn't it possible to set up collision on a wall on only one side? then the wall would just need to be placed and the rest would work itself out.
Read the bug. https://bugs.openmw.org/issues/806

OpenMW collision doesn't work like that at the moment.
User avatar
sjek
Posts: 442
Joined: 22 Nov 2014, 10:51

Re: Workaround for Bug #806

Post by sjek »

there's possibly more on the subject in the deapth of this forum (like from many others)
but anyway if memory again serves right the disable enable setdelete was fixed for openmw. disable atleast shouldn,t be needed anymore for setdelete frametiming.

also getlos and forcesneak should work

in other hand it should be bugfree to call disable from wall's script itself
something like

Code: Select all

playersneaking -> getdistance from ash urn (or the wall) 
-> if crossed the unique stand or very narrow looking guard -> enable or disable the wall in question and forcesneak

->experiments? with startcombat
and then on the other hand if that bug is fixed someday, would it be better to handle in openmw-cs leaving both options open. basically someting like internal attributes system for objects which might be easier to handle from gamedata than scripts
raven
Posts: 66
Joined: 26 May 2016, 09:54

Re: Workaround for Bug #806

Post by raven »

From my understanding bullet collision mesh code uses triangle vertex positions only, can not differentiate between inside and outside. One would have to implement an extra variant (that uses vertex normals?) to handle one sided collisions.
User avatar
silentthief
Posts: 456
Joined: 18 Apr 2013, 01:20
Location: Currently traversing the Ascadian Isles

Re: Workaround for Bug #806

Post by silentthief »

DestinedToDie wrote:
silentthief wrote:isn't it possible to set up collision on a wall on only one side? then the wall would just need to be placed and the rest would work itself out.
Read the bug. https://bugs.openmw.org/issues/806

OpenMW collision doesn't work like that at the moment.
Makes sense (and yeah, I answered before reading the bug report, sorry). This is difference between gamebryo (original morrowind) 3D engine versus bullet. As complete as openmw is to recreate the Morrowind gameplay, I forget that its not exactly the same.

This may mean that scripting HAS to be the answer.

ST
Post Reply