Hrm..learnign the ropes, help me out a bit

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.
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: Hrm..learnign the ropes, help me out a bit

Post by AI »

Not removing them will probably make it show up twice. :P
User avatar
TrashMan
Posts: 601
Joined: April 30th, 2008, 8:04 pm
Contact:

Re: Hrm..learnign the ropes, help me out a bit

Post by TrashMan »

K, time for a stupid question - how to setup player color in the scenario?

I seem to recall some magneta->red command or something like that, but I can't track it down.
Light travels much faster than sound, that's why some people seem bright until you hear them speak.

>>> MY LITTLE LAB! <<<
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Hrm..learnign the ropes, help me out a bit

Post by zookeeper »

TrashMan wrote:K, time for a stupid question - how to setup player color in the scenario?

I seem to recall some magneta->red command or something like that, but I can't track it down.
Could it possibly be defined where it would make some sense, like in the side definition?
User avatar
TrashMan
Posts: 601
Joined: April 30th, 2008, 8:04 pm
Contact:

Re: Hrm..learnign the ropes, help me out a bit

Post by TrashMan »

Yeah, but all the scenario I checked so far (from other people) use the standard color, so I don't know how the command goes :P
Light travels much faster than sound, that's why some people seem bright until you hear them speak.

>>> MY LITTLE LAB! <<<
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Hrm..learnign the ropes, help me out a bit

Post by zookeeper »

User avatar
TrashMan
Posts: 601
Joined: April 30th, 2008, 8:04 pm
Contact:

Re: Hrm..learnign the ropes, help me out a bit

Post by TrashMan »

Thank you. Somehow I missed that. :oops:
Light travels much faster than sound, that's why some people seem bright until you hear them speak.

>>> MY LITTLE LAB! <<<
User avatar
TrashMan
Posts: 601
Joined: April 30th, 2008, 8:04 pm
Contact:

Re: Hrm..learnign the ropes, help me out a bit

Post by TrashMan »

Hrm...I've been constantly getting a strange error on my 4th scenario that I finally managed ot track down to a piece of code.

The error goes as:
"Unexpected characters after variable name (expected, or =), value'

I got no clue exactly what I should be looking for within the code. This is hte code:

Code: Select all

# witness discussion, change of plans
[event]
        name=sighted

        [filter]
            role=Camp Guard
        [/filter]

        [removeitem]
            x=4
            y=51
        [/removeitem]
        [gold]
            side=2
            amount=100
        [/gold]
		CLEAR_FOG 1 15 42 6

        [message]
            speaker=Loghain
            message=_"So you're sure they're all dealt with?"
        [/message]
        [message]
            speaker=Hendak
            message=_"Just like you said, they walked right into our trap. The cursed fog is making it difficult to track down all the stragglers. They are no threat."
        [/message]
        [message]
            speaker=Loghain
            message=_"That will be for me to decide. I dont' want anyone near this camp!"
        [/message]
        [message]
            speaker=Hendak
            message=_"I've posted patrols along the road, don't worry Loghain."
        [/message]
        [message]
            speaker=Loghain
            message=_"I do worry. And don't call me by my name. Do you have any idea what can happen if-... wait. What's that?"
        [/message]
        [message]
            speaker=Hendak
            message=_"Intruders!"
        [/message]
        [message]
            speaker=Loghain
            message=_"You incompetent fool!"
        [/message]
          [sound]
              name=dagger-swish.wav
          [/sound]
             [delay]
               time=50
             [/delay]
         [sound]
           name=human-hit-2.ogg
         [/sound]
        [message]
            speaker=Hendak
            message=_"Aaaack!.."
        [/message]
		[kill]
			side=2
			id=Hendak
		[/kill]
        [message]
            speaker=Loghain
            message=_"Wake up you fools! Move it! Get me their heads or I'll have yours!"
        [/message]
        [message]
            speaker=follower
            message=_"Looks like this route is out of the question!"
        [/message]
        [message]
            speaker=Ellderon
            message=_"To the north!!"
        [/message]
	  {PLACE_IMAGE items/gohere.png 16 1}
    [objectives]
      side=1
      [objective]
        description= _ "Escape the valley to the east...erm...noth!"
        condition=win
      [/objective]
      [objective]
        description= _ "Death of Ellderon"
        condition=lose
      [/objective]
      [objective]
        description= _ "Turns run out"
        condition=lose
      [/objective]
    [/objectives]
[/event]
Light travels much faster than sound, that's why some people seem bright until you hear them speak.

>>> MY LITTLE LAB! <<<
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Hrm..learnign the ropes, help me out a bit

Post by zookeeper »

How about that "CLEAR_FOG 1 15 42 6"?
User avatar
TrashMan
Posts: 601
Joined: April 30th, 2008, 8:04 pm
Contact:

Re: Hrm..learnign the ropes, help me out a bit

Post by TrashMan »

So that's the culprit..what's wrong with it?

IIRC, I copied that from some other scenario
Light travels much faster than sound, that's why some people seem bright until you hear them speak.

>>> MY LITTLE LAB! <<<
User avatar
TrashMan
Posts: 601
Joined: April 30th, 2008, 8:04 pm
Contact:

Re: Hrm..learnign the ropes, help me out a bit

Post by TrashMan »

I really want to know hte proper code for removing the fog...

While I'm looking it up in the wiki, here's anohter question I couldn't find hte answer for

The other of [or] or [and] in the filter

Basicely, will this work? I need both units to reach a specific area. Technicely, I need 3 units to reach the area..If this is correct, for hte 3rd unit, do Iadd another id inthe add tags or do I add a new add tag?

Code: Select all

	
[event]
	name=moveto
        [filter]
            id=Ellderon
              [and]
                  id=Ithilien
              [/and]
            x=15-17
            y=1-2
        [/filter]

         [endlevel]
             result=victory
             bonus=yes
        [/endlevel]
	[/event]
Light travels much faster than sound, that's why some people seem bright until you hear them speak.

>>> MY LITTLE LAB! <<<
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: Hrm..learnign the ropes, help me out a bit

Post by AI »

This event will trigger if a unit satisfies *all* of the following conditions:
-It just moved to a hex with coordinates (15-17,1-2)
-its id is Ellderon
-its id is Ithilien

Obviously that never happens, what you need to do is write an event that triggers if *any* of the three units moves into the area, then [if] with [have_unit] to see if the others are in that area too.

To make this work correctly, you'll need first_time_only=no (obviously) and if the action isn't [endlevel], you'll also need to set a variable to stop the [then] from triggering more than once.
User avatar
TrashMan
Posts: 601
Joined: April 30th, 2008, 8:04 pm
Contact:

Re: Hrm..learnign the ropes, help me out a bit

Post by TrashMan »

Hrm...so it has to be done via variables..

How about if I check for each unit individually and increase a counter for each one that enters. Once all 3 enter (variable equals 3) then the mission ends? F'course, the unit could exit again....Hrm... I'll just leave it at one unit for simplicity sake..

checking for multiple units is a chore...Hey, methinks ToaM has a mission like that..I can check it's code to see :P

thanks AI..Oh, b.t.w. - is there a code to remove the fog over a specific area?
Light travels much faster than sound, that's why some people seem bright until you hear them speak.

>>> MY LITTLE LAB! <<<
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Hrm..learnign the ropes, help me out a bit

Post by zookeeper »

TrashMan wrote:Technicely, I need 3 units to reach the area..If this is correct, for hte 3rd unit, do Iadd another id inthe add tags or do I add a new add tag?
Create a moveto event which triggers when whichever one of those 3 units enters the area, and then just use an [if] to check whether all the 3 units are in the area right now.
User avatar
TrashMan
Posts: 601
Joined: April 30th, 2008, 8:04 pm
Contact:

Re: Hrm..learnign the ropes, help me out a bit

Post by TrashMan »

Ok, I'm downright irritated ATM.

I made a working campaign (in progress) but I can't upload it via the add-on server.
I checked my file structure and my .pbl file thrice.
WTF???

I released a test version of the campaign in the Scenario and Campaign forum (Coming of the Storm), so can anyone take a look and tell me what the hell is wrong?
Light travels much faster than sound, that's why some people seem bright until you hear them speak.

>>> MY LITTLE LAB! <<<
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: Hrm..learnign the ropes, help me out a bit

Post by AI »

Remove the passphrase from the PBL, attach it here ((g)zipped if needed), tell us its exact location.
Post Reply