Blueknights Questions

The place to post your WML questions and answers.

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.
Post Reply
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: Blueknights Questions

Post by Ceres »

{PLACE_IMAGE PATH X Y}?
That's the same but without flashing.
blueknight1758
Posts: 252
Joined: March 30th, 2011, 8:38 pm
Location: The UK

Re: Blueknights Questions

Post by blueknight1758 »

Thank you, i guess i should of realized that but couldn't see it in plain sight.

What is the name ofthe evnt for a new turn?
Is it new turn?

Also is anything wrong with this coding because if my unit moves at all the game moves on to the next scenario which it shouldn't.
Attachments
worldmap.cfg
(2.99 KiB) Downloaded 158 times
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: Blueknights Questions

Post by Ceres »

For the first question, see here for a list.
For the second, x,y is not a valid key for [event]. You want a [filter].
blueknight1758
Posts: 252
Joined: March 30th, 2011, 8:38 pm
Location: The UK

Re: Blueknights Questions

Post by blueknight1758 »

What i'm attempting to do to make my 'world map' feature work is the following.
in a 'sub scenario' (One that you acsess through the world map) I have the folowing code. (Copied from Era of Magic's To lands unknown.)

Code: Select all

	[event]
	name=start
	        {VARIABLE bcounter 0}
			[/event]
Later followed by

Code: Select all

 [event]
  name=last breath
  [filter]
  id=evil
  [/filter]
  [message]
  protag=Victory!
  [/message]
  {VARIABLE_OP bcounter add 1}
		  [endlevel]
		  result=victory
		  [/endlevel]
		  [/event]
and in a different the world map I have this

Code: Select all

[if]
 [variable]
                name=bcounter
                equals=1
            [/variable]
			[then]
			{MODIFY_TERRAIN ^Dr 16 26}
			{CLEAR_VARIABLE bcounter}
			[redraw]
			[/redraw]
						[/then]
						[/if]
						[/event]
What i'd like to know is, is what i'm trtying to accomplish possible? if so how? because this isn't working.
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: Blueknights Questions

Post by Ceres »

Yeah, that's possible. But this

Code: Select all

[message]
  protag=Victory!
[/message]
doesn't work for sure because you somehow merged the two needed keys. It'd be

Code: Select all

speaker=protag
message= _ "Victory"
blueknight1758
Posts: 252
Joined: March 30th, 2011, 8:38 pm
Location: The UK

Re: Blueknights Questions

Post by blueknight1758 »

Oh dear not concentrating while writing that obviously...
So should what I have work once that's corrected?
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Blueknights Questions

Post by zookeeper »

blueknight1758 wrote:Oh dear not concentrating while writing that obviously...
So should what I have work once that's corrected?
Yes, if you do it right. No, if you do it wrong.

Anyone who gives you a definitive "yes" or "no" is merely guessing.
blueknight1758
Posts: 252
Joined: March 30th, 2011, 8:38 pm
Location: The UK

Re: Blueknights Questions

Post by blueknight1758 »

Well to help me be able to code this can someone answer these questions?
1. Do variable unless cleared carry over from scenario to scenario?
2. If not is their an alternative that does?
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: Blueknights Questions

Post by Ceres »

Yes.
blueknight1758
Posts: 252
Joined: March 30th, 2011, 8:38 pm
Location: The UK

Re: Blueknights Questions

Post by blueknight1758 »

So if my code like above is in a 'new turn' [if] clause stating that if 'bcounter' =1 hex x=16 and y=26 will become rubble, would that be feasible?
Because try if I might the terrain at 16,26 just doesn't change full stop even using {MODIFY_TERRAIN ^Dr 16 26}
the other thing I'm working on but is less important is would using

Code: Select all

[store_unit]
[filter]
side=1
[\filter]
Variable=positions
[\store_unit]
followed by

Code: Select all

[event]
name=start
[unstore_unit]
name=positions
[\unstore_unit]
[\event]
would this put all the units in side 1 back to where they were at the point of the store even if a scenario happened in between!
An what happens to the XP?
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: Blueknights Questions

Post by Ceres »

1. The slashes in closing tags are the other way round - [/filter], not [\filter]
2. variable, not Variable.
3. It has to be

Code: Select all

{FOREACH positions i}
[unstore_unit]
variable=positions[$i]
[/unstore_unit]
{NEXT i}
Otherwise only the first unit is unstored.

Actually I'd suggest to use [recall] instead of unstoring. Store everybody, then recall everybody except the leader on the position you stored. For your leader, just teleport him to the stored location.
blueknight1758
Posts: 252
Joined: March 30th, 2011, 8:38 pm
Location: The UK

Re: Blueknights Questions

Post by blueknight1758 »

The wrong slaves are purely because I'm on iPod. As is the capital in variable
Thanks for clarifying that I'll start to work on that ASAP
and I'll check my code for typos and such regarding the variable.
Post Reply