[remove_shroud] and [terrain] question
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.
Re: [allow_undo] in moveto events
Oops. You're totally right about that.gfgtdf wrote: I dont se how this could help here, if he used that instead of of rand= in his code he'd get OOS if the actions was undone since the wml-implemented pseudo random counter would have changed.
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Re: [allow_undo] in moveto events
Yes, spawning enemies or the like in a moveto event usually isn't a very good idea. As a player you're going to be really annoyed if you move someplace, nothing happens, you undo, and then decide to move back there anyway and now something happens all of a sudden. If it's something good that happens, then you can just repeatedly use moves and undos to make sure you get it, and if it's something bad that happens then that's just unfair.Sapient wrote:Probably better to pick the ambush points in advance. I think there's an HttT scenario that does that, which you could look at for an example.
- Paulomat4
- Moderator Emeritus
- Posts: 730
- Joined: October 16th, 2012, 3:32 pm
- Location: Wesmere library, probably summoning Zhangor
Re: [allow_undo] in moveto events
Okay, understoodRequiring a random variable ([set_varialbe] rand=) is in internal change of the gamestate that cannot be undone without causing OOS. The game engine detects this and ignores your [allow_undo]
That won't work. I've simplified the chances for demonstration but normally only one in ten moves should trigger something.this means you can make it undoable if you don't use rand= to determine whether a unit is spawned, you coudl for example make the unit spawned only depend on the turn and the coodinate, like:
the code is only for a campaign scenario, so Oos shouldn't be a problem.if he used that instead of of rand= in his code he'd get OOS if the actions was undone since the wml-implemented pseudo random counter would have changed.
true. Maybe I should rethink the event.Yes, spawning enemies or the like in a moveto event usually isn't a very good idea. As a player you're going to be really annoyed if you move someplace, nothing happens, you undo, and then decide to move back there anyway and now something happens all of a sudden. If it's something good that happens, then you can just repeatedly use moves and undos to make sure you get it, and if it's something bad that happens then that's just unfair.
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: [allow_undo] in moveto events
If the enemies are slow, then you can still use moveto events to take note of when the player steps in a given area, and then on the next turn start, spawn enemies in that area in random locations. That way the player gets a much better chance to react, although of course there can still be a danger of getting unfairly trapped without a chance to escape, especially if they're also likely to be tangling with other enemies at the same time.
- Paulomat4
- Moderator Emeritus
- Posts: 730
- Joined: October 16th, 2012, 3:32 pm
- Location: Wesmere library, probably summoning Zhangor
Re: [allow_undo] in moveto events
Okay, So i might have found a solution.
The problem about undoing things and random spawns still exist, but at least it's possible to do.
I just don't know if the ai is using select events. But If I think about it, I could even create a second moveto event which triggers every time the other one is triggered...
Code: Select all
[event]
name=select
first_time_only=no
[set_variable]
name=spawnlevel
rand=0,1,2,3
[/set_variable]
[/event]
I just don't know if the ai is using select events. But If I think about it, I could even create a second moveto event which triggers every time the other one is triggered...
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: [allow_undo] in moveto events
This will sureley casue OOS in mp or corrupt replays in sp.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
- Paulomat4
- Moderator Emeritus
- Posts: 730
- Joined: October 16th, 2012, 3:32 pm
- Location: Wesmere library, probably summoning Zhangor
[remove_shroud] question
Hello,
it's been some time that I have written some wml so I might be missing something obvious.
It is supposed to remove shroud from a given location and place a 6-hex castle somewhere else. Pretty simple actually.
Now, the shroud is removed on the entire field and no castle is placed anywhere? Any help?
Edit: solved the [terrain] error myself. The error was not in the [terrain] tag, but in a terrain mask that was added later
it's been some time that I have written some wml so I might be missing something obvious.
Code: Select all
[remove_shroud]
side=1
x,y=33,12
radius=3
[/remove_shroud]
Now, the shroud is removed on the entire field and no castle is placed anywhere? Any help?
Edit: solved the [terrain] error myself. The error was not in the [terrain] tag, but in a terrain mask that was added later
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: [remove_shroud] and [terrain] question
I've had the same problem with [terrain] some time ago and our zookeeper helped me out with it. Apparently, radius belongs into an [and] [/and]. Try the following code. Your placement of the keep looks fine to me, though
Code: Select all
[terrain]
[and]
x,y,radius=42,9,1
[/and]
terrain=Ce
[/terrain]
- Paulomat4
- Moderator Emeritus
- Posts: 730
- Joined: October 16th, 2012, 3:32 pm
- Location: Wesmere library, probably summoning Zhangor
Re: [remove_shroud] and [terrain] question
Hey Kwandulin, thanks for the help! I figured the terrain error out by myself. It's still a mystery to me why the shroud is removed for everyone.
I've tried with an explicit [filter_side] and without to no avail.
I've tried with an explicit [filter_side] and without to no avail.
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