casting underwater [SOLVED - with item]
casting underwater [SOLVED - with item]
Hi everyone,
i'm trying to make an underwater map and i need water breathing.
I found the spell from sps999 (viewtopic.php?f=22&t=8183) and it works fine, but i need to cast this spell again while i'm underwater, before it endes obviously.
Anyone has any idea? Possibly not too comlex; i know very little about java and, if possible, even less about lua.
Thanks
			
			
													i'm trying to make an underwater map and i need water breathing.
I found the spell from sps999 (viewtopic.php?f=22&t=8183) and it works fine, but i need to cast this spell again while i'm underwater, before it endes obviously.
Anyone has any idea? Possibly not too comlex; i know very little about java and, if possible, even less about lua.
Thanks
					Last edited by Granamir on Fri Feb 06, 2015 12:59 pm, edited 1 time in total.
									
			
						
										
						Re: casting underwater
yea it can work too
but has to be an item with charges, not water breathing effect always active
do u have a solution?
			
			
									
						
										
						but has to be an item with charges, not water breathing effect always active
do u have a solution?
Re: casting underwater
To allow underwater attacks with an item, give it the "aquatic" trait. If you want players to be able to cast spells underwater, giving this trait to all items with RunePanelComponent should work. Unfortunately, that obviously won't work for bare-hand casting.
			
			
									
						
							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.
			
						Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: casting underwater
The RunePanelComponent itself does not function underwater. To the best of my knowledge, this isn't something easy to modify. However, giving the "aquatic" trait to an item which casts the water breathing spell should work fine.minmay wrote:To allow underwater attacks with an item, give it the "aquatic" trait. If you want players to be able to cast spells underwater, giving this trait to all items with RunePanelComponent should work. Unfortunately, that obviously won't work for bare-hand casting.
Re: casting underwater
Ugh, you're right. I guess you could implement your own spellcasting interface, since Champion:castSpell() still works underwater. But you couldn't get it to look quite the same as the built-in one, so hiding the problem by some other means is probably better.
			
			
									
						
							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.
			
						Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Re: casting underwater
Thank you.
I guess i'm going to try with item customization.
Btw what is runepanel component? How it works? I didn't find any explanation in scripting reference nor in Jkos wiki.
			
			
									
						
										
						I guess i'm going to try with item customization.
Btw what is runepanel component? How it works? I didn't find any explanation in scripting reference nor in Jkos wiki.
Re: casting underwater
you can easily add it as item component like followingGranamir wrote:Thank you.
I guess i'm going to try with item customization.
Btw what is runepanel component? How it works? I didn't find any explanation in scripting reference nor in Jkos wiki.
{
class = "RunePanel",
requirements = { "concentration", 1 },
},
Re: casting underwater
Thank you Drakkan, btw what changens in my item if i add runepanel component?
			
			
									
						
										
						Re: casting underwater
if you rightclick on it, you open the runepanelGranamir wrote:Thank you Drakkan, btw what changens in my item if i add runepanel component?

