wiki lacks description for select event
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
wiki lacks description for select event
it doesn't say (in my opinion "primary unit" does not explain that) that it only works on $side_number units.. (current side)select
Triggers when the primary unit is selected. Prior to version 1.11, this also triggered when a move was interrupted, as the game keeps the moving unit selected by selecting it again at the end of movement. Note: in networked multiplayer, these events are only executed by the client on which the event is triggered, leading to out of sync errors if you modify the game state in the event.
so if you select enemy units, nothing happens.
could not test if it works while enemy turn, probably not.. in either case, there is no description for this event..
what is there is just tiny.. could at least add that it doesn't work on enemy units.. i wouldn't waste so much time on coding with it to later find out it doesn't work on selected enemies..
Re: wiki lacks description for select event
From what I have observed: (for 1.12.5 and 1.12.6, before it worked differently)
For players: select event is fired on selecting currently unselected unit of own side. Might not fire while something is being executed (so shouldnt be usable during ai turn). Can be expected to be usable during any player turns.
For observers: select event is fired on selecting currently unselected unit of currently active side. Again might not fire while something is being executed.
For players: select event is fired on selecting currently unselected unit of own side. Might not fire while something is being executed (so shouldnt be usable during ai turn). Can be expected to be usable during any player turns.
For observers: select event is fired on selecting currently unselected unit of currently active side. Again might not fire while something is being executed.
Re: wiki lacks description for select event
thx for additional information Ravana..
I'm on 1.12.2 (forgot to mention, sorry)
It doesn't fire on right-click selection either.
I'm on 1.12.2 (forgot to mention, sorry)
It doesn't fire on right-click selection either.
Re: wiki lacks description for select event
Because rightclick is deselect, this is what you do to be able to fire next select event.
Re: wiki lacks description for select event
Im not sure about this one in 1.12 (since deselect event is only available in 1.13)Because rightclick is deselect, this is what you do to be able to fire next select event.
plus when I right click I dont think that anything changes.. but if i select something then it does..
but I can't guarantee that we are talking about the same thing.. and I would need more experiments to confirm my point of view.
(right click deselects unit in the way that it can't move if i click on adjacent hex.. but it doesn't trigger select event to the best of my knowledge.. despite that it displays different unit in the right hand side menu (the one you right-clicked, but it only happens because it displays any unit that you had hoovered the mouse over last).. so it's all a bit messy... Also next select event fires just if i select the other unit with left click again.. no need for right-click)
For now I also can add that $x1, $y1 are valid for select event.. as also is $side_number and $unit
Re: wiki lacks description for select event
Deselect is needed to select same.Also next select event fires just if i select the other unit with left click again.. no need for right-click)
Re: wiki lacks description for select event
oh i see that might be true, I havent tested..
Re: wiki lacks description for select event
Using select event multiple times in a row on same unit is exactly what I use for ageless unsynced menu.
Re: wiki lacks description for select event
oh =] didn't realize.. i guess i couldn't figure out much since it probably was all written in lua..