How do I Make an Objective Marker

Get help using Construct 2

Post » Wed Aug 27, 2014 2:35 pm

Hello people,

Today i'm looking for make an objective Marker.

This Marker will have the function to indicate the position of the Mission Objectives in the Game's Window by turning all around the Window. ( Hope you see what i mean XD )

So befor posting i've try to make it by using the Anchor Behavior and set the Parrallax to 0,0 the problem was when i set the Marker ( Sprite1 ) position to the Objective ( Sprite2 ) position the Marker ( Sprite1 ) don't appear on the sreen ... Then i have also try with the Anchor and Parrallax set to 100,100, but with this one the Marker ( Sprite1 ) stay on the Objectives ( Sprites2 ) position and only the Angle was modify ...

Hope some Hero can help me ^^

Thank you =)
B
19
S
8
G
2
Posts: 68
Reputation: 2,066

Post » Wed Aug 27, 2014 3:26 pm

Not sure if that correspond, but setting it to :

X: clamp(Objective.X, ViewportLeft(Self.LayerName)+Self.Width, ViewportRight(Self.LayerName)-Self.Width)
y: clamp(Objective.Y, ViewportTop(Self.LayerName)+Self.Height, ViewportBottom(Self.LayerName)-Self.Height),

Should put it on the objective unless it is offscreen, in that case it will be at the same X or Y, but stay on the border of the screen
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Wed Aug 27, 2014 4:11 pm

Only One thing to say ... Perfect a big thanks to you Aphrodite, another beer to pay ^^
B
19
S
8
G
2
Posts: 68
Reputation: 2,066


Return to How do I....?

Who is online

Users browsing this forum: tarek2 and 9 guests