Page 121 of 391

Re: Ask a simple question, get a simple answer

Posted: Tue May 17, 2016 8:53 am
by Isaac
minmay wrote:Do not use surfaces or sockets to add items to the map. Items cannot be removed from surfaces or sockets except by destroying the items or having the player click on them (destroying the surface/socket just taints the item and makes it impossible to pick up ever again without causing a crash).
When I mentioned using a surface, I mentioned using a surface that remains until the last item is picked up.

Consider a surface that refuses to accept items via the mouse, and only once it is empty of all items, does it get destroyed.

Is there a technical reason that this is lesser than the dummy monster? (I like it also because I can control where the surface exists, and can even randomize ~or customize where the items lay... including placement at angles, or even sticking out of the ground, like a sword stabbed in the earth.)

Re: Ask a simple question, get a simple answer

Posted: Tue May 17, 2016 9:57 am
by minmay
I am fully aware of what you suggested. It prevents the items from working like you'd expect items on the floor to work: pushing them around, being able to pick them up from the correct squares, etc. It is therefore highly unlikely that this approach is what Illidan is looking for.

You can customize the positions of the items much more by using a dummy monster; just move them around however you want after they are dropped.

Re: Ask a simple question, get a simple answer

Posted: Sat May 28, 2016 7:22 am
by Eleven Warrior
Hi all.

Ok there is this code in the spore_mushroom and I don't know what it does exactly. I assume when the mushroom is killed it's meant to spawn something?

How does this work?

Code: Select all

onAnimationEvent = function(self, event)
				if event == "spawn" then
					-- select random spawner
					local x,y = 0,0
					local r = math.random(1,4)
					
					if r == 1 then
						x=-1
					elseif r == 2 then
						x=1
					elseif r == 3 then
						y=-1
					else
						y=1
					end
					
					for i in self.go.map:entitiesAt(self.go.x+x, self.go.y+y) do
						if i.name == "spawner" then
							local s = i.spawner
							
							-- spawn random herder
							local rand = math.random(1,5)
							if rand <= 2 then
								s:setSpawnedEntity("herder")
							elseif rand <= 4 then
								s:setSpawnedEntity("herder_small")
							else
								s:setSpawnedEntity("herder_big")
							end
							s:activate()
							
							-- spawn poison cloud
							s:setSpawnedEntity("poison_cloud_medium")
							s:activate()
						end
					end
				end
			end,
		},

Re: Ask a simple question, get a simple answer

Posted: Sat May 28, 2016 7:33 am
by minmay
Isle of Nex directs the monster to perform the "spawn" animation when it's time to make a new herder in the Herder's Den boss fight. That onAnimationEvent hook exists to activate the adjacent spawners on the correct frame.

Re: Ask a simple question, get a simple answer

Posted: Sat May 28, 2016 8:30 am
by vieuxchat
Why the castle_wall_cloth isn't hit ?
It has health, shouldn't it be hittable ?

Re: Ask a simple question, get a simple answer

Posted: Sat May 28, 2016 3:58 pm
by Isaac
vieuxchat wrote:Why the castle_wall_cloth isn't hit ?
It has health, shouldn't it be hittable ?
Possible oversight. But it's easy to implement in one's own mods.

Re: Ask a simple question, get a simple answer

Posted: Sat May 28, 2016 8:54 pm
by poomanchu
So I downloaded the asset pack 2 but I can't figure out where to put them. Where do I put the folders?

Re: Ask a simple question, get a simple answer

Posted: Sat May 28, 2016 11:24 pm
by Isaac
poomanchu wrote:So I downloaded the asset pack 2 but I can't figure out where to put them. Where do I put the folders?
Anywhere you find convenient... It's not really [directly] used by the game, or in mods. To use the asset pack, you reference its internal files & folder system in your scripts; it is a partial copy of the game's internal "assets" folder; consider it an index of that folder.

It also gives [copied] direct file access to the game's internal assets, for inspection, study, or for new [derived] assets that you will include in your mod_assets folder. You do not have to include anything in the asset pack with your mod, because the game [everyone's install] already has it all internally.

I put my copy in the Almost Human folder found in my documents folder; everyone has that if they've installed the [Windows version of the] game.

Re: Ask a simple question, get a simple answer

Posted: Sat May 28, 2016 11:48 pm
by poomanchu
Isaac wrote:
poomanchu wrote:So I downloaded the asset pack 2 but I can't figure out where to put them. Where do I put the folders?
Anywhere you find convenient... It's not really [directly] used by the game, or in mods. To use the asset pack, you reference its internal files & folder system in your scripts; it is a partial copy of the game's internal "assets" folder; consider it an index of that folder.

It also gives [copied] direct file access to the game's internal assets, for inspection, study, or for new [derived] assets that you will include in your mod_assets folder. You do not have to include anything in the asset pack with your mod, because the game [everyone's install] already has it all internally.

I put my copy in the Almost Human folder found in my documents folder; everyone has that if they've installed the [Windows version of the] game.
Oh, so it's a means for making custom assets. I was looking in the models/env/and saw forest_statue_ivy_01. I cant find that in the editor under asset search though. Is that file attached to something like forest_statue_01 then?

Re: Ask a simple question, get a simple answer

Posted: Sun May 29, 2016 1:04 am
by Isaac
poomanchu wrote:Oh, so it's a means for making custom assets. I was looking in the models/env/and saw forest_statue_ivy_01. I cant find that in the editor under asset search though. Is that file attached to something like forest_statue_01 then?
It's possible that it is not used in the game; and so ~not defined ~and not in the editor. There are assets in the packs for both LoG1 & 2 that are not seen in the games.