How do I solve instance issues ?

Get help using Construct 2

Post » Thu Oct 20, 2016 6:39 pm

yes...exactly...but with the smooth effect that u did.... in the game there are several doors...and of coures only the the one wil turn to which u shoot...

thanks so much 4 your help... 2 days I have spend in frustrations for that effect...
B
37
S
16
G
2
Posts: 447
Reputation: 4,865

Post » Fri Oct 21, 2016 8:48 am

Following example can turn door from any angle depends on from where bullet fired up. Not smooth but you get the idea:
https://dl.dropboxusercontent.com/u/659 ... r_hit.capx
ImageImage
B
109
S
50
G
23
Posts: 783
Reputation: 22,736

Post » Fri Oct 21, 2016 9:15 am

Based on @alextro's example :
Image

Can likely be better applied (to determine the angle doors are supposed to turn to), but that's the idea on how to have them each doing the smooth move each time they are hit.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
292
S
115
G
96
Posts: 7,297
Reputation: 70,799

Post » Fri Oct 21, 2016 11:27 am

thanks a lot, can U post the capx please ?
B
37
S
16
G
2
Posts: 447
Reputation: 4,865

Post » Fri Oct 21, 2016 3:06 pm

imbarassing, but i could not replicate your code, so a capx would save me...

happy birtday by the way :)
B
37
S
16
G
2
Posts: 447
Reputation: 4,865

Post » Fri Oct 21, 2016 8:46 pm

@mariogamer
You just need to modify my last sample, add 2 instance variables, one with a name "Angling" (boolean) and another one with a name "AngleDest" (number). Kyatric already gives clear screenshot for the events.
ImageImage
B
109
S
50
G
23
Posts: 783
Reputation: 22,736

Post » Sat Oct 22, 2016 4:48 am

thanks...it works...thank to both !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
B
37
S
16
G
2
Posts: 447
Reputation: 4,865

Post » Sat Oct 22, 2016 8:08 am

hi guys, I have replicated the code...the problem ( also with the simple version) is that sometimes the door rotates in the wrong side... any solution ?
B
37
S
16
G
2
Posts: 447
Reputation: 4,865

Previous

Return to How do I....?

Who is online

Users browsing this forum: 25games, Artcadev and 20 guests