Portal only works as doorway ONCE - advice?

Post » Sun Aug 14, 2011 1:35 pm

I would like some help with a very technical and specific issue I'm having with the Construction set, please:

I renamed the "MQ06ParadisePortal" door object to create a new form, so that I could use that most excellent and groovy portal in a mod. I also created a new "lever" Activator object for my mod, so that I could attach a custom script to it, if necessary. So far, I have the following scenario working smoothly:

Flip the lever -> the portal plays its "Equip" animation, then loops the "Forward" animation without issue.
Once the "Forward" animation is looping the portal becomes a useable door, as it should, and I can teleport back and forth as with any regular door I've made before.
When done, flip the lever a second time and the portal plays its "Unequip" animation, basically "shutting the door" as it were.

My problem is that when I flip the lever again (a third time), the portal plays its "Equip" animation without problem, and goes into the "Forward" loop, but NEVER becomes a useable door again. The lever will "open" and "close" the portal using its animations, but the stupid thing won't let me activate it and port through to my door on the other side, lol. I've discovered that if I bring up the console, select the portal, and use 'disable' and 'enable' on it, the functionality of a door is returned, until I turn it off again. This leads me to assume that if the script I've attached to the portal would disable and then re-enable it, I could use it as intended. I've experimented for four hours in the CS with little luck; I was able to get the script to disable the portal permanently once, and my most recent iteration of the script put me back at square one: the portal opens and closes successfully, but I can't tell if it's actually being disabled and then re-enabled or not (it certainly doesn't appear to be, since the doorway functionality is never restored). In the object properties of the portal itself, I've unchecked the box for "minimal use" and "hidden" though I haven't been able to find out what those mean, precisely. Neither box had any effect on the function of the portal as a doorway, that I could tell. Any advice would be most greatly appreciated. :-)


The script looks like this:

scn 00portalactivatescript

short stage

begin onActivate

if stage == 0 && isActionRef ArenaSwitchRef =http://forums.bethsoft.com/index.php?/topic/1220638-portal-only-works-as-doorway-once-advice/= 1

playgroup equip 0
set stage to 1

elseif stage == 2 && isActionRef ArenaSwitchRef =http://forums.bethsoft.com/index.php?/topic/1220638-portal-only-works-as-doorway-once-advice/= 1

playgroup unequip 0
set stage to 3

elseif isActionRef player == 1

activate

endif

end

begin gameMode

if stage == 1 && isAnimPlaying == 0

set stage to 2
playgroup forward 0

endif

if stage == 3 && isAnimPlaying == 0

ArenaPortalRef.disable
set stage to 4

endif

if stage == 4 && isAnimPlaying == 0

ArenaPortalRef.enable
set stage to 0

endif

end
User avatar
Andrew Perry
 
Posts: 3505
Joined: Sat Jul 07, 2007 5:40 am

Return to IV - Oblivion