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
Matlock19
Posts: 23
Joined: Sun Nov 02, 2014 2:11 am

Re: Ask a simple question, get a simple answer

Post by Matlock19 »

Decayer wrote:It's likely that Protection, Evasion and Vitality have to be all lower case.
Strangely enough, when I tried that, the item became unable to be equipped. Even though the "slot = 5" is still there. I'm still lost.
User avatar
Aisuu
Posts: 61
Joined: Fri Oct 31, 2014 2:07 pm

Re: Ask a simple question, get a simple answer

Post by Aisuu »

Question: Any idea how to replicate item "island_map"?
I need something similar. After right click on scroll, open up big picture on full screen and with different sound effect on open and close :)
Scotty
Posts: 69
Joined: Fri Nov 07, 2014 2:59 pm

Re: Ask a simple question, get a simple answer

Post by Scotty »

How to use getMouseItem() to determine what item is in hand?

I would have guessed getMouseItem().name would be the way to do it, but that just returns nil.

Edit: Oh silly me: getMouseItem().go.name
kelly1111
Posts: 349
Joined: Sun Jan 20, 2013 6:28 pm

Re: Ask a simple question, get a simple answer

Post by kelly1111 »

Question: What is need to douse or turn of a lightsource... for instance a castle_pillar_canleholder ?

I have tried this, but it returns a attempt to call method a "nil" value

function dousecandle()
candleholder_1.light:deactivate();
end
kelly1111
Posts: 349
Joined: Sun Jan 20, 2013 6:28 pm

Re: Ask a simple question, get a simple answer

Post by kelly1111 »

kelly1111 wrote:Question: What is need to douse or turn of a lightsource... for instance a castle_pillar_canleholder ?

I have tried this, but it returns a attempt to call method a "nil" value

function dousecandle()
candleholder_1.light:deactivate();
end
Ha..found it.. it is "disable"
remilafo
Posts: 23
Joined: Wed Mar 20, 2013 3:36 am

Re: Ask a simple question, get a simple answer

Post by remilafo »

I am using castle tileset for an interior section and want to use forest tileset outside..

when i walk outside the exterior of the castle walls are see through, what's going on here?

Remilafo
User avatar
Karinas23
Posts: 58
Joined: Thu Jul 24, 2014 8:57 pm

Re: Ask a simple question, get a simple answer

Post by Karinas23 »

remilafo wrote:I am using castle tileset for an interior section and want to use forest tileset outside..

when i walk outside the exterior of the castle walls are see through, what's going on here?

Remilafo
walla only form properly where floor tile meets wall tile, so castle wall meeting forest floor causes weirdness. You just have to cover it up with assets
kelly1111
Posts: 349
Joined: Sun Jan 20, 2013 6:28 pm

Re: Ask a simple question, get a simple answer

Post by kelly1111 »

What Am I doing wrong?

I am getting an " end expected (to close if at line 11) near <eof> error. Can someone explain to me what causes this error so I can learn more about LUA and what I did wrong?
Below the function I made (it worked at first but I added some lines, and now get this error) ... it's a very messy written function..I know :mrgreen:

Code: Select all

 function countercages()
       cages_counter.counter:getValue()              
       if cages_counter.counter:getValue()==12 then   
       hudPrint("An Apetite for bovine destruction \n The scent of your human Debris") else                       
      
if cages_counter.counter:getValue()==11 then
playSound("wolves"); 

else

	   if cages_counter.counter:getValue()==10 then
	    cages_teleporter_1.controller:activate();
		cages_teleporter_2.controller:activate();
		cages_teleporter_3.controller:activate();
		cages_teleporter_4.controller:activate();
		cages_teleporter_5.controller:activate();
		cages_teleporter_6.controller:activate();
		cages_teleporter_7.controller:activate();
		cages_teleporter_8.controller:activate();
		cages_teleporter_9.controller:activate();
		cages_teleporter_10.controller:activate(); 
        playSound("warg_howl"); 
  	    else

       if cages_counter.counter:getValue()==9 then
	   playSound("wolfer"); 
	   else

       if cages_counter.counter:getValue()==8 then      
	   else

       if cages_counter.counter:getValue()==7 then
       cage_spear_1.door:open();   
       cage_spear_10.door:open();
	   else

       if cages_counter.counter:getValue()==6 then
       cage_spear_2.door:open();
	   cage_spear_9.door:open();
       else

       if cages_counter.counter:getValue()==5 then
       cage_spear_3.door:open();
       cage_spear_8.door:open();
       else

       if cages_counter.counter:getValue()==4 then
       cage_spear_4.door:open();
	   cage_spear_7.door:open();
       else

       if cages_counter.counter:getValue()==3 then
       cage_spear_5.door:open();
       cage_spear_6.door:open();
	   else

        

       if cages_counter.counter:getValue()==2 then
	   playSound("warg_howl"); 



        else
      

		 if cages_counter.counter:getValue()==1 then

     
       hudPrint("...LET THE HUNT BEGIN...") 
	   else
       cages_counter.counter:setValue(13)            
       cages_timer.timer:stop()                      
                                
    end
    end
    end
    end
    end
    end
end
end
end
NutJob
Posts: 426
Joined: Sun Oct 19, 2014 6:35 pm

Re: Ask a simple question, get a simple answer

Post by NutJob »

..................
Last edited by NutJob on Thu Nov 20, 2014 12:16 am, edited 1 time in total.
User avatar
QuintinStone
Posts: 72
Joined: Sat Nov 01, 2014 9:58 pm

Re: Ask a simple question, get a simple answer

Post by QuintinStone »

Use "elseif" instead of "else if" in lua.
Crypt of Zulfar
Post Reply