Slith_Water_Edging(Arhem?)

Tech support for Battle Academy

Moderators: Slitherine Core, BA Moderators

Post Reply
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Slith_Water_Edging(Arhem?)

Post by Merr »

Pip,

Honestly, I'm not out to find odd stuff but ...

Next time you're in the PLUGIN folder you might want to add the water tile global for the Arnhem tileset.
Not a problem since it's the same water tile as the other sets ... Just to make your function complete really. :wink:

Now, the reason why I stumbled across this is a funny story ...

In my Merr_Skirmish, I made a change to how the AI (AI.BSF) unloads units. Well, I just added the condition "IsWaterTile" but it spit at me and told me that it wasn't defined. So, I cut/pasted the function (and renamed it "IsWater" to ensure no dupes) to the bottom of the AI.BSF and the AI still dropped units in the water! I went back and realized that it was using "globals" to define the water tile ... So, I just replaced the global with the specific tile ... viola!

Anyway ... It appears that a user AI folder is a totally seperate entity, not allowing it to see outside functions (from user scenario folder) let alone read outside globals. Please, don't change this since it's purely an observation and it's not a problem.

Just when I thought I had BA scripting figured out, it threw a curve ball at me :wink: .

Rob
pipfromslitherine
Site Admin
Site Admin
Posts: 9937
Joined: Wed Mar 23, 2005 10:35 pm

Post by pipfromslitherine »

Yeah - there is a line between hardcoding too many of the include paths, and having scripts which can't see useful functions. I might add in some special path IDs to the includes, which would at least allow you to include things from specific folders. It's definitely something that I have run into myself when trying to do things!

The current include order is

same path as the initial file
DATA\SCRIPTS in the campaign folder
DATA\BATTLE\SCRIPTS in the main game folder
DATA\SCRIPTS in the main game folder
the filename itself (which is of course of limited usefulness as then you can really only use it to path to things in the main game folder)

so it's all something of a mess.

Cheers

Pip
Merr
Captain - Heavy Cruiser
Captain - Heavy Cruiser
Posts: 903
Joined: Mon Aug 16, 2010 2:00 pm

Post by Merr »

Wow, that was a fast reply, thanks. The forum is awefully quiet today (especially the tech support) ... which is a good thing!

Please, don't change or add anything! I can see things breaking left and right after that!

No worries about global passing ... I proved (to myself) that using UniversalVar works great for passing values to/from "shielded" scripts.

Thanks for posting the include order ... You might think it's a mess, but from my point of view it works! ...

It's just a matter of knowing what goes where and when! :)

Rob
Post Reply

Return to “Battle Academy : Tech Support”