Question about GrimTK

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
Cashpwns
Posts: 11
Joined: Tue Oct 11, 2016 4:19 am

Question about GrimTK

Post by Cashpwns »

I've been wanting to, after a dialogue is done with a certain character, for that character to teleport away. I've been trying to script it, but no luck as I am not that good at scripting and knowing what I need to activate a teleporter after dialogue is done.
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Question about GrimTK

Post by zimberzimber »

Place an inactive teleporter on the tile the dialogue is triggered, and activate it with the button/event that ends the dialogue.
Or just set the parties position to where you want them to teleport to with the dialogue ending button/event and play the teleportation screen effect.
My asset pack [v1.10]
Features a bit of everything! :D
Cashpwns
Posts: 11
Joined: Tue Oct 11, 2016 4:19 am

Re: Question about GrimTK

Post by Cashpwns »

zimberzimber wrote:Place an inactive teleporter on the tile the dialogue is triggered, and activate it with the button/event that ends the dialogue.
Or just set the parties position to where you want them to teleport to with the dialogue ending button/event and play the teleportation screen effect.
I tried to make the function, but surprise surprise, it didn't work.

Code: Select all

function teleport() 
invisible_teleporter_2.teleporter:activate()
end
User avatar
zimberzimber
Posts: 432
Joined: Fri Feb 08, 2013 8:06 pm

Re: Question about GrimTK

Post by zimberzimber »

Cashpwns wrote:
zimberzimber wrote:Place an inactive teleporter on the tile the dialogue is triggered, and activate it with the button/event that ends the dialogue.
Or just set the parties position to where you want them to teleport to with the dialogue ending button/event and play the teleportation screen effect.
I tried to make the function, but surprise surprise, it didn't work.

Code: Select all

function teleport() 
invisible_teleporter_2.teleporter:activate()
end
Are you calling it?
Add 'print("activated')' to see if the function is actually getting triggered or not.
My asset pack [v1.10]
Features a bit of everything! :D
Cashpwns
Posts: 11
Joined: Tue Oct 11, 2016 4:19 am

Re: Question about GrimTK

Post by Cashpwns »

zimberzimber wrote:
Cashpwns wrote:
zimberzimber wrote:Place an inactive teleporter on the tile the dialogue is triggered, and activate it with the button/event that ends the dialogue.
Or just set the parties position to where you want them to teleport to with the dialogue ending button/event and play the teleportation screen effect.
I tried to make the function, but surprise surprise, it didn't work.

Code: Select all

function teleport() 
invisible_teleporter_2.teleporter:activate()
end
Are you calling it?
Add 'print("activated')' to see if the function is actually getting triggered or not.
I tried that, but it crashed with the error about the "activate" inside of it, and I'm honestly not sure if I am calling it or not.
User avatar
Sutekh
Posts: 126
Joined: Sun Nov 25, 2012 9:58 am
Location: UK

Re: Question about GrimTK

Post by Sutekh »

Try using controller instead of teleporter.

Code: Select all

function teleport()
invisible_teleporter_2.controller:activate()
end
Post Reply