[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions_content.php on line 1014: Undefined array key 3
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4130: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3009)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4130: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3009)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4130: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3009)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4130: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3009)
Battlezone Forums • is it possible for .dll to raise water levels on the fly?
Page 1 of 1

is it possible for .dll to raise water levels on the fly?

Posted: Fri Mar 04, 2011 10:03 am
by TheJamsh
As per topic title, is it possible to have a .dll that modified the height of a water layer?

My plan is for a volcanic map, which will raise the level of 'lava' in stages as a game progresses, cutting off certain areas of the map. Is such a thing possible?

Re: is it possible for .dll to raise water levels on the fly

Posted: Fri Mar 04, 2011 12:14 pm
by Semaphore
The only rising anything I've ever seen is the path to the secret Scion base in the singleplayer campaign, just before you side with the Scions. But that's probably an object of some sort. Might be worth checking out if modifying the water thing doesn't work out for you. You can probably still make it kill you somehow..

Re: is it possible for .dll to raise water levels on the fly

Posted: Fri Mar 04, 2011 2:13 pm
by Ded10c
I'm actually not sure. I do think it's possible to change the damage caused by water, though.

Re: is it possible for .dll to raise water levels on the fly

Posted: Fri Mar 04, 2011 2:47 pm
by TheJamsh
@ Semaphore - The idea was to use the water damage settings to enable the water to deal the damage to anyone caught in/under it. The map would have high and low areas but underneath all the terrain would be a full layer of water.

I'm pretty sure, that if the console is able to raise water levels (I don't see why it should be able to), then it should be possible. Not sure how MP will handle it, but may as well do a quick test.

Hell even the BZ2 Scriptor could write console commands.

Re: is it possible for .dll to raise water levels on the fly

Posted: Fri Mar 04, 2011 3:11 pm
by GSH
DLLs can execute console commands just fine in 1.3. Look for this callback in ScriptUtils.h, which includes a sample bit of code:
// Feeds a command to the command console, as if it'd been typed by the user.
//
// DLL authors - just sprintf_s your own strings to pass in, e.g. :
//
// char ExecCmd[256];
// sprintf_s(ExecCmd,sizeof(ExecCmd),"sky.fogColor %d %d %d", ColorR, ColorG, ColorB);
// IFace_ConsoleCmd(ExecCmd);
//
// [Style comment: sprintf is *DANGEROUS*, and can trash memory if not
// careful. sprintf_s is *SAFE*. (I previously recommended _snprintf,
// but that takes more lines of code to use correctly. MS has finally
// made security fairly easy out of the box with the _s versions of things
// like sprintf_s, strcat_s, strcpy_s, etc)]
//
//
// If bSquelchOutput is true, then nothing will be printed to the console
// as the result of the command. This is the default
DLLEXPORT void DLLAPI IFace_ConsoleCmd(const char* pStr, bool bSquelchOutput = true);
-- GSH

Re: is it possible for .dll to raise water levels on the fly

Posted: Fri Mar 04, 2011 5:50 pm
by TheJamsh
Hopefully then water height can be controlled via console... I assume it can, most things are.

Re: is it possible for .dll to raise water levels on the fly

Posted: Fri Mar 04, 2011 6:42 pm
by Semaphore
How will you let the AI driving skills handle this changing map layout? Path nodes that move as well?

Re: is it possible for .dll to raise water levels on the fly

Posted: Fri Mar 04, 2011 6:57 pm
by GSH
BZ1/2 do not use path node based pathing, or navmeshes or anything "new." Instead it tries to dynamically divvy up the terrain into strips and do an A* on them. After significantly modifying pathing, should call calc cliffs or similar to cause the strips to be re-examined.

-- GSH

Re: is it possible for .dll to raise water levels on the fly

Posted: Fri Mar 04, 2011 7:03 pm
by TheJamsh
The map wouldn't be for base building systems either, its mainly for infantry-based MP matches, maybe vehicles, but vehicles could escape rising tide/lava a bit too quickly if you ask me.

Re: is it possible for .dll to raise water levels on the fly

Posted: Fri Mar 04, 2011 10:36 pm
by Ded10c
Would also be a nice little trick for singleplayer. In fact, I'd love a tech demo of this. Would suit one of my missions perfectly.

Re: is it possible for .dll to raise water levels on the fly

Posted: Sat Mar 05, 2011 3:04 am
by S.cavA.rmyG.en
AHadley wrote:Would also be a nice little trick for singleplayer. In fact, I'd love a tech demo of this. Would suit one of my missions perfectly.
I think it would be fun to have a DM map where you race the lava and battel for high ground.
I am sort of reminded of the toxic tower level in Donkey Kong 2[NES] but if some one desides to make a 3D version count me out becous that was the hardest level in the game.for those of you who have not played it is a race agest the refresh rate to the top of a tower thats filling with acid. :twisted: