Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
Um... could you dumb it down a little? >.>
I wish I could record how I set them up in the preview :/
I can handily organize them with the ol' click&drag
but as it stands I can't parse a line of that second code. Timing's not really a problem, I just need to know how to put them in the RIGHT places
I wish I could record how I set them up in the preview :/
I can handily organize them with the ol' click&drag
but as it stands I can't parse a line of that second code. Timing's not really a problem, I just need to know how to put them in the RIGHT places
Re: Ask a simple question, get a simple answer
Each object has a subtile X&Y coordinate/offset. The intra-tile positions of items can be shifted using the :setSubtileOffset(x, y) function of the game object. Vertical positioning can be done using the :setWorldPositionY() function.
https://github.com/JKos/log2doc/wiki/Ob ... #methods-1
https://github.com/JKos/log2doc/wiki/Ob ... #methods-1
Re: Ask a simple question, get a simple answer
unrelated question: is there a way to bury something other than a chest?
- Zo Kath Ra
- Posts: 937
- Joined: Sat Apr 21, 2012 9:57 am
- Location: Germany
Re: Ask a simple question, get a simple answer
Yes you can:
Put a floor_trigger on the map.
Check its "triggeredByDigging" box, and uncheck the other boxes.
Also check its "disableSelf" box, so the player can only dig it up once.
Then connect it to a script that spawns an item.
Re: Ask a simple question, get a simple answer
I was trying to summon a different kind of container but it doesn't seem to let me effect what's in THATZo Kath Ra wrote: ↑Fri Oct 30, 2020 8:19 am Yes you can:
Put a floor_trigger on the map.
Check its "triggeredByDigging" box, and uncheck the other boxes.
Also check its "disableSelf" box, so the player can only dig it up once.
Then connect it to a script that spawns an item.
- Zo Kath Ra
- Posts: 937
- Joined: Sat Apr 21, 2012 9:57 am
- Location: Germany
Re: Ask a simple question, get a simple answer
What type of container? An item (like a sack or wooden box) or another chest-type object?
Grey Island mod(WIP): http://www.grimrock.net/forum/viewtopic ... 99#p123699
- Skuggasveinn
- Posts: 562
- Joined: Wed Sep 26, 2012 5:28 pm
Re: Ask a simple question, get a simple answer
I did a tutorial about digging stuff up, in this tutorial I hooked a script to the floor trigger just like Zo Kath Ra suggested.
https://www.youtube.com/watch?v=T9vM91bLUY8&t=4s
The scripts was
Code: Select all
function hiddencorpse()
self.go:spawn("floor_corpse")
self.go:spawn("skull")
self.go:spawn("rapier")
hudPrint("You have found a buried body")
for i = 1, 4, 1 do
party.party:getChampion(i):gainExp(250)
end
hudPrint("250 exp")
playSound("secret")
end
first use print(floor_trigger_1:getWorldPosition()) to get the worldposition of your floor trigger.
And then use yourcontainer_1:setWorldPosition(vec(1, 1, 1, 0)) in the script to set the container where vec is the location you got before.
Skuggasveinn.
Re: Ask a simple question, get a simple answer
Tried that, now the container(a coffin) is incorporeal for some reason.Skuggasveinn wrote: ↑Fri Oct 30, 2020 7:14 pmI did a tutorial about digging stuff up, in this tutorial I hooked a script to the floor trigger just like Zo Kath Ra suggested.
https://www.youtube.com/watch?v=T9vM91bLUY8&t=4s
The scripts wasIf you are spawning another container that you want filled with some items I would simply place it below the map populated with your items, and then use the script to move it into position when the party digs.Code: Select all
function hiddencorpse() self.go:spawn("floor_corpse") self.go:spawn("skull") self.go:spawn("rapier") hudPrint("You have found a buried body") for i = 1, 4, 1 do party.party:getChampion(i):gainExp(250) end hudPrint("250 exp") playSound("secret") end
first use print(floor_trigger_1:getWorldPosition()) to get the worldposition of your floor trigger.
And then use yourcontainer_1:setWorldPosition(vec(1, 1, 1, 0)) in the script to set the container where vec is the location you got before.
Skuggasveinn.
I can walk through it but not touch it.
edit: solved the problem, I now have it waiting above ground, just hidden away in a corner, and it works now.
Re: Ask a simple question, get a simple answer
neeeeeeeeeew question
how would I go about making a button that dispenses cheese into an alcove or on to an altar
I can easily get it to spawn on the floor but that is gross :V
how would I go about making a button that dispenses cheese into an alcove or on to an altar
I can easily get it to spawn on the floor but that is gross :V