Yes, you can. Leave hitEffect undefined and add onProjectileHit to your projectile component. hitEffect is just a helper for the most common use case ("spawn this object on hit"). You can execute arbitrary Lua code in your onProjectileHit hook.MrChoke wrote:I think the bug fix you mention will fix what I am saying. As long as the game will start copying what we specify in ProjectileComponent::setCastByChampion(number) into TileDamager, getCastByChampion(), since we cannot create the hitEffect object and set it ourselves in ProjectileComponent.
Tentative changelist for 2.1.19
Re: Tentative changelist for 2.1.19
- Zo Kath Ra
- Posts: 937
- Joined: Sat Apr 21, 2012 9:57 am
- Location: Germany
Re: Tentative changelist for 2.1.19
Wow, that looks very good!minmay wrote:For example my mod uses both regular water and ice, which uses the water shader for reflection/refraction but has a different normal map.
Can't wait to try your mod.
- Eleven Warrior
- Posts: 745
- Joined: Thu Apr 18, 2013 2:32 pm
- Location: Australia
Re: Tentative changelist for 2.1.19
Hi Guys.
1 - Is it possible that you could add a Draw Tile that allows water to be knee deep, like a flooded area, Like the ocean tile? and uses the walk through water sound.
2 - For some reason at times when I press CTRL C and press CTRL V for objects (copy and paste) the editor crashes. Not all the time though rarely.
1 - Is it possible that you could add a Draw Tile that allows water to be knee deep, like a flooded area, Like the ocean tile? and uses the walk through water sound.
2 - For some reason at times when I press CTRL C and press CTRL V for objects (copy and paste) the editor crashes. Not all the time though rarely.
Re: Tentative changelist for 2.1.19
Wow, you are right. I knew about onProjectileHit but I didn't think that I could spawn the blast object in there and it will work correctly. I thought it did fire right before the blast went off but what I missed is how if I take the X,Y of self.go which is the fireball and spawn the blast right there, it will work exactly as intended. Well almost, I had to do setWorldPositionY(1.35). But then it worked.petri wrote:Yes, you can. Leave hitEffect undefined and add onProjectileHit to your projectile component. hitEffect is just a helper for the most common use case ("spawn this object on hit"). You can execute arbitrary Lua code in your onProjectileHit hook.MrChoke wrote:I think the bug fix you mention will fix what I am saying. As long as the game will start copying what we specify in ProjectileComponent::setCastByChampion(number) into TileDamager, getCastByChampion(), since we cannot create the hitEffect object and set it ourselves in ProjectileComponent.
So yeah, the only real issue is changing ProjectileComponent::setCastByChampion() from boolean to number for the ordinal. Thanks!!
Re: Tentative changelist for 2.1.19
I just came across this. On MonsterComponent, we have addItem(), removeItem(), dropAllItems(). But we have no way to get the list of items that a monster is holding. Unless I missed it. Yes, this may be an enhancement, but how about a "getAllItems()" method e can iterate through?
Not having this now presents an immediate challenge for me. I have this common "copyArea" code where I can take all entities in an area and copy or move them to another. That includes monsters too but not items they are holding. I want to re-add the items into the newly "copied" monster but I can't get the list of what the source monster is holding. Ugh.
Not having this now presents an immediate challenge for me. I have this common "copyArea" code where I can take all entities in an area and copy or move them to another. That includes monsters too but not items they are holding. I want to re-add the items into the newly "copied" monster but I can't get the list of what the source monster is holding. Ugh.
Re: Tentative changelist for 2.1.19
Hi,
would you mind fixing lua error for detection item where isnt on map, if it is possible?
Eg. connector for item.usableitem.onUseItem(self, champion) Its describe in viewtopic.php?f=22&t=9361.
would you mind fixing lua error for detection item where isnt on map, if it is possible?
Eg. connector for item.usableitem.onUseItem(self, champion) Its describe in viewtopic.php?f=22&t=9361.
My LOG2 projects: virtual money, Forge recipes, liquid potions and
MultiAlcoveManager, Toolbox, Graphic text,
MultiAlcoveManager, Toolbox, Graphic text,
Re: Tentative changelist for 2.1.19
Found what I believe is a bug. Light firearms (firearms with the "light_weapon" trait) behave strangely when combined with dual-wielding: if you attack with the light firearm, it puts both hands on cooldown, but if you attack with a light melee weapon in the other hand, it doesn't put the firearm on cooldown.
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.
- Dr.Disaster
- Posts: 2876
- Joined: Wed Aug 15, 2012 11:48 am
Re: Tentative changelist for 2.1.19
Firearms are ranged weapons. Assigning them melee traits should not be possible / work.minmay wrote:Found what I believe is a bug. Light firearms (firearms with the "light_weapon" trait) behave strangely when combined with dual-wielding:
Re: Tentative changelist for 2.1.19
Technically, they seem to behave like melee weapons with instant attack, and they do trigger the melee attack hook on doors; bows don't. The only firearm that can be dual wielded is the revolver and I can see using that after a melee attack ~as a parting shot. [I don't know if it's unintended.]Dr.Disaster wrote:Firearms are ranged weapons. Assigning them melee traits should not be possible / work.minmay wrote:Found what I believe is a bug. Light firearms (firearms with the "light_weapon" trait) behave strangely when combined with dual-wielding:
Re: Tentative changelist for 2.1.19
Firearms are weapons, and they even display specifically as "Light Firearm" if given the trait. Backstabbing works with them too. I see no compelling reason to make a "melee trait" distinction unless one actually exists in the code, which I strongly suspect it does not.Dr.Disaster wrote:Firearms are ranged weapons. Assigning them melee traits should not be possible / work.minmay wrote:Found what I believe is a bug. Light firearms (firearms with the "light_weapon" trait) behave strangely when combined with dual-wielding:
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.