Hi guys. Ok what I have figured out is that when you spawn a Item onto the map that you are currently on, it is called Level 1 for start level eg:
Star location = Level 1 So you would spawn a item using: spawn("note", 1,0,0,0) or spawn("note", 1,0,0,0 -1)
Note: -1 is if you have lowered the floor in your Dungeon to -1 (See Skuggs Tutorial)
Say you have 4 Levels, the level are 1 2 3 4 top to bottom. For some reason this is how it works for spawning anything.
Here are 4 Level:
(0,0,0) Start = lvl 1
(0,0,-1) Start upstairs = lvl 2
(1,0,-1) Start upstairsright = lvl 3
etc..... Even though the Map coordinate change they are still considered Levels when it comes to spawning things.
Dig hole figured out Basic
- Mysterious
- Posts: 226
- Joined: Wed Nov 06, 2013 8:31 am
Re: Dig hole figured out Basic
Hi I tried your Code out and for some reason it does not work eg:
It comes up with the error: bad argument #1 to 'addItem' (ItemComponent expected, got ???)
Code: Select all
function notetest()
spawn("chest",3,10,6,2,0,"chesta")
spawn("dig_hole",3,10,6,2,0,"dig_holea")
chesta.surface:addItem("note")
end
Re: Dig hole figured out Basic
Here...
... just use yours coordinates.
Code: Select all
function spawnChest()
spawn("chest",1,3,0,2,0,"chest_1")
spawn("dig_hole",1,3,0,2,0,"dig_hole_1")
local message = spawn("note")
message.scrollitem:setScrollText("Read\nthis!")
chest_1.surface:addItem(message.item)
end
I'm the Gate I'm the Key.
Dawn of Lore
Dawn of Lore
- Mysterious
- Posts: 226
- Joined: Wed Nov 06, 2013 8:31 am
Re: Dig hole figured out Basic
Thxs a lot leki awesome .
Re: Dig hole figured out Basic
With diggable chests, you can just place a chest at a lower elevation than the ground (eg. if your ground is at zero, move chest to -1 height) and the digging and dig hole will be handled automatically. No floor trigger needed either.
Steven Seagal of gaming industry
Re: Dig hole figured out Basic
So simple, why didn't I try it ?antti wrote:With diggable chests, you can just place a chest at a lower elevation than the ground (eg. if your ground is at zero, move chest to -1 height) and the digging and dig hole will be handled automatically. No floor trigger needed either.
- Mysterious
- Posts: 226
- Joined: Wed Nov 06, 2013 8:31 am
Re: Dig hole figured out Basic
Dammm lol that was so simple and it plays the treasure found sound and all lol. Thxs for that Antti Funny as...