Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: iwishforpie2 on November 19, 2014, 11:43:39 AM

Title: How the CN produces packets
Post by: iwishforpie2 on November 19, 2014, 11:43:39 AM
How does this work? The guppys send out packets and all of that, but how would you make a CPRL produce packets?
Title: Re: How the CN produces packets
Post by: J on November 19, 2014, 11:52:04 AM
Sending packets is fairly complicated and cpu-intensive, so you cannot send normal packets with CRPL. You can auto-reload a guppy with crpl or create a custom energy network (with each packet being a crpl core) and add the energy to the units individually when the packets arrive. If you use the last one you must however take over control of the entire energy network as you can't check which packets are going to which unit (and the CN might have already sent a packet to a unit or it sends one while you have already a custom packet running).
Title: Re: How the CN produces packets
Post by: iwishforpie2 on November 19, 2014, 11:53:55 AM
How would I interpret the guppy's energy so it gains packets, what command would be used?
Title: Re: How the CN produces packets
Post by: iwishforpie2 on November 19, 2014, 01:42:55 PM
Would I use CONST_AMMO?
Title: Re: How the CN produces packets
Post by: J on November 19, 2014, 01:58:31 PM
I don't remember exactly how to dow it, but using the CONST_AMMO unit attribute might work. Give it a try and if it doesn't work I hope others can help you further. (use GetUnitAttribute and SetUnitAttribute with a const as one of the arguments)