Sprite set to follow character

Get help using Construct 2

Post » Tue Mar 08, 2016 9:54 am

Hey all,

I had a little problem. We have a certain light that follows our character. It is doing what i want but when the side scrolling starts the light will "walk" away from the character...

Does anyone know how to fix it or a better way to make this work?
It is a sprite with a blend mode on a layer.

Image
I let the "light" follow the character from a image point.

Image
Image
Image
B
3
Posts: 5
Reputation: 185

Post » Tue Mar 08, 2016 10:14 am

Are either of them using scroll to behavior?
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620

Post » Tue Mar 08, 2016 10:15 am

Yes the character has a scroll to.
B
3
Posts: 5
Reputation: 185

Post » Tue Mar 08, 2016 10:17 am

Does something speak against a pin behaviour?

p.s. nice looking graphics

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Tue Mar 08, 2016 10:18 am

Could I see a capx please, if you don't mind, Dooft?
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620

Post » Tue Mar 08, 2016 10:21 am

Nope, i'm not using the pin behaviour. Should i?
Some variables might be in Dutch
Last edited by Dooft on Tue Mar 08, 2016 11:09 am, edited 2 times in total.
B
3
Posts: 5
Reputation: 185

Post » Tue Mar 08, 2016 10:22 am

Huh, I noticed how it does that when you don't have enough rep. Try an url shortener, I think I have a fix anyway in a moment.
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620

Post » Tue Mar 08, 2016 10:23 am

old Link
Last edited by Dooft on Tue Mar 08, 2016 11:08 am, edited 1 time in total.
B
3
Posts: 5
Reputation: 185

Post » Tue Mar 08, 2016 10:45 am

Here's a fix, pretty simple. Sorry for the delay, sort of tried to rip your code apart bit by bit until I realized the actual solution.

https://dl.dropboxusercontent.com/u/589 ... otype.capx

What I did was change the (now named "flashlight") "test" layer's scroll to "100,100". If you want an object to follow the player across screen and even outside the window (say, for a big level), the scroll has to be 100,100 and not 0,0. 0,0 will force it to stay within the project's specified screen window size.
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
51
S
24
G
30
Posts: 534
Reputation: 19,620

Post » Tue Mar 08, 2016 10:50 am

Thank you!
B
3
Posts: 5
Reputation: 185


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, dand, tarek2, tinhofiel and 28 guests