Going Bankrupt

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
TheLost1
Posts: 154
Joined: April 9th, 2006, 1:12 am

Going Bankrupt

Post by TheLost1 »

Alright, so, Im trying to make it so that when one's gold goes down to zero or below, they lose. This is for a multiplayer scenario, so I used "kill" instead of "endlevel", btw.

i looked it up on the forums, and got the exact same thing that I was using, but neither seem to work.

pls help

Code: Select all

[store_gold] 
side=1
variable=sideonegold 
[/store_gold] 
[if] 
   [variable] 
   name=sideonegold 
   less_than=0 
   [/variable] 
   [then] 
      [kill] 
      side=1
canrecuit=1
      [/kill] 
   [/then] 
[/if]
The dragons are all colour-coded,
Some consider this system outmoded.
This was not preordained
Gary Gygax explained,
"My box of Crayolas exploded."
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Code: Select all

      [kill]
      side=1
canrecuit=1
      [/kill] 
...
TheLost1
Posts: 154
Joined: April 9th, 2006, 1:12 am

Post by TheLost1 »

zookeeper wrote:

Code: Select all

      [kill]
      side=1
canrecuit=1
      [/kill] 
...
Yes?
The dragons are all colour-coded,
Some consider this system outmoded.
This was not preordained
Gary Gygax explained,
"My box of Crayolas exploded."
User avatar
turin
Lord of the East
Posts: 11662
Joined: January 11th, 2004, 7:17 pm
Location: Texas
Contact:

Post by turin »

"canrecuit"?
For I am Turin Turambar - Master of Doom, by doom mastered. On permanent Wesbreak. Will not respond to private messages. Sorry!
And I hate stupid people.
The World of Orbivm
TheLost1
Posts: 154
Joined: April 9th, 2006, 1:12 am

Post by TheLost1 »

Damn, I mispelled "canrecruit".

Spelling it correctly doesn't help, though.
The dragons are all colour-coded,
Some consider this system outmoded.
This was not preordained
Gary Gygax explained,
"My box of Crayolas exploded."
Clonkinator
Posts: 676
Joined: July 20th, 2006, 4:45 pm
Location: Germany

Re: Going Bankrupt

Post by Clonkinator »

TheLost1 wrote:Alright, so, Im trying to make it so that when one's gold goes down to zero or below, they lose. This is for a multiplayer scenario, so I used "kill" instead of "endlevel", btw.

i looked it up on the forums, and got the exact same thing that I was using, but neither seem to work.

pls help

Code: Select all

[store_gold] 
side=1
variable=sideonegold 
[/store_gold] 
[if] 
   [variable] 
   name=sideonegold 
   less_than=0 
   [/variable] 
   [then] 
      [kill] 
      side=1
      canrecuit=1
      [/kill] 
   [/then] 
[/if]
So when is this going to be activiated?
It should be, as an example, like this:

Code: Select all

[event]
name=new_turn
[store_gold] 
side=1
variable=sideonegold 
[/store_gold]
[if] 
   [variable] 
   name=sideonegold 
   less_than=0 
   [/variable] 
   [then] 
      [kill] 
      side=1
      canrecruit=1
      [/kill] 
   [/then] 
[/if]
[event]
There's exactly nothing going to happen if this event never is called...
And by the way, this only makes the leader get killed. This isn't a real problem, but you might want to kill the entire side instead. For this, just remove the 'canrecruit=1'.
User avatar
appleide
Posts: 1003
Joined: November 8th, 2003, 10:03 pm
Location: Sydney,OZ

Post by appleide »

Code: Select all

first_time_only=yes
Add this line to Clonkinator's event if you want to copy and paste.
TheLost1
Posts: 154
Joined: April 9th, 2006, 1:12 am

Post by TheLost1 »

thanks guys :)
The dragons are all colour-coded,
Some consider this system outmoded.
This was not preordained
Gary Gygax explained,
"My box of Crayolas exploded."
Post Reply