How do I get CRPL in my maps?
I'm hitting the 'Scripts' button in the Unit section of the editor, but any script I put in there and hit'Create' doesn't seem to be doing anything. Hitting 'Compile' retruns 0 Scripts Successfully compiled into 0 opcodes.
I'm trying to do this script: if (<-fire)
@GetUnitTypeCount("REACTOR") ->reactorCount
#Do something based on reactorCount
endif
:GetUnitTypeCount
->unitType
0 ->count
do (GetUnitsInRange(0 0 9999) 0)
->unitUID
if (GetUnitType(<-unitUID) eq(<-unitType))
<-count add(1) ->count
endif
loop
<-count
Can anyone help me with getting any CRPL in my map?
Have you pushed "edit"?
Quote from: Clean0nion on October 30, 2013, 06:25:16 PM
How do I get CRPL in my maps?
I'm hitting the 'Scripts' button in the Unit section of the editor, but any script I put in there and hit'Create' doesn't seem to be doing anything. Hitting 'Compile' retruns 0 Scripts Successfully compiled into 0 opcodes.
I'm trying to do this script: if (<-fire)
@GetUnitTypeCount("REACTOR") ->reactorCount
#Do something based on reactorCount
endif
:GetUnitTypeCount
->unitType
0 ->count
do (GetUnitsInRange(0 0 9999) 0)
->unitUID
if (GetUnitType(<-unitUID) eq(<-unitType))
<-count add(1) ->count
endif
loop
<-count
Can anyone help me with getting any CRPL in my map?
ok,
click scripts button
name your script and click create,
a notepad or notepad++ window should open,
edit that txt with the script you want,
save it.
then click compile and you should be onto a winner 8)
Quote from: teknotiss on October 30, 2013, 06:33:08 PM
ok,
click scripts button
name your script and click create,
a notepad or notepad++ window should open,
edit that txt with the script you want,
save it.
then click compile and you should be onto a winner 8)
Wow thank you. I was pasting the code directly into the title bar. Thank you so much.
no worries dude! :)
Quote from: Clean0nion on October 30, 2013, 06:35:09 PM
Quote from: teknotiss on October 30, 2013, 06:33:08 PM
ok,
click scripts button
name your script and click create,
a notepad or notepad++ window should open,
edit that txt with the script you want,
save it.
then click compile and you should be onto a winner 8)
Wow thank you. I was pasting the code directly into the title bar. Thank you so much.
Does it work now? If so, I have wasted 3 hours pointless trying to re-code ya project, but no problem actually..
Quote from: Jacobkolstad on November 02, 2013, 04:30:33 PM
Quote from: Clean0nion on October 30, 2013, 06:35:09 PM
Quote from: teknotiss on October 30, 2013, 06:33:08 PM
ok,
click scripts button
name your script and click create,
a notepad or notepad++ window should open,
edit that txt with the script you want,
save it.
then click compile and you should be onto a winner 8)
Wow thank you. I was pasting the code directly into the title bar. Thank you so much.
Does it work now? If so, I have wasted 3 hours pointless trying to re-code ya project, but no problem actually..
No. Still doens't work.
Does the Notepad file need to be set in a particular folder location to work?
Quote from: pastor.healer on February 02, 2015, 10:12:48 PM
Does the Notepad file need to be set in a particular folder location to work?
Yes, it should save to the "scripts" folder within the Map directory structure. If you can't find it, it's probably best to open the script from within the editor and then paste the CPRL from another map into that file. Then save it and it will be saved in the correct location. (Hope that makes sense.)
That helps. Thanks!
Quote from: pastor.healer on February 02, 2015, 10:40:50 PM
That helps. Thanks!
I really hope it does, that's where you seemed to be stuck last night. :)
I'll sit in chat for a few minutes in case you want to ask a quick question.