Editor Tutorials on YouTube - part 15 is out
Re: Editor Tutorials on YouTube - part 12 is out
Thanks for the answers, that was exactly what I needed to get started figuring it all out. The game will have custom items after all!
Your videos are really great, Skuggasveinn, I look forward to more.
Your videos are really great, Skuggasveinn, I look forward to more.
Re: Editor Tutorials on YouTube - part 12 is out
That's awesome for checking models, but i am not sure how to do it for gfxIndex and -Atlas
Neither works.
Thanks.
Code: Select all
function getGraphicAtlas()
print(spawn("assassin_dagger").gfxAtlas:getGfxAtlas())
end
function getGraphicIndex()
print(spawn("assassin_dagger").gfxIndex:getGfxIndex())
end
Thanks.
Re: Editor Tutorials on YouTube - part 12 is out
It's
Before you were pretty much trying to get the GfxIndex of the GfxIndex.
Code: Select all
print(spawn("assassin_dagger").item:getGfxIndex())
- spacecookie
- Posts: 26
- Joined: Tue Sep 18, 2012 4:23 pm
- Location: SW Ingalund, innit.
- Contact:
Re: Editor Tutorials on YouTube - part 12 is out
I'm subscribed to you on youtube. You're really helping. Looking forward to the release of each new video constantly.
Re: Editor Tutorials on YouTube - part 12 is out
Hi!
I'm unable to make the alcove code work.
I basically just copied the script from your video and changed the name of items to fit my map as a test but I get " attempt to call method 'contents' ( a nil value) " on line 2.
Did I miss something? :S
(castle alcove 2 calls function openpowergemdoor on insert items)
I'm unable to make the alcove code work.
I basically just copied the script from your video and changed the name of items to fit my map as a test but I get " attempt to call method 'contents' ( a nil value) " on line 2.
Code: Select all
function surfaceContains(surface, item)
for v,i in surface:contents() do
if i.go.name == item then return true
end
end
end
function openPowerGemDoor()
if surfaceContains(castle_alcove_2,"peasant_cap_1") then
castle_door_portcullis_10.door:open()
end
end
(castle alcove 2 calls function openpowergemdoor on insert items)
Re: Editor Tutorials on YouTube - part 12 is out
peasant_cap_1 is the name of the item with a number that the engine gives every item to make it unique (if you do not give it a personal name). But in case of the alcove-puzzle you don't want to call for that single item but for any item of that kind. So you have to script "peasant_cap"
Re: Editor Tutorials on YouTube - part 12 is out
Tested this, it works:blob wrote:Hi!
I'm unable to make the alcove code work.
I basically just copied the script from your video and changed the name of items to fit my map as a test but I get " attempt to call method 'contents' ( a nil value) " on line 2.
Code: Select all
function surfaceContains(object, item)
for _, i in object.surface:contents() do
if i.go.id == item then return true end
end
end
function openPowerGemDoor()
if surfaceContains(castle_alcove_2, "peasant_cap_1") then
castle_door_portcullis_10.door:open()
end
end
Re: Editor Tutorials on YouTube - part 12 is out
Ah! Thanks a ton to the two of you!
I now understand my confusion with name and Ids, thanks.
surface.surface:contents() does work too btw! But now I'm confused as to why the example from the tutorial is missing the reference and seemed to be working for Skugga.
I now understand my confusion with name and Ids, thanks.
surface.surface:contents() does work too btw! But now I'm confused as to why the example from the tutorial is missing the reference and seemed to be working for Skugga.
- QuintinStone
- Posts: 72
- Joined: Sat Nov 01, 2014 9:58 pm
Re: Editor Tutorials on YouTube - part 12 is out
Me too! I had trouble with coding surfaces because contents() is not listed in the reference.blob wrote:Ah! Thanks a ton to the two of you!
I now understand my confusion with name and Ids, thanks.
surface.surface:contents() does work too btw! But now I'm confused as to why the example from the tutorial is missing the reference and seemed to be working for Skugga.
Crypt of Zulfar
- Skuggasveinn
- Posts: 562
- Joined: Wed Sep 26, 2012 5:28 pm
Re: Editor Tutorials on YouTube - part 12 is out
Thanks for kind words.
I've not done a tut in some time but I'm far from "gone" (got a PM asking if I was gone from LoG2 modding )
I've just been working on some things like waterfalls, you can take a look at them here http://youtu.be/96v6ZV2R14I
I've also been working on a urban town creating kit, it's a model set that uses the existing log2 models and textures and lets you create houses, its modular so you can create any layout, multible floors etc.
Since its all existing stuff its footprint size has minimal impact on your mods size.
Screen of a house is here http://www.zorglubb.net/grimrock/images ... ouse_2.jpg
but just wanted to jump in and say I'm far from gone
I've not done a tut in some time but I'm far from "gone" (got a PM asking if I was gone from LoG2 modding )
I've just been working on some things like waterfalls, you can take a look at them here http://youtu.be/96v6ZV2R14I
I've also been working on a urban town creating kit, it's a model set that uses the existing log2 models and textures and lets you create houses, its modular so you can create any layout, multible floors etc.
Since its all existing stuff its footprint size has minimal impact on your mods size.
Screen of a house is here http://www.zorglubb.net/grimrock/images ... ouse_2.jpg
but just wanted to jump in and say I'm far from gone