Custom Sleeper Units Template [UPDATED: February, 24]

Started by Nicant, December 01, 2015, 05:00:15 PM

Previous topic - Next topic

TLFP

#15
Quote from: J on January 11, 2016, 04:31:06 AM
Quote from: Builder17 on January 11, 2016, 03:05:11 AM
CONST_ISBUILDING eq FALSE SetUnitAttribute could work.
Quote from: J on January 05, 2016, 01:41:50 PM
eq is a comparison operator

If that doesn't work, try setting the CONST_AMMO unit attribute to the amount needed to build it.
Ok, let me try that....
EDIT: IT WORKED!!!! Except that it spawned in a damaged unit... so I don't know what I'm doing wrong.
Here's the updated code:currentcoords getcreeper ->creeperAmount
if(<-creeperAmount 0 gt)
"CRPLCore" CurrentX CurrentY CreateUnit ->unit
<-unit "CCannon.crpl" AddScriptToUnit
self 2 destroy
endif
#Problem is that it will spawn a cannnon but it will be a a low
#total health
if(<-creeperAmount 0 lt)
"PULSECANNON" CurrentX CurrentY CreateUnit ->unit
<-unit CONST_ISBUILDING FALSE SetUnitAttribute
self 2 destroy
endif
Currently ghosting, don't mind me.
Christian, my list of various content creation groups can be found here

TLFP

#16
It's FINALLY working!!!  8)
If you want to use this code, feel free to credit me.
currentcoords getcreeper ->creeperAmount
if(<-creeperAmount 0 gt)
"CRPLCore" CurrentX CurrentY CreateUnit ->unit
<-unit "CCannon.crpl" AddScriptToUnit
self 2 destroy
endif
#Change the PULSECANNON to whatever you want to build, same with the Sleeper Ccannon.crpl
if(<-creeperAmount 0 lt)
"PULSECANNON" CurrentX CurrentY CreateUnit ->unit
<-unit CONST_ISBUILDING FALSE SetUnitAttribute
<-unit CONST_HEALTH 50 SetUnitAttribute
<-unit CONST_AMMO 50 SetUnitAttribute
self 2 destroy
endif
Currently ghosting, don't mind me.
Christian, my list of various content creation groups can be found here

Nicant

CW4 hype!!

Nicant

I tried it, and i am trying to make it build all the way and nothing i try is working. I used the health unit constant and whatever health value i give it, it always says that it only has 1.5 health.
CW4 hype!!

TLFP

#19
Quote from: Nicant on January 11, 2016, 05:52:16 PM
I tried it, and i am trying to make it build all the way and nothing i try is working. I used the health unit constant and whatever health value i give it, it always says that it only has 1.5 health.
That's weird, it works when I do it.
EDIT: I would check to see if you are using the latest version of CW3, because it works for me and I checked the code.
If that doesn't work,  I can re-post the code and I'll do that anyway because I might have messed up stuff while copying and pasting it.
CurrentCoords GetCreeper ->creeperAmount
if(<-creeperAmount 0 gt)
"CRPLCore" CurrentX CurrentY CreateUnit ->unit
<-unit "CCannon.crpl" AddScriptToUnit
self 2 destroy
endif
if(<-creeperAmount 0 lt)
"PULSECANNON" CurrentX CurrentY CreateUnit ->unit
<-unit CONST_ISBUILDING FALSE SetUnitAttribute
<-unit CONST_HEALTH 50 SetUnitAttribute
<-unit CONST_AMMO 50 SetUnitAttribute
self 2 destroy
endif

I screenshotted it but I don't know how to paste it.
I'll just paste my save. The script you want is titled "deadunit.crpl"
Currently ghosting, don't mind me.
Christian, my list of various content creation groups can be found here

Nicant

Quote from: TheLongFellowPLAYER on January 11, 2016, 06:37:50 PM
Quote from: Nicant on January 11, 2016, 05:52:16 PM
I tried it, and i am trying to make it build all the way and nothing i try is working. I used the health unit constant and whatever health value i give it, it always says that it only has 1.5 health.
That's weird, it works when I do it.
EDIT: I would check to see if you are using the latest version of CW3, because it works for me and I checked the code.
If that doesn't work,  I can re-post the code and I'll do that anyway because I might have messed up stuff while copying and pasting it.
CurrentCoords GetCreeper ->creeperAmount
if(<-creeperAmount 0 gt)
"CRPLCore" CurrentX CurrentY CreateUnit ->unit
<-unit "CCannon.crpl" AddScriptToUnit
self 2 destroy
endif
if(<-creeperAmount 0 lt)
"PULSECANNON" CurrentX CurrentY CreateUnit ->unit
<-unit CONST_ISBUILDING FALSE SetUnitAttribute
<-unit CONST_HEALTH 50 SetUnitAttribute
<-unit CONST_AMMO 50 SetUnitAttribute
self 2 destroy
endif

I screenshotted it but I don't know how to paste it.
I'll just paste my save. The script you want is titled "deadunit.crpl"

Wait no, i did not see what you did to make it work when i posted that it did not work. But, i tried it now and it works fine! :D Want me to make a gray texture for it?
CW4 hype!!

TLFP

#21
Quote from: Nicant on January 11, 2016, 09:58:10 PM
Quote from: TheLongFellowPLAYER on January 11, 2016, 06:37:50 PM
Quote from: Nicant on January 11, 2016, 05:52:16 PM
I tried it, and i am trying to make it build all the way and nothing i try is working. I used the health unit constant and whatever health value i give it, it always says that it only has 1.5 health.
That's weird, it works when I do it.
EDIT: I would check to see if you are using the latest version of CW3, because it works for me and I checked the code.
If that doesn't work,  I can re-post the code and I'll do that anyway because I might have messed up stuff while copying and pasting it.
CurrentCoords GetCreeper ->creeperAmount
if(<-creeperAmount 0 gt)
"CRPLCore" CurrentX CurrentY CreateUnit ->unit
<-unit "CCannon.crpl" AddScriptToUnit
self 2 destroy
endif
if(<-creeperAmount 0 lt)
"PULSECANNON" CurrentX CurrentY CreateUnit ->unit
<-unit CONST_ISBUILDING FALSE SetUnitAttribute
<-unit CONST_HEALTH 50 SetUnitAttribute
<-unit CONST_AMMO 50 SetUnitAttribute
self 2 destroy
endif

I screenshotted it but I don't know how to paste it.
I'll just paste my save. The script you want is titled "deadunit.crpl"

Wait no, i did not see what you did to make it work when i posted that it did not work. But, i tried it now and it works fine! :D Want me to make a gray texture for it?
Yes, because I'm still setting up editing programs for textures. I used this in my latest map: http://knucklecracker.com/forums/index.php?topic=19949.msg139204;boardseen#new
EDIT: Ok, I just made them and I'm attaching them here at the bottom but they're JPG file textures, so I don't know if you have to convert it.
Currently ghosting, don't mind me.
Christian, my list of various content creation groups can be found here

GameGibu

Ugh jpgs much suck for this use. :P  >:(

png is the way to go, otherwise your units donot look clean.

-GameGibu
Bringing you Custom maps since 2971!
☆CRPL Master☆

TLFP

#23
Quote from: GameGibu on January 12, 2016, 10:05:05 AM
Ugh jpgs much suck for this use. :P  >:(

png is the way to go, otherwise your units donot look clean.

-GameGibu
Sorry, I had to convert them in order to edit them. :-\
If you want I can convert them back. They should stay the same.
EDIT: Even thought it says they're jpg they're not because I didn't rename them. If it's any comfort my editing software WILL NOT accept anything that's not JPG so I checked and they're PNG all right.  ;D
Edit2: I just realized that they are HUGE. I hope you can resize them without much trouble.
Currently ghosting, don't mind me.
Christian, my list of various content creation groups can be found here

Nicant

#24
Thanks! I am going to use these in my map! (I will also give you credit :) ) Edit: My next map will probably be the best map i have ever made. It will not just be any sleeper map.
CW4 hype!!

TLFP

#25
Quote from: Nicant on January 12, 2016, 03:21:44 PM
Thanks! I am going to use these in my map! (I will also give you credit :) ) Edit: My next map will probably be the best map i have ever made. It will not just be any sleeper map.
Thanks!  ;D ;D Hope it's a great map.  :D
Currently ghosting, don't mind me.
Christian, my list of various content creation groups can be found here

Nicant

Also played your sleeper security map and you forgot credits for the sleeper units. :P :P :P
CW4 hype!!

TLFP

#27
Quote from: Nicant on January 12, 2016, 03:55:27 PM
Also played your sleeper security map and you forgot credits for the sleeper units. :P :P :P
Oops, forgot. I'll add that in the original.  :D
EDIT: Credit added.  ;)
Currently ghosting, don't mind me.
Christian, my list of various content creation groups can be found here

Nicant

Added New Textures!
CW4 hype!!

Nicant

CW4 hype!!