1 x floor trigger - connects to Script below
triggeredbydigging
disableself = checked
1 x script entity
Code: Select all
function note()
spawn("note",3,19,13,2)
spawn("dig_hole",3,19,13,2)
end
Code: Select all
function note()
spawn("note",3,19,13,2)
spawn("dig_hole",3,19,13,2)
end
Sorez wrote:Are those coordinates of the area it spawns the items?
Code: Select all
--Spawning an Item has a few things to set:
-- Spawn("Item",level,x,y,z,height,"name")
--
-- You can also easily just say spawn("Item")
--
-- Other things you can do are spawn("Item",level,x,y,z,height)
--
-- Now Im not completely sure its in that order "item",level,x,y,z,height,"name" But I am sure about the order of The Item the level, and the name./code]
SnowyOwl47 wrote:Sorez wrote:Are those coordinates of the area it spawns the items?Code: Select all
--Spawning an Item has a few things to set: -- Spawn("Item",level,x,y,z,height,"name") -- -- You can also easily just say spawn("Item") -- -- Other things you can do are spawn("Item",level,x,y,z,height) -- -- Now Im not completely sure its in that order "item",level,x,y,z,height,"name" But I am sure about the order of The Item the level, and the name./code][/quote] woo, got a chest to spawn! Now the question is, how do I fill it? :geek:
to add items to a chest simply say,Sorez wrote:
woo, got a chest to spawn! Now the question is, how do I fill it?
Code: Select all
chest_name.surface:addItem(Item)
Im not at best at scripting, this doesn't seem to work, hm.SnowyOwl47 wrote:to add items to a chest simply say,Sorez wrote:
woo, got a chest to spawn! Now the question is, how do I fill it?
Code: Select all
chest_name.surface:addItem(Item)
Code: Select all
function note()
spawn("chest")
chest = IslandChest
spawn("dig_hole")
IslandChest.surface:addItem(note)
end
Sorez wrote:Im not at best at scripting, this doesn't seem to work, hm.SnowyOwl47 wrote:to add items to a chest simply say,Sorez wrote:
woo, got a chest to spawn! Now the question is, how do I fill it?
Code: Select all
chest_name.surface:addItem(Item)
Code: Select all
function note() spawn("chest") chest = IslandChest spawn("dig_hole") IslandChest.surface:addItem(note) end
Code: Select all
--This Creates a function called note
function note()
--This spawns a chest but not anywhere on the map
spawn("chest")
-- This sets a custom variable to be called IslandChest
chest = IslandChest
--This Spawns a dig_hole but not anywhere on the map
spawn("dig_hole")
-- This add's an item to the variable which is not correct, and when your saying an item it needs to be ("note")
IslandChest.surface:addItem(note)
--This ends the function
end
Code: Select all
function note()
--Spawns a chest.
spawn("chest"),level,x,y,facing,height,"chest_1)
--Spawns a dig_hole
spawn("dig_hole",level,x,y,facing,height,"dig_hole_1")
-- Adds a blank note to the chest
chest_1.surface:addItem("note")
end
Basically it means the order of the levels in the little level area it just means 1 for the first level in order 2 for the second and so on...Sorez wrote:Actually, witouth the coordinates, it spawns the chest right where you dig, but il try this code out now.
EDIT: What does "level" mean? Is it the name of the map it's on, or is it the coordinates of the map itself (in this case, 0,0,0)