Aligned objects

0 favourites
  • 12 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • Hello

    Can anyone show me how to set an event that does the following:

    If Object X is facing(or aligned to)Object Y then perform action Z.

    It doesn't have to work with tolerance.

    Or direct me to a thread where this is discussed.

    Thanks <img src="smileys/smiley19.gif" border="0" align="middle" />

    saludos :D

  • It depends on what you mean by aligned.

    Also Object.X is its horizontal coordinate, whereas Object.Y is its vertical coordinate.

    What exactly do you want to achieve ?

  • It's like in the demo and tutorial game Construct 2 delivers, Ghost shooter.

    The player is facing the mouse, is looking at the mouse.

    Or when you use the "set angle towards position" action.

    What I want is an event that detects when this happens without using "set angle".

    Like when you use "rotate clockwise"r "rotate towards" on an object,and another object is moving around it, I want an event that performs an action when the one rotating gets to face the moving one, just like the player in ghost shooter is facing mouse.x and mouse.y.

    What I meant by Object x is a random object, an object that i choose, not object.x, sorry for the confusion.


    saludos :D

  • I'm still unsure of what you want to do but does this helps ?

  • I'm still unsure of what you want to do but does this helps ?

    Ou yeah it helped already !

    This is what I wanted :D

    Where can i get a list of all the functions end expressions that you can use in Construct 2, like distance, angle, etc ?

    Thanks !

    saludos :D

  • In the expressions window (available when setting the value for a variable for example) when you double click on system.

  • Thanks !

    <img src="smileys/smiley32.gif" border="0" align="middle" />

    saludos <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Great examples guys!

  • Kyatric, could you show a screenshot or something to show which "set variable value" dialog you mean?

    I keep getting 404s for every "help" button i click in construct 2...


    You click add action, then any sprite or object, and choose a parameter.

    Then you get that window, with low opacity, and when you click system, you get all the variables of system.

    saludos :D

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • This look like a similar thread, but see anything in the responses that helps.

    I am looking for a isFacing condition or event, where I can do something like Player isFacing Enemy Enemy subtract 1 from Hitpoints.

    I am sure there must be an example of this somewhere but so far cannot find. Of course it would be totally useful as a built in event.

    <img src="smileys/smiley20.gif" border="0" align="middle" />

  • Hero Within 45 degrees of angle(Hero.X, Hero.Y, Monster.X, Monster.Y): Subtract 1 from Hero.Hitpoints. <-- My answer, still would be nice to have a built in.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)