Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: TDplay on June 23, 2018, 10:17:08 AM

Title: Can I make a CRPLCore act as a command node?
Post by: TDplay on June 23, 2018, 10:17:08 AM
I need this for my next map. I've tried
"COMMANDNODE" CurrentCoords CreateUnit
but it doesn't do anything.

I want my CRPLCore to be the point you build your infrastructure out from.
Title: Re: Can I make a CRPLCore act as a command node?
Post by: Karsten75 on June 23, 2018, 11:40:45 AM
The only way is to force-land the command node over your CRPL core. Then somehow prevent later relocation if that is what you require. I don't specifically recall, but I *think* there may be a way to prevent a CN from taking off.
Title: Re: Can I make a CRPLCore act as a command node?
Post by: Grabz on June 23, 2018, 06:48:41 PM
AFAIK you can't create a CN out of thin air, it can only fall from the sky and it can only be placed by the player. If you need a CN to be landed in a particular area you can designate the position and pass 1 frame so players can't change the landing location, and you can use SetUnitSelectableOverride to make it so players can't move the CN.
Title: Re: Can I make a CRPLCore act as a command node?
Post by: TDplay on June 25, 2018, 04:12:27 PM
OK, thanks. Expect to see my map soon  ;)
EDIT: Also is there a way to make the CN invisible?
Title: Re: Can I make a CRPLCore act as a command node?
Post by: Grabz on June 25, 2018, 05:42:02 PM
There is not. Best you can probably do is hide it with another image laid on top using a CRPLCore, with a specific z-position so it goes over other textures but under packets and connections. A z-position of 2 should do the trick:

Self "main" 2 SetImagePositionZ
Title: Re: Can I make a CRPLCore act as a command node?
Post by: TDplay on June 26, 2018, 11:47:59 AM
Alright. My map's gonna have a big ship on it (that you build from) so hiding the CN shouldn't be too hard.