how to trow a object to a image point?

For questions about using Classic.

Post » Wed Apr 27, 2011 8:20 pm

Hi all,

I was wondering how to trow a object to a enemy's image point? (my case it's the enemy's head)

Is this posible? and if... how?

I can't use bullet behavior for it in my case, I use Physics to trow rocks.

Thanks in advance for any reply ;)
B
42
S
7
G
5
Posts: 110
Reputation: 3,480

Post » Thu Apr 28, 2011 12:41 am

How is the rock thrown, arcing or straight?
For straight you could turn off gravity and just apply force toward the direction of the target.

Arcing however I do believe will prove more of a problem
B
51
S
10
G
7
Posts: 184
Reputation: 6,825

Post » Fri Apr 29, 2011 6:23 am

[quote:37dfea1x] How is the rock thrown, arcing or straight?
For straight you could turn off gravity and just apply force toward the direction of the target. [/quote:37dfea1x]

its arcing and its not posible I think

but thanks for the reply ;)
B
42
S
7
G
5
Posts: 110
Reputation: 3,480

Post » Fri Apr 29, 2011 6:34 pm

I need to trow a rock in a arc from player to enemy and that it hits his head, need this option when the players XP in aim is high, so that you get a instant hit at enemy head, it doesn't matter anymore if I need bullit or psycics behavior for it.

anyone?
B
42
S
7
G
5
Posts: 110
Reputation: 3,480

Post » Fri Apr 29, 2011 8:35 pm

Calculating an arc like that requires some fairly decent math knowledge. Here is a little interactive Flash presentation on game physics that might point you in the right direction (the stuff about arcs is towards the end):

http://www.rodedev.com/tutorials/gamephysics/
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon May 02, 2011 2:33 pm

[quote:2eocllhg] Calculating an arc like that requires some fairly decent math knowledge. Here is a little interactive Flash presentation on game physics that might point you in the right direction (the stuff about arcs is towards the end):

http://www.rodedev.com/tutorials/gamephysics/ [/quote:2eocllhg]

Thanks Deadeye, this link is verry helpfull to understand how to calculate this kind of things :D :D :D
B
42
S
7
G
5
Posts: 110
Reputation: 3,480

Post » Mon May 02, 2011 3:38 pm

Great information indeed, but forgive me if I'm missing something, but isn't the question really... "how do I do this in Construct?" And if so, how would you translate that information that's written in a language programming environment to Construct which is an event-based programming environment which inherently requires steps, input techniques and understandings that differ pretty much entirely from those found in the language programming environment used as an example in the flash video?
B
12
S
4
G
3
Posts: 426
Reputation: 2,458

Post » Mon May 02, 2011 5:46 pm

You can do it with one event with the physics behavior. Change the PV 't' to change how long in seconds it takes to get to the target.
[url:32gdliww]http://dl.dropbox.com/u/5426011/examples4/projectile2.cap[/url:32gdliww] made in 0.99.97
B
79
S
24
G
52
Posts: 4,724
Reputation: 39,711

Post » Mon May 02, 2011 6:01 pm

Nice, I don't understand it, but 9.8 looks like Earth's gravity, that means...no still don't understand it:). Thanks for sharing
ImageImage
B
25
S
6
G
8
Posts: 773
Reputation: 6,643

Post » Tue May 03, 2011 4:25 pm

[quote:2jfe552q] You can do it with one event with the physics behavior. Change the PV 't' to change how long in seconds it takes to get to the target.
http://dl.dropbox.com/u/5426011/example ... ctile2.cap made in 0.99.97 [/quote:2jfe552q]

Thanks ROJOhound, this is really what I need, a conctruct expample :D :D :D

It's awesome how you do that with only 1 event, don't understand either the logic of this formule but thats more because my low mathematic skills.

Thanks again for this example :D :D :D
B
42
S
7
G
5
Posts: 110
Reputation: 3,480

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests