Portals

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
Emera Nova
Posts: 146
Joined: Wed Jun 11, 2014 1:31 am

Portals

Post by Emera Nova »

:o is there a way to make it so the portals act as teleporters?
minmay
Posts: 2790
Joined: Mon Sep 23, 2013 2:24 am

Re: Portals

Post by minmay »

They'll only ever work for the party, since only the party can ever go through a PortalComponent, but sure. Just use PortalComponent.onArrival to set the party's position and fade the screen back in.
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.
Emera Nova
Posts: 146
Joined: Wed Jun 11, 2014 1:31 am

Re: Portals

Post by Emera Nova »

Is

Code: Select all

PortalComponent.onArrival
something that would go into a script within the game or would you put it in the objects.lua file?

If it's the .lua file one do I need to replace the

Code: Select all

onArrival = function()
GameMode.completeGame("assests/videos/outro1.ivf")
end,
with the PortalComponent and then a set of coors?

Same kind of question as far as making it fade back in after using the portal, where exactly do I tell it to change that.
User avatar
Drakkan
Posts: 1318
Joined: Mon Dec 31, 2012 12:25 am

Re: Portals

Post by Drakkan »

simple solution would be - just disable the portal function and place there invisible teleporter object instead :)
Breath from the unpromising waters.
Eye of the Atlantis
Emera Nova
Posts: 146
Joined: Wed Jun 11, 2014 1:31 am

Re: Portals

Post by Emera Nova »

That would be far simpler I must say x]
Post Reply