Help needed with event WML
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.
Help needed with event WML
Well I am trying to make some dialogue pop up when a unit moves to a certain spot on my 2p survival map!
Here is the wml I have for it but nothing happens when I play it! why?
[event]
name=defiance
moveto x=7
y=8
[message]
speaker=unit
message= _ "Soldier: Stay foul invader you shall come no further!"
[/message]
[message]
speaker=second_unit
message= _ "enemy: Hahahaha foolish creature even if you kill me it is only a matter of time before you die and your land is my kings!"
[/message]
[/event]
Now what is it that I did wrong!?!?!?
Made the topic title more appropriate --Baufo
Here is the wml I have for it but nothing happens when I play it! why?
[event]
name=defiance
moveto x=7
y=8
[message]
speaker=unit
message= _ "Soldier: Stay foul invader you shall come no further!"
[/message]
[message]
speaker=second_unit
message= _ "enemy: Hahahaha foolish creature even if you kill me it is only a matter of time before you die and your land is my kings!"
[/message]
[/event]
Now what is it that I did wrong!?!?!?
Made the topic title more appropriate --Baufo
Last edited by assassin on September 3rd, 2007, 7:53 pm, edited 1 time in total.
Interested in a LORD OF THE RINGS YAHOO GROUP THEN CHECK OUT http://groups.yahoo.com/group/The_Ring_of_Doom/
My MP name is aldarion!
My MP name is aldarion!
There is no event named defiance - I guess you want to write a moveto event. Have a look at http://www.wesnoth.org/wiki/EventWML to learn more about events.
I was working on the proof of one of my poems all the morning, and took out a comma. In the afternoon I put it back again. -- Oscar Wilde
OH! oops I thought that the event name could be any thing you wanted it to be! lol! ok I went to wiki but I did not see much to help that is probly because I am tierred! any way what would be really nice is for some one to post the wml as it should be for what I am trying to do!
Interested in a LORD OF THE RINGS YAHOO GROUP THEN CHECK OUT http://groups.yahoo.com/group/The_Ring_of_Doom/
My MP name is aldarion!
My MP name is aldarion!
Try the following but replace the unit in unit_description=unit with the actual unit type you want to filter on e.g. orc_grunt or saurian_augur or kalenz, etc...
Code: Select all
[event]
name=moveto
[filter]
x=7
y=8
unit_description=unit
[/filter]
[message]
speaker=unit
message= _ "Soldier: Stay foul invader you shall come no further!"
[/message]
[message]
speaker=second_unit
message= _ "enemy: Hahahaha foolish creature even if you kill me it is only a matter of time before you die and your land is my kings!"
[/message]
[/event]
ok thx I will try it
Interested in a LORD OF THE RINGS YAHOO GROUP THEN CHECK OUT http://groups.yahoo.com/group/The_Ring_of_Doom/
My MP name is aldarion!
My MP name is aldarion!
ok I did put your stuff in it worked but the second guy does not talk why?
and how do I get it so that any one who moves to 7,8 activates it?
and how do I get it so that any one who moves to 7,8 activates it?
Interested in a LORD OF THE RINGS YAHOO GROUP THEN CHECK OUT http://groups.yahoo.com/group/The_Ring_of_Doom/
My MP name is aldarion!
My MP name is aldarion!
To get it to trigger for anyone take the unit_description=unit line out of the filter.
Not sure why the second unit isn't speaking. Try changing the two around to check if they work in reverse order (if so, it's probably an issue with the 'speaker=' for the second speaker, i.e. you've used the wrong identifier in some way).
Not sure why the second unit isn't speaking. Try changing the two around to check if they work in reverse order (if so, it's probably an issue with the 'speaker=' for the second speaker, i.e. you've used the wrong identifier in some way).
-
- Posts: 837
- Joined: April 14th, 2005, 4:17 am
here is some code. was writing then realized i had no idea what was going on. is the player moving to the spot or the ai? kind of matters when writing wml. here is what i got. the sides, role name and location of the not filters may need to move or change value depending on the logic of what you are doing.
if it doesn't make sense then check the wml reference on the wiki.[/url]
Code: Select all
[event]
name=moveto
first_time_only=no
[filter]
side=1
x=7
y=8
[/filter]
[role]
role=soldier
type= #types that the guard might be
[not]
side=1
#include all sides that shouldn't be talking, the same way
[/not]
[/role]
[message]
role=soldier
speaker=unit
message= _ "Soldier: Stay foul invader you shall come no further!"
[/message]
[message]
speaker=unit
message= _ "enemy: Hahahaha foolish creature even if you kill me it is only a matter of time before you die and your land is my kings!"
[/message]
[/event]
happy timezone traveler
Ok thx Gabe it looks good but...
Ok this is to go into my 2p survival side 2 and 3 are humans and side 1 is the computer spawns the comps guy moves to 7,8 then one of your guys says the "stay foul invader you shall come no further" then the comp guy says the "even if you kill me it is only a matter of time before you die and your land is my kings"
So the second guy to talk is the guy to activate do the move to!
(and he is side 1)!
Thx for all the help!!!
P.S. and after this move to event the bridge on 7,8 turns into water! I do not know how to do this!! If it is not possible thats fine the main thing I want is the dialogue!
P.P.S. I do not understand that "#include all sides that shouldn't be talking, the same way"!! and where is says "#put all types that the guard might be" I think I understand that but is the # thing there and I put a , between the names right?
Ok this is to go into my 2p survival side 2 and 3 are humans and side 1 is the computer spawns the comps guy moves to 7,8 then one of your guys says the "stay foul invader you shall come no further" then the comp guy says the "even if you kill me it is only a matter of time before you die and your land is my kings"
So the second guy to talk is the guy to activate do the move to!
(and he is side 1)!
Thx for all the help!!!
P.S. and after this move to event the bridge on 7,8 turns into water! I do not know how to do this!! If it is not possible thats fine the main thing I want is the dialogue!
P.P.S. I do not understand that "#include all sides that shouldn't be talking, the same way"!! and where is says "#put all types that the guard might be" I think I understand that but is the # thing there and I put a , between the names right?
Interested in a LORD OF THE RINGS YAHOO GROUP THEN CHECK OUT http://groups.yahoo.com/group/The_Ring_of_Doom/
My MP name is aldarion!
My MP name is aldarion!
look at terrain action at wiki http://www.wesnoth.org/wiki/DirectActionsWMLassassin wrote: P.S. and after this move to event the bridge on 7,8 turns into water! I do not know how to do this!! If it is not possible thats fine the main thing I want is the dialogue!
this is what you want.
just put any sides you don't want to talk in case they are your enemy of the solider. for the "#put all types that the guard might be" just put in what type of unit you want to be that role when the event triggers."#include all sides that shouldn't be talking, the same way"
finnally you don't put # in the codes. it's just used for someone else to look at the codes and describe it.
evolved around the confined environment, emotions, knowledge and events mixed into my life, mere mortal am i, trying to climb higher up the ladder, time passes, just then i realized, death will part me eventually. - playtom's philosophy
Thx I have it working!
And here is the link to it should you want to try it out!http://www.wesnoth.org/forum/viewtopic.php?t=17527
How do I upload it to the add-ons server?
And here is the link to it should you want to try it out!http://www.wesnoth.org/forum/viewtopic.php?t=17527
How do I upload it to the add-ons server?
Interested in a LORD OF THE RINGS YAHOO GROUP THEN CHECK OUT http://groups.yahoo.com/group/The_Ring_of_Doom/
My MP name is aldarion!
My MP name is aldarion!