Search found 144 matches

by Helmet
October 16th, 2020, 1:13 pm
Forum: WML Workshop
Topic: How to prevent animation when unit moves only 1 hex
Replies: 6
Views: 169

Re: How to prevent animation when unit moves only 1 hex

The pre-movement animation is one frame at 250; it shows the roly poly in mid-curl. The post movement animation is a slightly different image for uncurling. It is one frame at 125. The running animation is a spinning ball, three frames, 150, 150, 150. Right now, when the roly poly moves only 1 hex -...
by Helmet
October 16th, 2020, 3:39 am
Forum: WML Workshop
Topic: Adding moves to a unit after it has attacked
Replies: 24
Views: 514

Re: Adding moves to a unit after it has attacked

Oh no. It's starting to sound like I need to concoct mind-boggling code that may or may not work.

Actually...that pretty much describes all my efforts at coding WML.
by Helmet
October 16th, 2020, 3:06 am
Forum: WML Workshop
Topic: How to prevent animation when unit moves only 1 hex
Replies: 6
Views: 169

Re: How to prevent animation when unit moves only 1 hex

That's a good idea, I'm going to keep it in mind for any future animations, but I don't think it can be applied to this unit. Basically, the bug-unit curls into a ball, rolls to its destination hex, then uncurls. Yes, my animated unit is a giant roly poly . roly_poly-standing.png And thinking about ...
by Helmet
October 16th, 2020, 2:36 am
Forum: WML Workshop
Topic: Adding moves to a unit after it has attacked
Replies: 24
Views: 514

Re: Adding moves to a unit after it has attacked

I'm using the not-officially-stable-but-probably-mostly-stable version 1.15.5 of Battle for Wesnoth, so maybe it's a bug. But, like you said, maybe the variable isn't set until after the moveto event is fired. Or...maybe the BATTLEHOP ability is impossible. Like making a unit literally move off the ...
by Helmet
October 16th, 2020, 1:54 am
Forum: WML Workshop
Topic: How to prevent animation when unit moves only 1 hex
Replies: 6
Views: 169

Re: How to prevent animation when unit moves only 1 hex

Thanks, Pilauli. My animated unit has a pre-movement animation and a post-movement animation, in addition to the usual running animation. That's why it looks odd when it only moves one hex. There's a lot of motion for such little travel. Your code was an improvement. Thanks for writing it. Your code...
by Helmet
October 15th, 2020, 6:36 pm
Forum: WML Workshop
Topic: How to prevent animation when unit moves only 1 hex
Replies: 6
Views: 169

How to prevent animation when unit moves only 1 hex

I made a custom "running" animation for a bug. The animation looks fine when the bug moves 2 or more hexes. Unfortunately, the animation looks odd when the unit moves only 1 hex. Consequently, I would prefer that the unit not employ its running animation when simply moving 1 hex. How would I do that...
by Helmet
October 15th, 2020, 6:09 pm
Forum: WML Workshop
Topic: Adding moves to a unit after it has attacked
Replies: 24
Views: 514

Re: Adding moves to a unit after it has attacked

Thanks for telling us about unit.resting , Celtic_Minstrel, and thanks for the debugging code, Pilauli. I tested your code. The message did not appear after a unit had moved and stopped. The message appeared the moment before a unit attacked (whether it had moved or didn't move). The message said, "...
by Helmet
October 15th, 2020, 2:48 am
Forum: WML Workshop
Topic: Adding moves to a unit after it has attacked
Replies: 24
Views: 514

Re: Adding moves to a unit after it has attacked

Oh. No wonder it didn't work. Thanks for the info. I didn't expect that this problem would be so difficult. In my mind (which evidently runs on BASIC), the code is easy and looks something like this, only in WML: 100 IF MovementUsed > 0 THEN GOTO 300 ELSE GOTO 200 200 REM Bonus Move 210 Moves=1 220 ...
by Helmet
October 15th, 2020, 2:12 am
Forum: WML Workshop
Topic: Methods of skipping huge sections of code while debugging
Replies: 4
Views: 117

Re: Methods of skipping huge sections of code while debugging

...What you need to do is change the mappings in preferences (add a custom extension mapping in the Languages section) so that *.cfg instead maps to the WML file format… which also means you need to install a language definition for the WML file format... Thank you, Celtic_Minstrel. It worked! I ha...
by Helmet
October 15th, 2020, 12:18 am
Forum: WML Workshop
Topic: Adding moves to a unit after it has attacked
Replies: 24
Views: 514

Re: Adding moves to a unit after it has attacked

Thanks for trying, Nyanyanyan, and for sharing your code for hit and run.
by Helmet
October 14th, 2020, 10:00 pm
Forum: WML Workshop
Topic: Adding moves to a unit after it has attacked
Replies: 24
Views: 514

Re: Adding moves to a unit after it has attacked

Hm. The Wiki says that a scenario can set unit.status.my_custom_key to 'yes' or 'no'. So maybe hitandrunstatus should be something like unit.status.hitandrun? I have no idea.
by Helmet
October 14th, 2020, 7:56 pm
Forum: WML Workshop
Topic: Adding moves to a unit after it has attacked
Replies: 24
Views: 514

Re: Adding moves to a unit after it has attacked

I had a similar problem a while ago, came up with this... Thank you! Your original code works fine. The code you modified does not work. I see the ability name on the sidebar, but nothing happens. Parts of the code I don't understand, so this is probably a ridiculous question. Do you think maybe an...
by Helmet
October 14th, 2020, 4:48 pm
Forum: WML Workshop
Topic: Making the AI faster
Replies: 8
Views: 243

Re: Making the AI faster

I recently posted an AI question to the forum, so I've been reading about AI behavior. I can't answer your question with a code example, but I do know that the answer to your question is yes , the AI can go faster. From the Wesnoth Wiki: https://wiki.wesnoth.org/Micro_AIs (ai_type=fast_ai) (Version ...
by Helmet
October 14th, 2020, 4:38 pm
Forum: WML Workshop
Topic: How to use HIGHLIGHT_IMAGE
Replies: 2
Views: 75

Re: How to use HIGHLIGHT_IMAGE

It worked! Thanks. It's not as bright as I expected. Moving the boat one hex might be more noticeable. Hm. HttT was a great campaign. I barely won that amazing last scenario; it took me a few tries. I don't think it's a spoiler to state that the ultimate death animation was brilliant. I forgot that ...
by Helmet
October 14th, 2020, 3:15 pm
Forum: WML Workshop
Topic: Methods of skipping huge sections of code while debugging
Replies: 4
Views: 117

Re: Methods of skipping huge sections of code while debugging

Wow, #ifdef works great. Thanks. I didn't know some text editors can easily add and subtract remarks/comments. Thanks for the tip. I use TextWrangler for Mac. I'll see if it has that feature... It does, but it only places semi-colons, not #. Evidently there is no way to change it to # in the prefere...