portal

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
RayB
Posts: 140
Joined: Fri Mar 06, 2015 3:45 am

portal

Post by RayB »

Hi again,
Having trouble using the portal object. Saw some posts and minmay's response about the 'onArrival' hook but when I put nothing in the hook for my definition and walk through the portal, the screen turns to white (is there a way to stop that) and the game locks up. I cannot move. It doesn't say the game is completed but acts as if it is. I have tried fading the screen back in and using a teleporter but that did not work either, the game still locks up. I have also tried disabling the portal component and that seems to work as far as not locking up the game but sometimes when I look through the portal I see the walls but the coloring is all funky. Bright green floor etc.
Any suggestions?
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: portal

Post by minmay »

To undo the effects of entering a PortalComponent:

Code: Select all

GameMode.fadeIn(0,1)
GameMode.setTimeMultiplier(1)
GameMode.setEnableControls(true)
The "portal" shader only works usefully when a model with an enabled PortalComponent is in view. So if you disable the PortalComponent but leave the portal model there, it will look very strange and bad.

I don't understand why you're using the portal object in the first place if you don't want PortalComponent behaviour...
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Post Reply