Earthquakes events and kill units in a precise area
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.
Earthquakes events and kill units in a precise area
Hi wesnoth community!
I have a question about earthquakes in Wesnoth (like in burning suns in final confrontation for example).
In the burning suns xml, i found this
I presume that scroll is for the view, it's shake all the screen up and down.
But delay, color and redraw, what is it? I mean how use it to create some colors in the earthquake?
A last question, i would like to make an event that kills every units that are in a precise area (because of earthquake) with a change of terrain. I know how to modify terrain, but to kill the units i don't know at all how to do
Thanks in advance for your responses!
I have a question about earthquakes in Wesnoth (like in burning suns in final confrontation for example).
In the burning suns xml, i found this
Code: Select all
[scroll]
x=25
[/scroll]
[scroll]
x=-25
[/scroll]
[scroll]
x=25
[/scroll]
[scroll]
x=-25
[/scroll]
[scroll]
x=25
[/scroll]
[scroll]
x=-25
[/scroll]
[redraw]
[/redraw]
[delay]
time=400
[/delay]
[color_adjust]
red,green,blue=40,0,100
[/color_adjust]
[redraw]
[/redraw]
[delay]
time=250
[/delay]
[color_adjust]
red,green,blue=0,0,0
[/color_adjust]
[redraw]
[/redraw]
I presume that scroll is for the view, it's shake all the screen up and down.
But delay, color and redraw, what is it? I mean how use it to create some colors in the earthquake?
A last question, i would like to make an event that kills every units that are in a precise area (because of earthquake) with a change of terrain. I know how to modify terrain, but to kill the units i don't know at all how to do
Thanks in advance for your responses!
Creator and maintainer of "A goblin adventure" (available) and "From Rocks and Blood"(available) --- Working on a new campaign "Facing Death"
Re: Earthquakes events and kill units in a precise area
[scroll] is used to shake the screen by scrolling back and fourth by 25 pixels, [color_adjust] changes the color to a specified RGB value, [redraw] redraws the screen, [delay] creates a pause, the value is the duration given in milliseconds. To create an earthquake-y effect, you could use the same code and modify the values/add more/different colors.Graziani wrote:But delay, color and redraw, what is it?
To kill units, use the [kill] tag. You can specify the area where you want to eradicate everything as a Standard Location Filter inside the Standard Unit Filter, like thisA last question, i would like to make an event that kills every units that are in a precise area (because of earthquake) with a change of terrain. I know how to modify terrain, but to kill the units i don't know at all how to do
Code: Select all
[filter]
[filter_location]
x=1-20
y=1-15
[/filter_location]
[/filter]
Co-Creator of The Fellowship of the Clay (BfW 1.10) ~~ Maintainer of the German Code of Conduct
How to isolate problematic WML code ~~ WML error messages and their reasons
How to isolate problematic WML code ~~ WML error messages and their reasons
- Paulomat4
- Moderator Emeritus
- Posts: 730
- Joined: October 16th, 2012, 3:32 pm
- Location: Wesmere library, probably summoning Zhangor
Re: Earthquakes events and kill units in a precise area
to create an earthquake effect, you better use the EARTHQUAKE macro
Code: Select all
{EARTHQUAKE (put your kill tag or any other action wml in here)}
Creator of Dawn of Thunder and Global Unitmarkers
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
"I thought Naga's used semi-automatic crossbows with incendiary thermite arrows . . . my beliefs that this race is awesome are now shattered." - Evil Earl
Re: Earthquakes events and kill units in a precise area
Thanks a lot both of you i'm going to try the two codes!
Creator and maintainer of "A goblin adventure" (available) and "From Rocks and Blood"(available) --- Working on a new campaign "Facing Death"
Re: Earthquakes events and kill units in a precise area
Code: Select all
[kill]
[filter]
[filter_location]
x=1-20
y=1-15
[/filter_location]
[/filter]
[/kill]
Creator and maintainer of "A goblin adventure" (available) and "From Rocks and Blood"(available) --- Working on a new campaign "Facing Death"
Re: Earthquakes events and kill units in a precise area
Empty filter matches all units. You should reread the reference http://wiki.wesnoth.org/DirectActionsWML#.5Bkill.5D.
Re: Earthquakes events and kill units in a precise area
Except as the link says, don't use a [filter] tag. Also, you don't need to wrap x= and y= in a [filter_location], because those are part of StandardUnitFilter too.Ceres wrote:To kill units, use the [kill] tag. You can specify the area where you want to eradicate everything as a Standard Location Filter inside the Standard Unit Filter, like thisA last question, i would like to make an event that kills every units that are in a precise area (because of earthquake) with a change of terrain. I know how to modify terrain, but to kill the units i don't know at all how to doCode: Select all
[filter] [filter_location] x=1-20 y=1-15 [/filter_location] [/filter]
Re: Earthquakes events and kill units in a precise area
Code: Select all
[kill]
[filter_location]
x=1-20
y=1-15
[/filter_location]
[/kill]
Creator and maintainer of "A goblin adventure" (available) and "From Rocks and Blood"(available) --- Working on a new campaign "Facing Death"
Re: Earthquakes events and kill units in a precise area
Hello guys, I'm opening again this topic after five years to ask you again about earthquakes.
I really want to shake the screen and all my attempts are failing, I don"t like the result.
I tried this :
and I tried this :
Even if it's close to what I want, the repeated sound is not clean and disturbing. The shake effect is good if you repeat x15/20 but the sound become horrible when you do so.
and I tried this (UTBS last level)
But it doesn't work.
I'm kinda lost, I cannot find something useful in the forums, if you guys can help me. In the scenario, a cave is going to rumble on itself, and I really want a big screen shake.
Thanks in advance !
I really want to shake the screen and all my attempts are failing, I don"t like the result.
I tried this :
For this one, There is some lightning sound and the screen is shaking for less than one second, and it's a very small movement.
{EARTHQUAKE (
[sound]
name=rumble.ogg
[/sound]
)}
and I tried this :
Code: Select all
{REPEAT 5 (
{QUAKE "rumble.ogg"}
)}
and I tried this (UTBS last level)
Code: Select all
[scroll]
x=25
[/scroll]
[scroll]
x=-25
[/scroll]
[scroll]
x=25
[/scroll]
[scroll]
x=-25
[/scroll]
[scroll]
x=25
[/scroll]
[scroll]
x=-25
[/scroll]
[redraw]
[/redraw]
[delay]
time=400
[/delay]
[color_adjust]
red,green,blue=40,0,100
[/color_adjust]
[redraw]
[/redraw]
[delay]
time=250
[/delay]
[color_adjust]
red,green,blue=0,0,0
[/color_adjust]
[redraw]
[/redraw]
I'm kinda lost, I cannot find something useful in the forums, if you guys can help me. In the scenario, a cave is going to rumble on itself, and I really want a big screen shake.
Thanks in advance !
Creator and maintainer of "A goblin adventure" (available) and "From Rocks and Blood"(available) --- Working on a new campaign "Facing Death"
Re: Earthquakes events and kill units in a precise area
If you liked the results of
and it's just the sound that troubles you, then you could just play sound with the first one.
If you include an empty track called "silence.ogg" with your add-on, then it's just:
Otherwise you just manually expand what the macro means, and omit the sound:
Code: Select all
{REPEAT 5 (
{QUAKE "rumble.ogg"}
)}
If you include an empty track called "silence.ogg" with your add-on, then it's just:
Code: Select all
{QUAKE "rumble.ogg"}
{REPEAT 4 (
{QUAKE "silence.ogg"}
)}
Code: Select all
{QUAKE "rumble.ogg"}
{REPEAT 4 (
[scroll]
x=5
y=0
[/scroll]
[scroll]
x=-10
y=0
[/scroll]
[scroll]
x=5
y=5
[/scroll]
[scroll]
x=0
y=-10
[/scroll]
[scroll]
x=0
y=5
[/scroll]
)}
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Re: Earthquakes events and kill units in a precise area
OMG I never thinked about using the silence.ogg !!!
Thank you so much WhiteWolf ! It's very useful, even the second one you gave me, that allow to manually adjust !
Thank you so much WhiteWolf ! It's very useful, even the second one you gave me, that allow to manually adjust !
Creator and maintainer of "A goblin adventure" (available) and "From Rocks and Blood"(available) --- Working on a new campaign "Facing Death"