Having issues constraining "Cool light effect"

TheHooglerTheHoogler Member Posts: 102
edited November -1 in Working with GS (Mac)
Yo!

So, here's the issue. My hero is sending its coords. to game.attributes Hero X and Hero Y. My overlying "cool light" actor is constrained to these coords. This is confirmed, because no matter where I place the Hero on the screen, in preview the "light" is centered on him. However, the overlying "light" doesn't want to follow him along the y axis. I've tried with and without camera control (including changing the camera box). Maybe I'm mistaken, but if my constrain works whereever I place my hero, it should then follow him in game, right? I included a video showing the movement (ignore artwork, the only thing that is actually ingame is the hero).



Any help is appreciated!

Comments

  • hotMagichotMagic Member, PRO Posts: 266
    I don't know the cool light demo, but I assume the player constrains its X and Y to a game attribute, and then the cool light mask is constrained to that?
    Since your scene scrolls, the light is technically not moving at all in the video, right?

    So maybe it's not following it at all? Is that where you placed it in the scene? If you place the light randomly off to the side or the right, will it at least snap to player area?
  • InLikeFlynnInLikeFlynn Member Posts: 171
    Are the coordinates your hero sends, and the light's location constrained? It should be Hero.y is constrained to self.location.y for the fish, and the light's self.location.y is constrained to Hero.y it should work.
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    The image for the light effect isnt on a non scrollable layer right

    you can try to add a offset for the camera, in the y constrain. Not sure if thats your problem though, and im not home right now. Its just somethign to try

  • TheHooglerTheHoogler Member Posts: 102
    I suppose I didn't say this explicitly enough, but I've confirmed the constrains work because the "light mask" isn't placed on top of the hero, but it still snaps to place in preview (like it should).

    @John
    I'm going to have to check that, but I doubt thats the issue, since there technically isn't any scrolling (the camera never moves, setup is based on DBA Endless Runner). I have a feeling that if it were actually a scrolling game, the "light mask" could follow the camera fairly easily. As I'm writing this, I'm thinking that if I increase the vertical axis of the scene, the problem may solve itself, but I'm not sure if I want the scene to grow...

    I'm going to keep tinkering with it, and I appreciate the help!
  • TheHooglerTheHoogler Member Posts: 102
    Solved!

    My "game dyslexkia" (dethklok anyone?) had kicked in. I'm so used to always setting up a change attribute to mark starting location, that I accidently used change instead of constrain for my light mask.
Sign In or Register to comment.