Original War Support Bug Tracker
star_faded.png
Please log in to bookmark issues
bug_report_small.png
OPEN  Bug report #421  -  ActiveUnitChanged(un) doesn't work if...
Posted Sep 15, 2017 - updated Sep 15, 2017
action_vote_minus_faded.png
1
Votes
action_vote_plus_faded.png
Issue details
  • Type of issue
    Bug report
  • Status
     
    New
  • Assigned to
    Not assigned to anyone
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     Nao
  • Owned by
    Not owned by anyone
  • Estimated time
    Not estimated
  • Time spent
    No time spent
  • Category
    Not determined
  • Resolution
    Not determined
  • Priority
    Not determined
  • Reproducability
    Not determined
  • Severity
    Not determined
  • Targetted for
    icon_milestones.png Not determined
Issue description
ActiveUnitChanged(un) is an event that triggers when you select another unit. It doesn't work if you select the unit from the user interface.
Steps to reproduce this issue
Reproduce a SAIL code similar to the one below.

On ActiveUnitChanged(un) do begin
   if un = G01 and GetNation(un) = nation_russian then begin
      PlaySoundXY(GetX(un),GetY(un),'01_1i-Off1-1'); end;
   end;


Try triggering this event in-game by clicking on the character.

This won't work if you do it from the User interface. You have to click on the unit on the terrain directly.

Unit HAS to be a human that is placed on the terrain. Also the last active unit saved doesn't change if you click on vehicles or buildings.

There are no comments