Page 1 of 3
.

Posted:
Mon Jan 02, 2012 04:34
by jordan4ibanez
.

Posted:
Mon Jan 02, 2012 04:40
by darket
You stole my idea))) Well, so Cool

Posted:
Mon Jan 02, 2012 04:43
by jordan4ibanez
darket wrote:You stole my idea))) Well, so Cool
no i didn't lol..but thank you

Posted:
Mon Jan 02, 2012 05:05
by dannydark
What about making it randomise the paintings i.e. have one craft recipe (maybe paper surrounded by sticks) which when placed will pick a random painting to display.
In fact I think thats how Minecraft does it not sure though as I haven't played it too much, doing this would mean people would only need to know one recipe rather than loads (depending on how many paintings get added)

Posted:
Mon Jan 02, 2012 05:07
by jordan4ibanez
what would that craft recipe be? if you would like to tell me that is

Posted:
Mon Jan 02, 2012 05:07
by IPushButton2653
I could make random paintings and add them to mod?

Posted:
Mon Jan 02, 2012 05:08
by jordan4ibanez
yes you can, that is what i would hope people will do..there is only one thing though..try to keep the "frame" of the painting texture ..the texture is 64x64

Posted:
Mon Jan 02, 2012 05:11
by RAPHAEL
Niice paintings there considering how small they are. Good idea.

Posted:
Mon Jan 02, 2012 05:12
by dannydark
I was thinking the recipe should be just Paper surrounded by Sticks i.e.
P = Paper, S = Sticks
S S S
S P S
S S S

Posted:
Mon Jan 02, 2012 05:12
by IPushButton2653
I'll just take ones you made, and then change the design, so much simpler :P

Posted:
Mon Jan 02, 2012 05:14
by IPushButton2653
BRAINSTORM
What about a colored paper mod? And the color of the paper determins the painting?

Posted:
Mon Jan 02, 2012 05:16
by jordan4ibanez
dannydark wrote:I was thinking the recipe should be just Paper surrounded by Sticks i.e.
P = Paper, S = Sticks
S S S
S P S
S S S
good idea..now i need to figure out how to make lua randomly choose

Posted:
Mon Jan 02, 2012 05:30
by Menche
I think it would be nice to be able to choose the painting, rather than having it random. Repeatedly breaking/placing paintings to try to get the desired picture in minecraft was a bit annoying.

Posted:
Mon Jan 02, 2012 06:28
by dannydark
Like I said I haven't played too much of Minecraft so not sure how that worked, I just think it would be hard to have to find a nyan cat just for a painting.
If the painting was not to be random my next vote would go to IPushButton2653's idea for coloured paper determining the painting, That at least would be more feasible to do than having to find a nyan cat ^_^

Posted:
Mon Jan 02, 2012 06:49
by jordan4ibanez
i am currently trying to devise a code to make paintings random and it is extremely difficult for a noob like me

Posted:
Mon Jan 02, 2012 07:13
by IPushButton2653
I hope to see it working soon, I was busy implementing stuff into my parkour course ^^

Posted:
Mon Jan 02, 2012 07:44
by jordan4ibanez
yes...but would anyone care to help me..when i place down the "blank" canvas it instantly crashes the game...here is the code:
local i=math.random(1,3)
minetest.register_on_placenode(function(pos, newnode, placer)
if newnode.name == "paintings:paintingbase" then
if painting:put_down_base(pos) then
if i==1 then
--minetest.env:remove_node(pos, {name="paintings:paintingbase"})
minetest.env:add_node(pos, {name="paintings:painting1"})
end
if i==2 then
--minetest.env:remove_node(pos, {name="paintings:paintingbase"})
minetest.env:add_node(pos, {name="paintings:painting2"})
end
if i==3 then
--minetest.env:remove_node(pos, {name="paintings:paintingbase"})
minetest.env:add_node(pos, {name="paintings:painting3"})
end
end
end
end)

Posted:
Mon Jan 02, 2012 07:58
by IPushButton2653
I think the i== should be something like i?=, but I don't know what the "?" should be.......

Posted:
Mon Jan 02, 2012 08:05
by jordan4ibanez
no..i've fixed it..UPDATE: paintings will now choose randomly..BUT i have not uploaded this version as there are 2 bugs..
1.) when placed...the collisionbox and draw face will randomly change places
2.) AS I SAID..it will choose randomly..but apparently "it will stop when you enter your world?" i believe

Posted:
Mon Jan 02, 2012 08:05
by xyz
minetest.env:add_node(pos, {name="paintings:painting"..i}) is definetly better

Posted:
Mon Jan 02, 2012 08:13
by jordan4ibanez
this is the new randomizer code:
local i=math.random(3)
minetest.register_on_placenode(function(pos, newnode, placer)
if newnode.name == "paintings:paintingbase" then
if minetest.env:remove_node(pos) then
if i==1 then
--minetest.env:remove_node(pos, {name="paintings:paintingbase"})
minetest.env:add_node(pos, {name="paintings:painting1"})
end
if i==2 then
--minetest.env:remove_node(pos, {name="paintings:paintingbase"})
minetest.env:add_node(pos, {name="paintings:painting2"})
end
if i==3 then
--minetest.env:remove_node(pos, {name="paintings:paintingbase"})
minetest.env:add_node(pos, {name="paintings:painting3"})
end
end
end
end)

Posted:
Mon Jan 02, 2012 08:18
by jordan4ibanez
xyz wrote:minetest.env:add_node(pos, {name="paintings:painting"..i}) is definetly better
tried that..wouldnt work..im looking for a work around which gathers the last "placed" position of the node..should be easy

Posted:
Mon Jan 02, 2012 08:34
by sfan5
+2

Posted:
Mon Jan 02, 2012 08:38
by jordan4ibanez
sfan go into crabs server i need to ask you something

Posted:
Mon Jan 02, 2012 08:40
by sfan5
wait a second!

Posted:
Mon Jan 02, 2012 08:42
by jordan4ibanez
okay sir

Posted:
Mon Jan 02, 2012 09:08
by xyz
lol, your mistake is in another place
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
minetest.register_on_placenode(function(pos, newnode, placer)
if newnode.name == "paintings:paintingbase" then
local i=math.random(3)
minetest.env:add_node(pos, {name="paintings:painting"..i, param2 = newnode.param2})
end
end
Try this

Posted:
Mon Jan 02, 2012 09:27
by sfan5

Posted:
Mon Jan 02, 2012 09:57
by jordan4ibanez
thank you sfan 5 for helping me with the node2 thing and cleaning and fixing up code...and thank you jeija for helping me with knowing what function i needed for the randomizer

Posted:
Mon Jan 02, 2012 11:14
by sfan5
jordan4ibanez wrote:thank you sfan 5 for helping me with the node2 thing and cleaning and fixing up code...and thank you jeija for helping me with knowing what function i needed for the randomizer
It's param2 not node2