throwing bomb?

Get help using Construct 2

Post » Thu Aug 16, 2012 11:32 am

hello

i was making a platform game and want the enemy soldier to through bomb..
1) how can i make him through a bomb at a angle
(like, i have added animation of throwing bomb on soldier
with that the bomb leaves his hand with a angle to my player!!

what event should i add and how?


thanks help will be appreciated
B
3
Posts: 13
Reputation: 476

Post » Thu Aug 16, 2012 3:45 pm

what happened guys no body knows the answer
B
3
Posts: 13
Reputation: 476

Post » Thu Aug 16, 2012 4:42 pm

You can spawn another object (bomb) and create the movement of throwing.
Then you add a wait of x seconds before it explodes to look real.
When it explodes, it would destroy everything in a radius (distance).
B
85
S
31
G
22
Posts: 384
Reputation: 18,587

Post » Thu Aug 16, 2012 5:03 pm

So the bomb is thrown now?
Set a variable on the bombs called timer.
Every second, pick every bomb and reduce bomb.timer by 1.
Make another event if bomb.timer = 0, explode.

I would make it shoot out flaks in all directions, make small sprites that shoot out of the bomb and deal damage and die at the same time. This way damage detection allows for soldiers to block bombs for other soldiers.
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Thu Aug 16, 2012 5:30 pm

also it would be really cool if you add some physics on the bomb so it will bounce on the ground like 2-3 times then bomb.. also after it explode you can spawn another object ( the explode object) this will destroy anything collision with it .. you don't need radius and these kind of stuffs ^^
B
45
S
15
G
6
Posts: 795
Reputation: 11,935

Post » Thu Aug 16, 2012 5:40 pm

thanks for great replys guys..
but how can i through that bomb in d shape like in a round shape to ground
you know what i mean how we through grenades!!!

below is a snapshot
https://lh4.googleusercontent.com/-FZF3TT0PJtg/UC0iOH2Kw6I/AAAAAAAAAGI/zY8YOEDH5es/s576/snap.gif

his throwing animation is not working is anything wrong!!
and also he dosent throw bomb properly not from animation but from his stomach..i know i can put image point for that.kaushik0002012-08-16 17:43:21
B
3
Posts: 13
Reputation: 476

Post » Thu Aug 16, 2012 5:55 pm

You are setting its angle, but you aren't throwing it.
You can give it the platform behavior and add speed (Vector X and Y) to it!Rory2012-08-16 17:55:52
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Thu Aug 16, 2012 6:06 pm

first of all try to read my tutorail about platform animations.
http://www.scirra.com/tutorials/351/platform-behaviors-animation
2nd thing if you wanna the bomb to go to the ground try to use physics it will give them nice effect as i said... also you can use platform as Rory said.

last thing the spawn from stomach this because you have to change the point to fix that do these stuffs :
1- go to your player and click edit animation > create new point and put them on in the place where it should spawn
2- in eventsheet > in the event of spawn > put the number of the piont that you created .

B
45
S
15
G
6
Posts: 795
Reputation: 11,935


Return to How do I....?

Who is online

Users browsing this forum: Asmodean, davides, Walessio and 25 guests