x


How to make a falling object cause damage?

Hello, i've just finished the 'FPS Tutorial' and managed to make a quick scene that involves a big creature that you fire fireballs at - which reduce it's hit points. I've also created a structure around the creature that supports a large block, i've made it so that i can destroy the supports with my fireballs and the block falls onto the creature, however i want to know how i can make the block cause damage to the creature?

I've tried to edit my current scripts to fit the situation but cant quite get it to work as i'm still very new to JavaScript.

Any help would be appreciated, thanks!

more ▼

asked Apr 23 '10 at 02:00 PM

Jack Eaves gravatar image

Jack Eaves
235 12 12 26

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

It's hard to answer without seeing the scripts you're currently using, but a basic solution would be to copy the collision setup from your bullets.

Just use the same kind of hitbox/settings/code that you're using on your bullets on the block, so that when it hits something, it will give it damage. Depending on the complexity of your scene, you might have to get creative and add a child object for the hitbox, but this should set you on the right path at least.

more ▼

answered Apr 23 '10 at 02:35 PM

Silverfell gravatar image

Silverfell
98 1 1 7

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3330
x248
x11

asked: Apr 23 '10 at 02:00 PM

Seen: 1345 times

Last Updated: Apr 23 '10 at 02:00 PM