3 questions?

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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.
Elmor
Posts: 151
Joined: May 5th, 2010, 8:19 am

3 questions?

Post by Elmor » October 14th, 2010, 1:34 pm

thanx a lot for help, but i got new questions:
tell me, please, anyone
is there a way to make unit regenerate upsidedown?
to lose hp every turn?
i mean, what is the easiest way?

and

am i able to use two abilities tags in one ability description?
for example, [regenerate] and [heal]?

and

is there a way to [filter] unit and find out if it`s ally or enemy?

thanx
Last edited by Elmor on October 14th, 2010, 2:58 pm, edited 3 times in total.

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: [chance_to_hit] doesn`t works?

Post by zookeeper » October 14th, 2010, 1:38 pm

You're wrong. I tried it and it works just fine.

Elmor
Posts: 151
Joined: May 5th, 2010, 8:19 am

Re: [chance_to_hit] doesn`t works?

Post by Elmor » October 14th, 2010, 1:41 pm

really, now it works...
i didn`t change anything...
must be i`m crazed idiot=))

Elmor
Posts: 151
Joined: May 5th, 2010, 8:19 am

Re:two questions?

Post by Elmor » October 14th, 2010, 2:01 pm

on top

User avatar
Reepurr
Posts: 1088
Joined: August 29th, 2010, 5:38 pm

Re: 3 questions?

Post by Reepurr » October 14th, 2010, 3:31 pm

Regenerate upside-down is the easiest thing possible. I use a heals -4 in my era, and that's even filtered to not hurt undead or mechanical...
Simply make your own regenerates tag and set the heals= to -*.
"What do you mean, "a dwarvish dragonguard with marksman is overpowered"?"

Story of a Drake Outcast | The Nonsense Era
Played HttT-Underground Channels? Thought it was rubbish? Help us develop it here!

Elmor
Posts: 151
Joined: May 5th, 2010, 8:19 am

Re: 3 questions?

Post by Elmor » October 14th, 2010, 3:38 pm

right!!
thx

but it doesn`t works... again

Code: Select all

[heals]
	value=-6
	id=spore
	affect_allies=no
        affect_enemies=yes
        affect_self=yes
	name= _ "spore"
	description=  _ "Spore:"
	affect_self=yes
	[affect_adjacent]
		adjacent=n,ne,se,s,sw,nw
	[/affect_adjacent]
[/heals]
it heal by -6 enemies, but not itsself

User avatar
Reepurr
Posts: 1088
Joined: August 29th, 2010, 5:38 pm

Re: 3 questions?

Post by Reepurr » October 14th, 2010, 4:15 pm

I think you've got your affect_enemies=yes in the wrong place. There might be other problems too... Compare and contrast:

Code: Select all

    [heals]
        id=miasma
        value=-4
        cumulative=no
        name= _ "miasma"
        description= _ "Miasma:
All adjacent enemies take 4 damage for each turn they are next to a unit with miasma. This does not affect undead, mechanical or plasmabot units."
        affect_self=no
	[affect_adjacent]
	   adjacent=n,ne,se,s,sw,nw
	   [filter]
		is_enemy=yes
# Ignore everything in the [not] tag...
		[not]
		    race=undead
		    race=plasmabot
		    race=mechanical
		[/not]
	   [/filter]
	[/affect_adjacent]
    [/heals]
"What do you mean, "a dwarvish dragonguard with marksman is overpowered"?"

Story of a Drake Outcast | The Nonsense Era
Played HttT-Underground Channels? Thought it was rubbish? Help us develop it here!

Elmor
Posts: 151
Joined: May 5th, 2010, 8:19 am

Re: 3 questions?

Post by Elmor » October 14th, 2010, 4:30 pm

no, it hurts enemies, but it didn`t hut itself

User avatar
zookeeper
WML Wizard
Posts: 9740
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: 3 questions?

Post by zookeeper » October 14th, 2010, 5:06 pm

Don't remove your previous questions when asking a new one. Just make a new post.

Elmor
Posts: 151
Joined: May 5th, 2010, 8:19 am

Re: 3 questions?

Post by Elmor » October 14th, 2010, 9:21 pm

ok, sorry
any advice?

and a lil bit more help, please
i got this code(not mine):

Code: Select all

#define ABILITY_HITANDRUN
[dummy]
        id=hitandrun
        name= _ "Hit and Run"
        description=_ "Hit and Run:
This unit gains 3 moves back after attacking, but cannot attack again."
[/dummy]
[/abilities]
[event]
	name=attack end
	first_time_only=no
	[filter]
		x,y=$x1,$y1
		ability=hitandrun
	[/filter]
	{VARIABLE_OP unit.moves add 3}
	[unstore_unit]
	        variable=unit
		{COLOR_HARM}
		text= _ "FLEE!"
		find_vacant=no
	[/unstore_unit]
[/event]
[+abilities]
#enddef
it makes unit able to move 3 more tiles after attack
so it works normally, until one of units with hitandrun ability lvl up
since that, all units having this ability recives 9 tiles for move

and why some of my units regenerates 2hp even if they weren`t moving?

help me, please

monochromatic
Posts: 1549
Joined: June 18th, 2009, 1:45 am

Re: 3 questions?

Post by monochromatic » October 15th, 2010, 1:40 am

Elmor wrote:and why some of my units regenerates 2hp even if they weren`t moving?
Units rest, meaning if they for a turn do not move or attack they gain 2 HP.

Elmor
Posts: 151
Joined: May 5th, 2010, 8:19 am

Re: 3 questions?

Post by Elmor » October 15th, 2010, 6:13 am

oh, sorry, i mean even if they were moving

Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: 3 questions?

Post by Ceres » October 15th, 2010, 9:13 am

units with the ability 'healthy' (like dwarves) gain 2 hp every turn, equal if they moved or not.

Elmor
Posts: 151
Joined: May 5th, 2010, 8:19 am

Re: 3 questions?

Post by Elmor » October 15th, 2010, 3:27 pm

yeah, looks like that`s it

can anyone help with other problems?

User avatar
Pentarctagon
Forum Administrator
Posts: 4098
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: 3 questions?

Post by Pentarctagon » October 15th, 2010, 5:17 pm

Elmor wrote:am i able to use two abilities tags in one ability description?
for example, [regenerate] and [heal]?
yes. a good example (taken from an add-on):
Spoiler:
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code

Post Reply