Help with off screen indicator

EmrysEmrys Member Posts: 38
edited November -1 in Working with GS (Mac)
I want to have an indicator on screen that points to an off screen target. Sort of like a bucket you slide back and forth to catch falling objects with. But I need something to show where it is when it is off screen and that the player can still control the left right movement of.

I have started with the premise used to have one actor follow another.
I have set up an attribute TargetX and set the bucket to make the attribute the same as it's X, but how do I get an actor to read that attribute as its own? And, keep that actor on screen?

I tried putting the actor on a non-scrolling HUD layer but that did not seem to work.

Any ideas?

Comments

  • EmrysEmrys Member Posts: 38
    Hey again. Still working on this problem.

    Re-cap:
    In a game with multiple screens, I want to give the player an arrow indicator to show where the off screen goal is.

    The indicator needs to be on screen when the goal is off screen.
    The tricky part is that the goal can be moved also.

    I can an indicator that tracks the necessary X position, but it is always on screen.

    Any ideas?
  • ChaserChaser Member Posts: 1,453
    If I understand correctly try constraining the arrow to the goals either x or y but with an offset of so many pixels. Or something to that effect
  • EmrysEmrys Member Posts: 38
    Thanks. I have tried an offset and that does help.
    But, the real problem is that the scene size is several screens wide.

    So, how do I detect when the target goal is off screen and turn on the indicator Arrow( actor). And keep it on screen.

    I was thinking that maybe it needs to be on the HUD layer like the score.

    If you have played Street Fighter - they have an arrow to show where the off screen character is - some thing like that.
  • ChaserChaser Member Posts: 1,453
    Not exactly sure I'm imagining the same thing you are but how about an invisible actor maybe a HUD style that sits on the main portion of the screen and create an attribute set it to 1 when it is touching the goal on screen and 0 when it is not touching then in the arrow if attribute is 1 change self alpha to 0 and when attribute is 0 set arrow alpha to 1 so the arrow shows only when the invisible HUD dies not overlap the goal
  • EmrysEmrys Member Posts: 38
    Hmmm.... that might work. I will see if I can implement that.

    Thanks. :)
  • cogwerx.llccogwerx.llc Member Posts: 4
    Thanks. :)
    Oops... this one of the other guys' login. Honest, its me Emyrs. :D

    In my case the camera will be tracking the main character, but the player will need to know where a moveable goal that is off screen is. That seems badly worded ...

    There is a goal that is movable. When it is off screen I would like an indicator arrow to appear and track it's x position.

    I think I can get what I need off that demo.
    Then add an "on screen - true/false" boolean to the mix.
  • EmrysEmrys Member Posts: 38
    That was weird... almost like being some one else.
  • obsoleteentertainmentobsoleteentertainment Member, PRO Posts: 21
    Hello,

    i want to accomplish exactly the same but dont know how.

    I have a scene which is 960x960 and a camera following actor 1. Then there is a non movable actor 2 and i want some kind of indicator to point to actor 2. Any idea?
  • obsoleteentertainmentobsoleteentertainment Member, PRO Posts: 21
    please delete....
  • obsoleteentertainmentobsoleteentertainment Member, PRO Posts: 21
    a non movable rotating hud compass needle would be great too, if this is easier...
Sign In or Register to comment.