
Search found 9 matches
- Tue Nov 04, 2014 11:55 pm
- Forum: Mod Creation
- Topic: Script: Make Multiple Buttons/Levers
- Replies: 31
- Views: 46105
- Tue Nov 04, 2014 8:20 pm
- Forum: Mod Creation
- Topic: [Monster] Bring on the snails! [now with turbo-mode]
- Replies: 48
- Views: 57423
Re: [Monster] Bring on the snails! *working*
Sooo wait a sec... are all the old monsters in the log2 assets pack? Waiting to be ported over?
- Tue Nov 04, 2014 2:39 pm
- Forum: Mod Creation
- Topic: New hooks?
- Replies: 31
- Views: 21839
Re: New hooks?
I second thatProzail wrote:
Also, an onDamage hook on the HealthComponent would be nice.

- Tue Nov 04, 2014 10:28 am
- Forum: Mod Creation
- Topic: A list of what hooks i've found.
- Replies: 22
- Views: 15934
Re: A list of what hooks i've found.
@Akroma not sure, couldn't test it yet, BUT the reference says "onEquipItem(self, champion, slot)"... Maybe if you add a first parameter it works?
- Mon Nov 03, 2014 3:01 pm
- Forum: Mod Creation
- Topic: Breakable Cave-ins
- Replies: 7
- Views: 5865
Re: Breakable Cave-ins
Sorry if I was not usefull :( But this time I will be!! You are trying to do rock=math.random(1,4)+1 try local rock = math.random(1,4)+1 and choose a valid id in your spawn call (you can omitt the id, it's optional) onDie = function(self) -- when blockage is destroyed, spawn 1-4 rocks. -- local rock...
- Sun Nov 02, 2014 7:44 pm
- Forum: Mod Creation
- Topic: Breakable Cave-ins
- Replies: 7
- Views: 5865
Re: Breakable Cave-ins
If you want to make it breakable you have to add a health component.
Something like
Something like
SpoilerShow
Code: Select all
{
class = "Health",
health = 20,
onDie = function()
party.party:shakeCamera(0.3,0.6)
playSound("wall_sliding_lock")
--etc.
end
}
- Sun Nov 02, 2014 2:13 pm
- Forum: Mod Creation
- Topic: Ask a simple question, get a simple answer
- Replies: 3990
- Views: 3478042
Re: Ask a simple question, get a simple answer
I am trying to make an obstacle witch can be destroyed by a special item, let's say a sledghammer. My first thought was to add a onDamage hook to the obstacle component, but that didn't work. So I added a health component and voila, it was destructable, but still no onDamage check. My question is: w...
- Sun Nov 02, 2014 2:02 am
- Forum: Mod Creation
- Topic: Destroying a cave-in with a pickaxe
- Replies: 5
- Views: 4922
Re: Destroying a cave-in with a pickaxe
@JohnWordsworth Yeah, that's what I meant with boilerplatey
But, wow, I did oversee those two functions... would have made that somewhat easier, thank you.

But, wow, I did oversee those two functions... would have made that somewhat easier, thank you.
- Sun Nov 02, 2014 1:21 am
- Forum: Mod Creation
- Topic: Destroying a cave-in with a pickaxe
- Replies: 5
- Views: 4922
Re: Destroying a cave-in with a pickaxe
So I gave this a try and came up with this somewhat boilerplaty code (I crindged a little bit writing it) :D components = { { class="MeleeAttack", onAttack = function(self) local facing = party.facing local level = party.level local x = party.x local y = party.y local foundOne = false loca...