How do I fire an event like side end turn?
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.
How do I fire an event like side end turn?
Hello;
When my unit (id=bleys) has only 1 move left I want the turn to end without having
to click the turn end button. I am not sure how to fire the event side 1 end (since bleys is on side 1).
I tried something like you see below, but while it correctly filters as it should the turn does not end.
Thanks for your time.
yours
winkr7
When my unit (id=bleys) has only 1 move left I want the turn to end without having
to click the turn end button. I am not sure how to fire the event side 1 end (since bleys is on side 1).
I tried something like you see below, but while it correctly filters as it should the turn does not end.
Thanks for your time.
yours
winkr7
Code: Select all
[event]
name=enter_hex
first_time_only=no
[filter]
id=bleys
formula="self.moves = 1"
[/filter]
[command]
[fire_event]
id=side 1 end
[/fire_event]
[/command]
[/event]
Last edited by WhiteWolf on September 22nd, 2022, 3:16 pm, edited 1 time in total.
Reason: please use [code]
Reason: please use [code]
- Pentarctagon
- Project Manager
- Posts: 5565
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: How do I fire an event like side end turn?
Firing events don't work that way, same as how firing a die event won't kill a unit. What you'd want is [end_turn].
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: How do I fire an event like side end turn?
Thankyou Pentarctagon. [end_turn] works.
- beetlenaut
- Developer
- Posts: 2825
- Joined: December 8th, 2007, 3:21 am
- Location: Washington State
- Contact:
Re: How do I fire an event like side end turn?
In case this is still unclear, the
(If you need
[event]
tag is for creating an event handler that responds to things happening in the game.(If you need
[fire_event]
, it's probably because you have an event with a custom name
key.)Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
Re: How do I fire an event like side end turn?
Thanks beetlenaut, I am looking at examples, your "tester" campaign for ITEM_DROPS has been helpful,
the menu item that brings up inspector is extremely useful.
the menu item that brings up inspector is extremely useful.