summoning skill

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.
User avatar
beetlenaut
Developer
Posts: 2825
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: summoning skill

Post by beetlenaut »

herolulu wrote: August 5th, 2021, 11:40 pm I inserted affect_allies=yes and it seems to have no effect.
ALL keys and tags only work in specific places. The wiki doesn't show affect_allies inside [event], so it does not work there. (You should check the wiki to make sure your code is valid in its location.) If you want a similar result inside [event], you need to use filters to adjust when the event triggers. You can also use [if] statements to adjust more.

I don't know what you are trying to show with the code you posted.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
User avatar
Celtic_Minstrel
Developer
Posts: 2207
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: summoning skill

Post by Celtic_Minstrel »

herolulu wrote: August 5th, 2021, 11:40 pm But when it comes to [dummy] and [event]. I inserted affect_allies=yes and it seems to have no effect.
I think it should work if you use ability_active instead of ability in the filter.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
herolulu
Posts: 32
Joined: February 29th, 2020, 4:46 pm

Re: summoning skill

Post by herolulu »

Celtic_Minstrel wrote: August 6th, 2021, 12:40 am
herolulu wrote: August 5th, 2021, 11:40 pm But when it comes to [dummy] and [event]. I inserted affect_allies=yes and it seems to have no effect.
I think it should work if you use ability_active instead of ability in the filter.
Do you mean to modify the code as shown below?

ability=guardianangel1,guardianangel2→ability_active=guardianangel1,guardianangel2
User avatar
Celtic_Minstrel
Developer
Posts: 2207
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: summoning skill

Post by Celtic_Minstrel »

Yes. Does that work?
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
herolulu
Posts: 32
Joined: February 29th, 2020, 4:46 pm

Re: summoning skill

Post by herolulu »

Celtic_Minstrel wrote: August 7th, 2021, 1:01 am Yes. Does that work?
I tried your suggestion. It can't affect allies, it can only affect characters that the player controls. I hope he can have an effect on the characters he controls and allies.
User avatar
beetlenaut
Developer
Posts: 2825
Joined: December 8th, 2007, 3:21 am
Location: Washington State
Contact:

Re: summoning skill

Post by beetlenaut »

OK, I examined your code. Like I was saying before, you have to adjust the event filter to include allied units. Your code collects the unit to be shielded in the first part. You have a filter that specifies side=$second_unit.side. Replace that line with this:

Code: Select all

[filter_side]
	[allied_with]
		side=$second_unit.side
	[/allied_with]
[/filter_side]
I didn't test this, but I think it will work.
Campaigns: Dead Water,
The Founding of Borstep,
Secrets of the Ancients,
and WML Guide
herolulu
Posts: 32
Joined: February 29th, 2020, 4:46 pm

Re: summoning skill

Post by herolulu »

beetlenaut wrote: August 8th, 2021, 4:16 am OK, I examined your code. Like I was saying before, you have to adjust the event filter to include allied units. Your code collects the unit to be shielded in the first part. You have a filter that specifies side=$second_unit.side. Replace that line with this:

Code: Select all

[filter_side]
	[allied_with]
		side=$second_unit.side
	[/allied_with]
[/filter_side]
I didn't test this, but I think it will work.
COOL! ! ! It succeeded. awesome. You are amazing. thank you very much.
Post Reply