Overloading function.

Moderator: Pocus

Post Reply
Surt
General - Elite King Tiger
General - Elite King Tiger
Posts: 4082
Joined: Thu May 21, 2020 9:50 pm

Overloading function.

Post by Surt »

I'm looking for a way to overload some of the functions from the base game, mostly the ones called from

FUNCTION Events_CheckEachTurn(scenarioID);

as most of those are either outdated by a later date or not relevant for an earlier date.

So if I add a function of the same name in a scenario will it be called instead of the base games one?
Or do I have to copy the file Events.BSF (with its nearly 23K lines) and change what I need?
There are 10 kind of hard problems in computer science, naming, cache invalidations and off-by-one errors.
There are also 10 kinds of people, those who understand binary and those who do not.
pipfromslitherine
Site Admin
Site Admin
Posts: 9886
Joined: Wed Mar 23, 2005 10:35 pm

Re: Overloading function.

Post by pipfromslitherine »

You need to override the entire file in your custom scenario.

Cheers

Pip
follow me on Twitter here
Post Reply

Return to “MOD”