Very basic problems with very basic events
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.
Very basic problems with very basic events
Hello everybody
I've read a couple of topic, and i will probably seems quite basic, near all this complex and specific questions.
I try to test some very simple [event] and ... it doen't work at all !!! My test with start and prestart event are OK (so, my [message] too) but all the event based on turns are not OK at all.
exemples :
--------------------------------------------
[event]
name=new turn
turn_number=3
[message]
description=Character Name
message= _ "Event New Turn : working !!!"
[/message]
[/event]
[event]
name=side turn
side_number=2
[message]
description=Character Name
message= _ "Event Side Turn 2 : working !!!"
[/message]
[/event]
[event]
name=side turn
side_number=2
[message]
description=Character Name
message= _ "Event Side Turn 2 : working !!!"
[/message]
[/event]
[event]
name=turn 3
[message]
description=Character Name
message= _ "Event Turn X (here, 3) : working !!!"
[/message]
[/event]
--------------------------------------------
The rest of the map is necessarly correct, as the test is OK with the start [event].
Could somebody tell me where is my error ??
Thanks by advance.
I've read a couple of topic, and i will probably seems quite basic, near all this complex and specific questions.
I try to test some very simple [event] and ... it doen't work at all !!! My test with start and prestart event are OK (so, my [message] too) but all the event based on turns are not OK at all.
exemples :
--------------------------------------------
[event]
name=new turn
turn_number=3
[message]
description=Character Name
message= _ "Event New Turn : working !!!"
[/message]
[/event]
[event]
name=side turn
side_number=2
[message]
description=Character Name
message= _ "Event Side Turn 2 : working !!!"
[/message]
[/event]
[event]
name=side turn
side_number=2
[message]
description=Character Name
message= _ "Event Side Turn 2 : working !!!"
[/message]
[/event]
[event]
name=turn 3
[message]
description=Character Name
message= _ "Event Turn X (here, 3) : working !!!"
[/message]
[/event]
--------------------------------------------
The rest of the map is necessarly correct, as the test is OK with the start [event].
Could somebody tell me where is my error ??
Thanks by advance.
Faer
Re: Very basic problems with very basic events
This is the only correct event. The other events are not correct and won't work.Faer wrote:[event]
name=turn 3
[message]
description=Character Name
message= _ "Event Turn X (here, 3) : working !!!"
[/message]
[/event]
As for this particular event, I don't know why it's not working. Replace the description key with "speaker=narrator" and see if it works then. If there's a problem with the message speaker (like you misspelled his name), then the message won't be shown. Using "speaker=narrator" will avoid that problem.
The easiest way to figure out how to set up a new turn or side turn event is by looking at someone else's code. Otherwise we can show you here.
Hope springs eternal.
Wesnoth acronym guide.
Wesnoth acronym guide.
This means that in order to get something to happen when side 3 (for example) begins his turn, you must do it like this:the wiki wrote:side turn this event triggers when any player ends their turn. When a player ends their turn, before any events of this type trigger, the value of the WML variable side_number is set to the number of the side of the player about to take their turn.
Code: Select all
[event]
name=side turn
first_time_only=no # This might be unnecessary.
[if]
[variable]
name=side_number
equals=3
[/variable]
[then]
[message]
speaker=narrator
message= _ "Event side turn 3 working!"
[/message]
[then]
[/if]
[/event]
Re: Very basic problems with very basic events
I will try, but i don't think so. The used name is the same as the only event whitch work, and it's a copy/paste ... so, no misspelling. But i will try.scott wrote:As for this particular event, I don't know why it's not working. Replace the description key with "speaker=narrator" and see if it works then. If there's a problem with the message speaker (like you misspelled his name), then the message won't be shown.
I've tried this code : a soon as Wesnoth is charging, i've got an error message. Seems that my Wesnoth version dont' like it ...zookeeper wrote:Code: Select all
[event] name=side turn first_time_only=no # This might be unnecessary. [if] [variable] name=side_number equals=3 [/variable] [then] [message] speaker=narrator message= _ "Event side turn 3 working!" [/message] [then] [/if] [/event]
I put my code here, in case of it would be usefull.
- Attachments
-
- 2p_Affrontement.cfg
- (2.46 KiB) Downloaded 367 times
Last edited by Faer on March 1st, 2006, 11:34 pm, edited 1 time in total.
Faer