Page 232 of 400
Re: Ask a simple question, get a simple answer
Posted: Fri Apr 27, 2018 6:00 am
by minmay
Remember that you can select groups of objects (hold the Shift key to add to the current selection) and move the entire group up or down with the < and > keys.
Re: Ask a simple question, get a simple answer
Posted: Fri Apr 27, 2018 6:34 am
by Curunir
Thanks, guys! I do know I can drag-select and shift-add then group-shift / re-elevate objects. I guess I'll just cut down on the water areas, other decoration is not giving me that much trouble.
[Edit] I may have underestimated the amount of time it would take to complete this... I've been mapping for around 6-7 hours today and am up to 760 objects and about 75% done with the first overland map... [/Edit]
Re: Ask a simple question, get a simple answer
Posted: Sat Apr 28, 2018 11:16 am
by Curunir
Is there a way to fix the shadows here?
https://i.imgur.com/CHolQNp.jpg
Asset that causes the problem is "beach_rock_outside_wall_high". It lacks the "occluder" component most other rocks have. Is that the reason? Can I add the component to all those assets via script?
[Edit] Just searched the forum and found this from minmay, in the ORRRobin 3 thread:
"Added shadow caster models to the backs of beach rock outside walls so that they are no longer missing shadows when lit from behind."
Is this something I could do as well? [/Edit]
=======
[Edit 2] Did more digging around and found this, again from minmay:
"Adding doubleSided = true to its material definition will cause the triangles to block light from both directions (still only the front sides will be lit correctly, but both sides will cast shadows)"
Aaaaaand FIXED! Added the changed forest_wall material definition to the mod's materials.lua and now it works just great! Thanks, minmay! <3
https://i.imgur.com/VFrN566.jpg
[/Edit2]
Re: Ask a simple question, get a simple answer
Posted: Mon Apr 30, 2018 9:53 am
by Curunir
Is there a way to track party self-inflicted damage as from a fireburst or shockburst or poison cloud spell cast when standing next to an object, and having this instance of damage trigger a function or event?
Re: Ask a simple question, get a simple answer
Posted: Mon Apr 30, 2018 10:30 am
by Badgert
Please tell me how to make magicians read only those spells that they have in their inventory?
Re: Ask a simple question, get a simple answer
Posted: Mon Apr 30, 2018 11:58 am
by Curunir
Badgert wrote:Please tell me how to make magicians read only those spells that they have in their inventory?
Not my code and / or implementation, found the script on these forums, originally posted by user JKos:
Code: Select all
--FORCE SPELL SCROLL IN INVENTORY
defineObject{
name = "party",
baseObject = "party",
components = {
{
class = "Party",
onCastSpell =
function(party,champion,spellName)
local itemName = "scroll_"..spellName
for i = 1, 32, 1 do
if champion:getItem(i) ~= nil and champion:getItem(i).go.name == itemName then
return true
end
end
hudPrint(champion:getName().." needs to have the spell scroll on him to be able to cast it")
return false
end
}
}
Link to his post so you can check out the full topic with more variations of similar ideas:
viewtopic.php?p=84541#p84541
Re: Ask a simple question, get a simple answer
Posted: Mon Apr 30, 2018 12:43 pm
by Zo Kath Ra
Curunir wrote:Is there a way to track party self-inflicted damage as from a fireburst or shockburst or poison cloud spell cast when standing next to an object, and having this instance of damage trigger a function or event?
You could redefine everything that the party uses to do damage (spells, weapons) to have
damageType = "party",
Then check for this damage type in PartyComponent.onDamage(self, champion, damage, damageType)
But then you couldn't use the other damage types anymore.
Maybe use party_poison, party_fire, etc. and re-define everything that checks for damage types?
I think the fire effect for fire damage is hardcoded, so this wouldn't work (attack a monster with a fire sword, and it starts burning).
Someone posted a better solution on this forum, but I can't find it anymore.
Re: Ask a simple question, get a simple answer
Posted: Mon Apr 30, 2018 1:53 pm
by Curunir
Sounds like too much of a hassle for a minor puzzle, I will change it for something else. Thanks for looking anyway!
Here's another one while we're at it - I already know you can check what item the mouse cursor is currently carrying, but can you also check for the position of the mouse on the screen?
I want to be able to check whether an item is "held up" against an object, such as a wall face spawner or a spell receptor, etc. Is there a way to do this? Can make for a nice change of pace from all the alcove puzzles, even though it's essentially the same idea.
Re: Ask a simple question, get a simple answer
Posted: Tue May 01, 2018 8:12 am
by Curunir
Why does this crash on execution?
Code: Select all
function coldDoor()
if counter_1.counter:getValue() < 1 and counter_2.counter:getValue() < 1 then
do openSesame()
end
end
function openSesame()
dungeon_door_wooden_3.door:open()
dungeon_secret_door_8.door:open()
dungeon_secret_door_7.door:open()
torch_holder_14.controller:enable()
torch_holder_14.light:enable()
torch_holder_14.particle:enable()
torch_holder_14.sound:enable()
end
end
I get "attempt to call global 'openSesame' (a nil value). It worked two minutes ago, I swear to god, I changed NOTHING and it ran fine and did everything in the openSesame function just a while ago.
Also, can you enable/disable multiple components of an entity with a single line?
And is there a way to place items in an alcove and NOT have them appear inside each other?
Re: Ask a simple question, get a simple answer
Posted: Tue May 01, 2018 8:38 am
by minmay
I think you've confused yourself with your indentation. This is how it looks when indented based on the actual blocks:
Code: Select all
function coldDoor()
if counter_1.counter:getValue() < 1 and counter_2.counter:getValue() < 1 then
do
openSesame()
end
end
function openSesame()
dungeon_door_wooden_3.door:open()
dungeon_secret_door_8.door:open()
dungeon_secret_door_7.door:open()
torch_holder_14.controller:enable()
torch_holder_14.light:enable()
torch_holder_14.particle:enable()
torch_holder_14.sound:enable()
end
end
Your definition of the openSesame function is inside the coldDoor function - and
after the attempt to call it, so of course it's nil when you attempt to call it.