Page 385 of 400
Re: Ask a simple question, get a simple answer
Posted: Sun May 29, 2022 9:08 am
by Isaac

Nice, and thank you for the fixed link.
This is a beautiful map resource that I'd not seen before.
___________________
I did a simple model swap for the fixed files, and restarted the editor, but the problem is still present (for me) that the projectiles fly through the gate and the secret wall.
*Is there more to it than just the swap to get it to work? The models are obviously cleaned up/fixed... but I still can toss projectiles through them.
**I mentioned above that when I swapped the gate model for a vanilla iron door model, the projectiles still passed through the gate object.
Re: Ask a simple question, get a simple answer
Posted: Sun May 29, 2022 9:18 am
by Adrageron
@Isaac Thank you! You was right, Minmay already knows.
@minmay Thanks a lot! "shuffling around the nodes" sounds to me like "just cast a fireball spell" - easy anough if you are a wizard, but impossible for mere mortal like myself

Re: Ask a simple question, get a simple answer
Posted: Sun May 29, 2022 9:50 am
by Isaac
I see that the secret door cannot be used on a double height wall, as done in the demo map. It clips with the wall above it.
Re: Ask a simple question, get a simple answer
Posted: Sun May 29, 2022 9:58 am
by Adrageron
Isaac wrote: ↑Sun May 29, 2022 9:08 am
I did a simple model swap for the fixed files, and restarted the editor, but the problem is still present (for me) that the projectiles fly through the gate and the secret wall.
For me fixed models works just fine.
Re: Ask a simple question, get a simple answer
Posted: Sun May 29, 2022 10:37 am
by Isaac
That's interesting, and good enough; glad to hear it...but it's odd.
In-editor, using the fixed file, and even when I swap the model out for the vanilla dungeon_secret_door.fbx it does not fix the issue for me.

Re: Ask a simple question, get a simple answer
Posted: Thu Jun 16, 2022 10:06 pm
by THOM
Well. I want to remove items from the party's inventory with certain traits. I also want to remove that items from containers the party may carry.
I have the following function which works for single items but doesn't work for items in containers - it simply doesn't remove anything there. And I do not understand, why.
Has anyone an idea, what's wrong with it?
Code: Select all
function removeWeappons()
local weaptrait = {"light_weapon", "sword", "daggers", "weapon", "heavy_weapon", "mace", "axe", "two_handed", "firearm", "spear", "missile_weapon", "throwing_weapon", "wand" }
for i=1,4 do
local ch = party.party:getChampion(i)
for slot=1,ItemSlot.MaxSlots do
local item = ch:getItem(slot)
if item then
for _,trait in ipairs(weaptrait) do
if item:hasTrait(trait) then
ch:removeItemFromSlot(slot)
break
--##here begins the part that seems to be wrong
elseif item:hasTrait("container") then
for index=1,item.go.containeritem:getCapacity() do
local cItem = item.go.containeritem:getItem(index)
if cItem then
for _,cTrait in ipairs(weaptrait) do
if cItem:hasTrait(cTrait) then
ch:removeItemFromSlot(index)
break
end
end
end
end
end
end
end
end
end
setMouseItem()
end
Re: Ask a simple question, get a simple answer
Posted: Fri Jun 17, 2022 12:44 pm
by THOM
Never mind. Found it by my own. - Tricky detail stuff in the script...
Re: Ask a simple question, get a simple answer
Posted: Tue Sep 13, 2022 1:29 pm
by Adrageron
Hey, guys!
Is there any way to forcefully exit party's "on top of the ladder" state?
What I've tried already:
Teleportation or party:setWorldPosition() - party just stays on the air
Knockback - ignored
Disabling/destroying ladder - ignored
Enabling party.gravity - ignored, will kill party by falling damage afrer jumping down from current position
Using party:setWorldPositionY() ignored
I'm out of ideas a bit
If not disabling the state, may be there is a way to check is the party on top of the ladder or not? party:isClimbing() don't work. Of course, I can search for ladder entities under the party, but this is not a guaranteed method. Party can stand on magic bridge or something...
Another interesting (and annoying) mechanic - if you spawn platform under the party after climbing the ladder, the party will fall down anyway after turning right/left. Looking for workaround for this "feature" too

Re: Ask a simple question, get a simple answer
Posted: Tue Sep 13, 2022 2:34 pm
by THOM
Without trying it by myself:
Have you tried PartyComponent:move(direction)?
Re: Ask a simple question, get a simple answer
Posted: Tue Sep 13, 2022 4:17 pm
by Adrageron
THOM wrote: ↑Tue Sep 13, 2022 2:34 pmHave you tried PartyComponent:move(direction)?
Thank you! It is worked (kind of). The problem is that the party actually moved (even backwards). But this is a progress anyway, I can spawn temporary obstacle to prevent moving
