Ask a simple question, get a simple answer

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!
User avatar
THOM
Posts: 1274
Joined: Wed Nov 20, 2013 11:35 pm
Location: Germany - Cologne
Contact:

Re: Ask a simple question, get a simple answer

Post by THOM »

When dying? You could change it into an item-object of itself...
THOM formaly known as tschrage
_______________________________________________
My MOD (LoG1): Castle Ringfort Thread
My MOD (LoG2): Journey To Justice Thread | Download
User avatar
AndakRainor
Posts: 674
Joined: Thu Nov 20, 2014 5:18 pm

Re: Ask a simple question, get a simple answer

Post by AndakRainor »

I thought about living monsters !

Edit : found ! flying monsters have a disabled gravity component...
Azel
Posts: 808
Joined: Thu Nov 06, 2014 10:40 pm

Re: Ask a simple question, get a simple answer

Post by Azel »

Has anyone brought the LoG 1 Cube boss over to LoG 2? I looked it up and can't seem to get it working yet. Figured I ask here before spending more time on it, just in case!
rlewarne04
Posts: 13
Joined: Wed Feb 04, 2015 9:05 pm

Re: Ask a simple question, get a simple answer

Post by rlewarne04 »

Hey guys :)

I'm trying to write a simple two pressure plate puzzle for the practice, and i went to the useful scripts forum to look at how I would do it and I've done this script:

function platedown()
if dungeon_pressure_plate_1.floortrigger:isDown() and dungeon_pressure_plate_2.floortrigger:isDown() then
dungeon_door_portcullis_1.door:open()
else
dungeon_door_portcullis_1.door:close()
end
end

But it doesn't work. What am I doing wrong? Do I have to use connectors too?

Thanks in advance
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

Can you be more specific about how "it doesn't work"? Without any information about the problem it's hard to help you.
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.
rlewarne04
Posts: 13
Joined: Wed Feb 04, 2015 9:05 pm

Re: Ask a simple question, get a simple answer

Post by rlewarne04 »

nothing at all happens when I place items or stand on the pressure plates. The plates themselves work as intended in terms animation and things but they don't open the door when put down and I havent accidently deactivated them or anything

When I connected the pressure plates to the LUA script it keeps telling me that "isDown" Is a nil value.
User avatar
Frenchie
Posts: 219
Joined: Wed Oct 16, 2013 2:50 am

Re: Ask a simple question, get a simple answer

Post by Frenchie »

I can't see isDown() in the scripting reference, but isActivated() and isDeactivated() are
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: Ask a simple question, get a simple answer

Post by minmay »

rlewarne04 wrote:nothing at all happens when I place items or stand on the pressure plates. The plates themselves work as intended in terms animation and things but they don't open the door when put down and I havent accidently deactivated them or anything

When I connected the pressure plates to the LUA script it keeps telling me that "isDown" Is a nil value.
That's because FloorTriggerComponent has no visible field called isDown. You probably wanted FloorTriggerComponent:isActivated().
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.
rlewarne04
Posts: 13
Joined: Wed Feb 04, 2015 9:05 pm

Re: Ask a simple question, get a simple answer

Post by rlewarne04 »

Hmm Thanks Minmay I ripped that script straight from the forum. I'll try it when I get a chance

Thank you :)
User avatar
Isaac
Posts: 3185
Joined: Fri Mar 02, 2012 10:02 pm

Re: Ask a simple question, get a simple answer

Post by Isaac »

rlewarne04 wrote:Hmm Thanks Minmay I ripped that script straight from the forum. I'll try it when I get a chance

Thank you :)
Old script lingo from the first game. Many, many changes have come about with LoG2... LoG1 scripts will quite often be broken when used in LoG2. Always check which game thread you found the script posted in.
Post Reply