Trying to implement some puzzles where you throw stuff around. Encountering a couple of issues...
1) Is there an onThrow hook?
From the scripting reference I couldn't find a hook that's triggered when the player throws an item. Is there such hook? Or is there some other nice way to get called when an item is thrown. I'd like to for example get the position where the throwing occurred.
2) Throws are random?
One thing I noticed with some (long) throws is that the objects don't always end up in the same place for the same throw. In the screenshots below I throw blue gems to a hole that's 7 tiles forward and 2 tiles down, some gems go in and some hit the top of the hole and fall to the ground, apparently randomly. Wonder if it's a bug or intentional behavior...
Does anybody know anything that could help?
Throwing
Re: Throwing
Take a look at the ThrowAttackComponent. I haven't used this yet but maybe "onPostAttack()" is like onThrow()
Re: Throwing
There might be a slight difference in throwing length based on where on the screen you click. I recommend you try some tests where you throw all the gems from the middle of the screen, then all the gems from the top of the screen. I'm not sure if it works like this but it is worth testing out.
Re: Throwing
That's what I suspected too, but based on little testing the clicking position doesn't seem to affect the throw.sps999 wrote:There might be a slight difference in throwing length based on where on the screen you click. I recommend you try some tests where you throw all the gems from the middle of the screen, then all the gems from the top of the screen. I'm not sure if it works like this but it is worth testing out.