Announcement

Collapse
No announcement yet.

anyway to capture event if player click unit action button?

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

  • anyway to capture event if player click unit action button?

    The unit action buttons (not sure their official terminology) are those buttons available when you select a unit. So select a worker and you get those build improvement buttons (mine, farm... whatever is possible on the given plot)

    If the user clicks on one of those actions, can I capture that event?

  • #2
    It should be possible; CvScreenUtils.py and ScreenInput.py have some notes about how to capture events from the screens. Haven't looked into them much, but it sounds like a good place to start.

    Not sure how you make a connection between the event argsList and the buttons on the screen though - might need a bit of trial and error to get to the bottom of that, unless Locutus and friends can help out.

    Comment

    Working...
    X