How to summon a Emitter and destroy the PZ at the same time? {SOLVED}

Started by TLFP, January 22, 2016, 09:00:11 PM

Previous topic - Next topic

TLFP

Question in title. If anyone wants to create a script for this I will credit whoever makes a working program.
Currently ghosting, don't mind me.
Christian, my list of various content creation groups can be found here

Nicant

Here's a start to the code! ;D (No idea how to have it remove the powerzone though :P )
# PowerlessEmitter.crpl
# Created on: 1/22/2016 9:12:10 PM
# ------------------------------------------

$ProductionInterval:20
$ProductionAmt:15
$StartTime:30

once
Self CONST_COUNTSFORVICTORY true SetUnitAttribute
Self CONST_NULLIFIERDAMAGES true SetUnitAttribute
Self CONST_TAKEMAPSPACE true SetUnitAttribute
Self CONST_CREATEPZ false SetUnitAttribute #This dosen't destroy the emitter's PowerZone!
Self "main" "NONE" SetImage


"EMITTER" CurrentCoords CreateUnit ->Emitter
<-Emitter 0 "productionInterval" <-ProductionInterval
<-Emitter 0 "productionAmt" <-ProductionAmt
<-Emitter 0 "startTime" <-StartTime
endonce

<-Emitter CONST_ISDESTROYED GetUnitAttribute if
"POWERZONE" CurrentCoords CreateUnit ->Zone
<-Zone 0 Destroy
endif
CW4 hype!!

Builder17

You are meaning like in PAC maps when player creates new emitter or spore tower?
What this script should do?

TLFP

Quote from: Builder17 on January 23, 2016, 02:20:48 AM
You are meaning like in PAC maps when player creates new emitter or spore tower?
What this script should do?
I want to create a rebuilding emitter that only rebuilds if there is digitalis under the PZ.
Currently ghosting, don't mind me.
Christian, my list of various content creation groups can be found here

Builder17

I am doing pretty similar unit into one of my own maps.

TLFP

Quote from: Builder17 on January 23, 2016, 08:21:17 AM
I am doing pretty similar unit into one of my own maps.
(insert amazement here) I figured someone would come up with the exact same idea. The way I'm trying to do it is there's a hidden script that checks to see if there is a PZ under it and if so, will then check for full health digitalis and then rebuild the emitter and destroy the PZ.
Currently ghosting, don't mind me.
Christian, my list of various content creation groups can be found here

Builder17

You need to change some unit attributes from core settings in editor , but I think you know how.
It's better you put these if there isn't very much cores with this script.

TLFP

Quote from: Builder17 on January 24, 2016, 03:08:28 AM
You need to change some unit attributes from core settings in editor , but I think you know how.
It's better you put these if there isn't very much cores with this script.
Thanks, it works! I'll credit you in my map and map list!
Currently ghosting, don't mind me.
Christian, my list of various content creation groups can be found here