Having Some Trouble With Object Behavior

0 favourites
  • 3 posts
From the Asset Store
This is a single chapter from the "Construct Starter Kit Collection". It is the Student Workbook for its Workshop.
  • Hey folks, I'm having a bit of trouble with object angles.

    So I've made this "spike gun", if you will, that fires spikes (with bullet behavior) at the player (the blue box). But no matter what I tinker with in terms of angles and positioning, the spikes always fire at the player as if to hit him or her with the side of the spike, instead of the most prominent point of it (the most prominent point being the point furthest to the right in the above image).

    So far, this is what I have going on in terms of events, and I'm really not sure where to go from here.

    Do you folks have any ideas on how to make sure the Player gets the most prominent point hitting them before any other part of the spike? I've included a link to the capx file at the bottom of this post.

    Thanks so much for your time!

    Hey folks, I'm having a bit of trouble with object angles.

    So I've made this "spike gun", if you will, that fires spikes (with bullet behavior) at the player (the blue box). But no matter what I tinker with in terms of angles and positioning, the spikes always fire at the player as if to hit him or her with the side of the spike, instead of the most prominent point of it (the most prominent point being the point furthest to the right in the above image).

    So far, this is what I have going on in terms of events, and I'm really not sure where to go from here.

    Do you folks have any ideas on how to make sure the Player gets the most prominent point hitting them before any other part of the spike? I've included a link to the capx file at the bottom of this post.

    Thanks so much for your time!

    dl.dropboxusercontent.com/u/43214549/Tirin%20Spike%20Gun%20Problem.capx Download the capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • For sprites that you want to rotate to various angles (like your SpikeGunSpike object), zero degrees is pointing to the right. Your object is drawn pointing straight up - so it is always 90 degrees off from where you want it to point.

    All you have to do is open your object in the image editor, click the button at the top that says "Rotate 90 clockwise". Then when you rotate the sprite it will be pointing in the direction you want.

    (your code works fine, it is just the image that is off)

  • Oh wow, that fixes it perfectly. Thanks!

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