Making Actoy X & Y Position Global Attribute

I have a game in production and it works on the age old mechanic of hoards of enemies running a you, and you kill them. I spawn them no problem. The issue is how do I get them to converge on actor the player controls???? I though I had this solved making a game attribute called player x and player y. I then added the change attribute code to update every 0.1 seconds.

This seems to work fine but only when the actor is moving. When the player pauses all the enemies stop too... I have included a video of it here

Any ideas on how to do this more efficiently? cheers

Comments

  • gamesfuagamesfua Member Posts: 723
    Try constrain x y on enemies. Constrain will constantly update a rule.
  • thegasman2000thegasman2000 Member Posts: 10
    I have just tried using constrain and i get the same problem. I have added a couple of display text actors showing the game attribute value and its working fine, but the spawned enemies wont move unless the main actor does... ???
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    Constrain player x and y to some game attributes.

    Then on enemies, upon spawn, have them move to these game attributes.

    If that doesnt work, show a screenshot of your enemy rules so we can see what is going on.
  • thegasman2000thegasman2000 Member Posts: 10
    thats what i thought i had done.. here is the screenshot.

    http://i.imgur.com/JqaXJ.png

    The rotate works fine. I am sure i am being thick! thanks for the help :)
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    edited January 2013
    .
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    I've made you a demo which may contain some other useful techniques as well for the future;
  • thegasman2000thegasman2000 Member Posts: 10
    Thanks for that! I managed to narrow the issue down to applying the max velocity X_X
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Also you need run to completion checked this is why they stop as well.
Sign In or Register to comment.