How do I a indication item on the edge of layout

Get help using Construct 2

Post » Fri Sep 23, 2016 5:34 am

Hello friends,
Please help me on making an indicator for incoming objects(missiles in this case) towards the player, the indicator will only be stuck to the border of the layout and when the object enters the screen that indicator will then disappear
Thanks :D
B
10
Posts: 26
Reputation: 485

Post » Fri Sep 23, 2016 12:20 pm

Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 682
Reputation: 16,645

Post » Sat Sep 24, 2016 5:43 am

Message: amitkuliyal can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
PixelPower wrote:http://www28.zippyshare.com/v/r1Zzy8jE/file.html

Done!!


Thanks for replying PixelPower
But this is no were close to what I was talking about, anyway, I've uploaded a picture to make it clearer.
so in the picture red objects are the missiles coming towards the player(green) and the red triangles are the indicating objects that will inform the player that something is coming from that direction.
Hope you understand it this time. :D

http://postimg.org/image/863l9o9z1/
B
10
Posts: 26
Reputation: 485

Post » Sat Sep 24, 2016 6:01 am

amitkuliyal wrote:
PixelPower wrote:http://www28.zippyshare.com/v/r1Zzy8jE/file.html

Done!!


Thanks for replying PixelPower
But this is no were close to what I was talking about, anyway, I've uploaded a picture to make it clearer.
so in the picture red objects are the missiles coming towards the player(green) and the red triangles are the indicating objects that will inform the player that something is coming from that direction.
Hope you understand it this time. :D

http://postimg.org/image/863l9o9z1/


Ok this is a variation that looks like your photo. You wait 2 seconds, indicator comes on and 1 second later enemy comes on the screen.

http://www92.zippyshare.com/v/OuSQROhI/file.html
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 682
Reputation: 16,645

Post » Sat Sep 24, 2016 6:02 am

you could do set X at a constant rate and then set Y at the object Y ?

If you want a bottom too just do the same except reverse. ? would that help ?
B
52
S
24
G
6
Posts: 391
Reputation: 7,855

Post » Sat Sep 24, 2016 6:34 am

Gearworkdragon wrote:you could do set X at a constant rate and then set Y at the object Y ?

If you want a bottom too just do the same except reverse. ? would that help ?


That would help alot but I don't think the OP would understand that. The 1st capx file I sent gave the basic principle and yet the OP said it wasn't even close to what they wanted. That means the OP doesn't understand events fully yet. All the OP had to do was use the same logic to accomplish what they wanted to do.
Check out my awesome Android Game releases https://play.google.com/store/apps/deve ... ames&hl=en
B
38
S
18
G
24
Posts: 682
Reputation: 16,645

Post » Sat Sep 24, 2016 7:43 pm

@amitkuliyal

A lot easyer with a certain plugin. But last time i used that, panic hit the pan.

So ... without a plugin :

https://www.dropbox.com/s/2jasga2cfo6nm ... .capx?dl=0

Have Fun.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Sep 26, 2016 6:11 am

Sorry guys for not replying this long actually i was first testing/ trying to get use from the logic everyone suggested here but unfortunately, i couldn't figure it out.
The problem here is: my player (plane with car behaviour) is rotating all over( with unbounded background) and the missiles are spawning randomly somewhere out of the layout(or rather around a moving layout) and now whenever a missile gets close lets say 100 pixels away to the layout, an indicator will spawn and keep tracking the missiles action till it enters(or hit the indicator item) the layout.
I liked the idea that @Gearworkdragon suggested and i'm working on this logic to make it work for now it only spawn the tracker at the right position on the layout edge but not following the missile.
BTW @99Instances2Go what is that plugin you are talking about? and your way is fine but for my game it doesn't work the way i want it. I am making an example file that i'll share hope that would make sense to everyone
Again thanks everyone from your help. :D
B
10
Posts: 26
Reputation: 485

Post » Mon Sep 26, 2016 7:34 am

Message: amitkuliyal can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
Guys here is a demo Please have a look
http://www108.zippyshare.com/v/TY2uEmGU/file.html

now i wanted to show the indicator on the edges of the screen, see if you can help me on that
Thanks
B
10
Posts: 26
Reputation: 485

Post » Mon Sep 26, 2016 6:12 pm

There are 2 plugins that can help you with this.

To raytrace ...
plugin-jcw-trace-raycast_t172320
With the plugin you can do it like every ticK.

To predict interceptions.
behavior-rex-interception_t178838
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Next

Return to How do I....?

Who is online

Users browsing this forum: angryscientist, Google [Bot] and 27 guests