Page 44 of 395

Re: Ask a simple question, get a simple answer

Posted: Sat Feb 07, 2015 5:10 pm
by THOM
When dying? You could change it into an item-object of itself...

Re: Ask a simple question, get a simple answer

Posted: Sat Feb 07, 2015 5:16 pm
by AndakRainor
I thought about living monsters !

Edit : found ! flying monsters have a disabled gravity component...

Re: Ask a simple question, get a simple answer

Posted: Sat Feb 07, 2015 11:29 pm
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!

Re: Ask a simple question, get a simple answer

Posted: Sat Feb 07, 2015 11:51 pm
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

Re: Ask a simple question, get a simple answer

Posted: Sun Feb 08, 2015 12:36 am
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.

Re: Ask a simple question, get a simple answer

Posted: Sun Feb 08, 2015 12:47 am
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.

Re: Ask a simple question, get a simple answer

Posted: Sun Feb 08, 2015 8:22 pm
by Frenchie
I can't see isDown() in the scripting reference, but isActivated() and isDeactivated() are

Re: Ask a simple question, get a simple answer

Posted: Sun Feb 08, 2015 9:18 pm
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().

Re: Ask a simple question, get a simple answer

Posted: Sun Feb 08, 2015 10:43 pm
by rlewarne04
Hmm Thanks Minmay I ripped that script straight from the forum. I'll try it when I get a chance

Thank you :)

Re: Ask a simple question, get a simple answer

Posted: Sun Feb 08, 2015 11:14 pm
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.