Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: milkev on February 09, 2016, 10:44:36 PM

Title: On Destroy Make Totem
Post by: milkev on February 09, 2016, 10:44:36 PM
hello, looking at a way to get tech upgrades in my level and was thinking of this, but it doesn't do anything. Technically (from my perspective anyway) it should work. Is there something i'm doing wrong?
I tried looking through google for answers but it's not very help-full ( :( ) U guys r very smart so i know you cna find an answer!


:destroy

CreateUnit("TOTEM" CurrentCoords) <-uid

- milkev

P.S. I've never seen this in any maps before so... lol
Title: Re: On Destroy Make Totem
Post by: GameGibu on February 09, 2016, 11:06:13 PM
:destroyed
     CreateUnit("TOTEM" CurrentCoords) ->uid #basically useless since this script will not run due to its core being dead...

Hope that helps!
-GameGibu
Title: Re: On Destroy Make Totem
Post by: GoodMorning on February 10, 2016, 06:37:20 AM
The :destroyed function can create units.
The seemingly useless bit is the '->uid', which stores the unit ID.
This could be used to modify the properties of the Totem, or replace 'pop' to remove the output from the stack.
Title: Re: On Destroy Make Totem
Post by: milkev on February 15, 2016, 06:29:09 PM
ok thanks!
Title: Re: On Destroy Make Totem
Post by: GoodMorning on February 15, 2016, 06:39:50 PM
No problem. Do unto others...

Come back if you have issues, your success is also other people's fun. Yes, we have a vested interest.

Enjoy the wonders if CRPL.
Title: Re: On Destroy Make Totem
Post by: milkev on February 15, 2016, 07:18:11 PM
Quote from: GoodMorning on February 15, 2016, 06:39:50 PM
No problem. Do unto others...

Come back if you have issues, your success is also other people's fun. Yes, we have a vested interest.

Enjoy the wonders if CRPL.
I am enjoying the wonders of CRPl very much.