Announcement

Collapse
No announcement yet.

Get Distance Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    just tested. i was mistaken, seems that if the component being moved is the root then the whole actor is moved.

    Sorry I'm not sure what's wrong then.
    maybe put a few print strings in there at various point to make sure the events are being called at the right time. see if you can find the point where the code doesn't work as expected.

    Leave a comment:


  • replied
    Originally posted by IndieGameCove View Post
    you may be aware but I don't think the move component to node is going to move the actor position. it's just moving the collision part of the actor.
    that’s the only way you can get the trigger to move, seems to work though?

    its the updating that’s an issue

    Leave a comment:


  • replied
    you may be aware but I don't think the move component to node is going to move the actor position. it's just moving the collision part of the actor.

    Leave a comment:


  • replied
    It doesn't seem to update correctly

    Leave a comment:


  • replied
    what is happening with your current setup that is wrong?

    Leave a comment:


  • replied
    Can Anyone help?

    Leave a comment:


  • started a topic Get Distance Problem

    Get Distance Problem

    Hi there,

    I'm trying to build some code that basically gives the distance between a trigger and the players last location on key press.

    I'm using the following code to set each trigger location in a variable:

    Click image for larger version

Name:	SetTriggerLoc.jpg
Views:	196
Size:	213.1 KB
ID:	1616919

    Perform the calculation on key press then output:
    Click image for larger version

Name:	GetTrigLoc.jpg
Views:	153
Size:	124.8 KB
ID:	1616920

    Now there's a bit of an issue there are a shed load of triggers in my map but only one active one at a time that updates the trigger position value each time, each trigger activating the subsequent one.

    So trigger A once selected/triggered will move trigger A below the player surface (making it inactive) and brings trigger B to the player surface so it can now be triggered by the player.

    Each time the next trigger is brought in it updates the trigger location variable.

    What am I doing wrong here?
Working...
X