need help

Get help using Construct 2

Post » Thu Dec 15, 2011 6:54 pm

I created platformer game and I added three opponents. Each of the opponents should have a arm with weapon to aim for the player. Now, how to do that, every opponent had his hand with a gun and when you destroy opponent, the arm disappears, but only that arm which belongs to opponent.

I know only one solution to make each hand separately, and each opponent + the same events. but it's too much work!
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963

Post » Thu Dec 15, 2011 7:03 pm

You have to work with variables i guess. But wait better Answers, i'm not a C2 expert
B
12
S
3
G
5
Posts: 174
Reputation: 4,018

Post » Thu Dec 15, 2011 7:34 pm

here's an example

move with keys and the weapons target the mouse, clicking on enemy destroys both
its same principle

example demo

example capx vtrix2011-12-15 19:36:29
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Thu Dec 15, 2011 7:36 pm

this is it?:) can you explain this? please:)
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963

Post » Thu Dec 15, 2011 7:42 pm

well the important part is that you want to store the uid of the enemy in both the enemy var and into the weapon var, with this you can "connect them"

what else can i explain?
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Thu Dec 15, 2011 7:58 pm

I try add your idea to my game first :)
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963

Post » Thu Dec 15, 2011 8:48 pm

Extract from the "How do I FAQ"

[quote]Selecting/Picking the correct UID - LINK[/quote]
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Thu Dec 15, 2011 8:50 pm

thanks kyatric, you're always at the ready:)
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963

Post » Thu Dec 15, 2011 10:24 pm

vtrix Is there a possibility to work, just manually put opponents on the map? I mean: you write a possition but i have already placed opponents on the mapdelgado2011-12-15 22:27:07
B
93
S
19
G
34
Posts: 1,840
Reputation: 27,963

Post » Thu Dec 15, 2011 10:47 pm

yes, just dont create the opponents, the rest is the same

so ..

for each opponent create gun/arm and set its nr(var) to opponent uid
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Next

Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, jul, nicklowkcmagic and 18 guests