Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: Otterbear on December 01, 2013, 01:43:19 AM

Title: Setting void level.
Post by: Otterbear on December 01, 2013, 01:43:19 AM
I'm not even close to knowing where to start on this but,
I was wondering is its possible to lower the void maxheight, so that smaller amounts of Creeper would "Leak" into space?

I know that it is set to level 500, and that any emitter that exceeds that amount should eventually leak into space. But I was hoping to not have to create such large emitters.
TIA,
Title: Re: Setting void level.
Post by: Annonymus on December 01, 2013, 04:13:49 AM
I'm not sure if that works but maybe you could use setterrainoverride.
Title: Re: Setting void level.
Post by: J on December 01, 2013, 08:04:55 AM
SetTerrainOverride should work for this: http://knucklecracker.com/wiki/doku.php?id=crpl:docs:setterrainoverride
If it doesn't, try setting the terrain to any level, mark it for terraforming, change it to void and wait (while terps work) until it reaches the level you want. This does mean you have to count hundreds of terrain levels.
Title: Re: Setting void level.
Post by: Otterbear on December 01, 2013, 07:23:19 PM
Ok, I imagined this was what I had to do.

Just curious, is there a command to remove the "SetTerrainOverride".
For instance could I use it and then have it disappear at a certain point, so that a wall of creeper comes out?
I haven't played the credits game yet, maybe this happens.

Thanks to all for your help.
Title: Re: Setting void level.
Post by: Relli on December 01, 2013, 07:26:11 PM
Quote from: Otterbear on December 01, 2013, 07:23:19 PM
Ok, I imagined this was what I had to do.

Just curious, is there a command to remove the "SetTerrainOverride".
For instance could I use it and then have it disappear at a certain point, so that a wall of creeper comes out?
I haven't played the credits game yet, maybe this happens.

Thanks to all for your help.
You could simply set the override again, back to what it originally was, or any other value you see fit. If there's a faster way than that, I don't know it.
Title: Re: Setting void level.
Post by: Otterbear on December 01, 2013, 07:40:43 PM
Thanks Riluna,
Why I didn't think of that, I have no idea.  :-[
Title: Re: Setting void level.
Post by: Clean0nion on December 01, 2013, 07:52:45 PM
<-x <-y GeTerrain SetTerrainOverride does that.
Title: Re: Setting void level.
Post by: Lost in Nowhere on December 01, 2013, 08:50:37 PM
You'd need two X-Y sets, though, so:
<-x <-y <-x <-y GetTerrain SetTerrainOverride
Title: Re: Setting void level.
Post by: Grayzzur on December 02, 2013, 11:19:55 AM
Quote from: Lost in Nowhere on December 01, 2013, 08:50:37 PM
You'd need two X-Y sets, though, so:
<-x <-y <-x <-y GetTerrain SetTerrainOverride
This is a good spot to use "dup2" as a shortcut - it duplicates the top 2 items on the stack.
<-x <-y dup2 GetTerrain SetTerrainOverride
Title: Re: Setting void level.
Post by: J on December 02, 2013, 11:32:25 AM
Remember that terraforming after 'undoing' a terrain override won't change the terrain overrride, meaning you have to undo it again.
Also I just checked that if you set a terrain override to 500, creeper from terrain can move freely into void. Use it to create special effects.
Title: Re: Setting void level.
Post by: Clean0nion on December 02, 2013, 11:46:22 AM
Quote from: J on December 02, 2013, 11:32:25 AM
Remember that terraforming after 'undoing' a terrain override won't change the terrain overrride, meaning you have to undo it again.
Also I just checked that if you set a terrain override to 500, creeper from terrain can move freely into void. Use it to create special effects.
Alternatively, set the override on a path of void to 1, then add creeper. It'll act like undetectable digitalis.
Title: Re: Setting void level.
Post by: Otterbear on December 02, 2013, 09:59:30 PM
Thanks again to all the responders.
This should make for some interesting maps soon.

Quote from: J on December 02, 2013, 11:32:25 AM
Remember that terraforming after 'undoing' a terrain override won't change the terrain overrride, meaning you have to undo it again.

Isn't this what Clean0nion, Lost in Nowhere, and Grayzzur are talking about, or have I missed something?


Quote from: J on December 02, 2013, 11:32:25 AMAlso I just checked that if you set a terrain override to 500, creeper from terrain can move freely into void. Use it to create special effects.

I thought "Void" defaulted to 500? I'm not sure I follow what you did here.

EDIT: OK, so if Void is 500, and you set the terrain in a certain area, say near/under and emitter, than that creeper should flow into the void. right?
Title: Re: Setting void level.
Post by: Kingo on December 03, 2013, 12:45:51 AM
Quote from: Otterbear on December 02, 2013, 09:59:30 PM

Quote from: J on December 02, 2013, 11:32:25 AMAlso I just checked that if you set a terrain override to 500, creeper from terrain can move freely into void. Use it to create special effects.

I thought "Void" defaulted to 500? I'm not sure I follow what you did here.

Void is level 500.
Title: Re: Setting void level.
Post by: Otterbear on December 03, 2013, 12:59:28 AM
Thanks Kingo. That got me thinking in the right direction.

Just a thought: Are we going about this in the wrong direction maybe?
Maybe if the VOID setting could be lowered, that would alleviate a lot of coding.
Title: Re: Setting void level.
Post by: Grayzzur on December 03, 2013, 09:49:23 AM
Quote from: Otterbear on December 03, 2013, 12:59:28 AM
Just a thought: Are we going about this in the wrong direction maybe?
Maybe if the VOID setting could be lowered, that would alleviate a lot of coding.

SetTerrainOverride works on void space, too.


$VoidHeight:200

once
MapWidth 0 do
MapHeight 0 do
J I GetVoid
if
J I <-VoidHeight SetTerrainOverride
endif
loop
loop
endonce
Title: Re: Setting void level.
Post by: Otterbear on December 04, 2013, 01:03:29 AM
Quote from: Grayzzur on December 03, 2013, 09:49:23 AM
Quote from: Otterbear on December 03, 2013, 12:59:28 AM
Just a thought: Are we going about this in the wrong direction maybe?
Maybe if the VOID setting could be lowered, that would alleviate a lot of coding.

SetTerrainOverride works on void space, too.


$VoidHeight:200

once
MapWidth 0 do
MapHeight 0 do
J I GetVoid
if
J I <-VoidHeight SetTerrainOverride
endif
loop
loop
endonce


Thats Awesome!, I can't wait to try this.