I have already made 2 PAC maps successfully and published them and I have been working on this new one for the last 3 days. I went through the same procedure before as the last 2 and for some reason, this map will not go to victory condition.
I have scoured the forums to find a solution and tried everything but to no avail :(
So this is what I do
- Back-up file
- Come out of edit mode and save the game to a slot
- click the text at the top and return to edit mode and finalise
- Then come out of the game and go load & play the game in the Finalized worlds to completion but alas, no victory condition. The final dialogue box comes up though
This is very frustrating and I would appreciate your help very much as I have put so much work into this map and want to get it out there.
Any ideas or suggestions please?
Regards
Xeos
This is the Map- I can still play it but it will not go to victory - It is pretty hard if you are not a seasoned PAC map player so I was really excited to get it out there :(
It's probably because of the runner nest at the bottom. For the game to trigger victory, all units with "CONST_COUNTSFORVICTORY" attribute must be destroyed. Can't remember if you can turn that off for runner nests. Try selecting it in edit mode and see if there is an option to turn it off.
PAC maps have a core called Abraxis and it is normally the only unit that has CONST_COUNTSFORVICTORY set to true. When the game detects all Abraxis units have been destroyed it displays the victory text, then destroys itself, thus making it so no units with CONST_COUNTSFORVICTORY are alive. Your runner nest is more likely preventing the final victory game trigger.
If you can't turn off the runner nest victory condition and you still want to have runners, you'll probably need to create a crpl one. Check the forums - someone may have already made one. If not, you'll want to use some of these commands:
CreateRunner (http://knucklecracker.com/wiki/doku.php?id=crpl:docs:createrunner)
GetRunnerCount (http://knucklecracker.com/wiki/doku.php?id=crpl:docs:getrunnercount)
SetUnitAttribute (http://knucklecracker.com/wiki/doku.php?id=crpl:docs:setunitattribute)
GetDigitalis (http://knucklecracker.com/wiki/doku.php?id=crpl:docs:getdigitalis) (If you want it to only work when connected to the network)
OK Hubs - thanks for coming back to me so quickly - i deleted the runner and then it worked properly - so I need to work out how to change the scripts to allow that to stay in ( I am a complete noob but I will trawl the forums) - I will try and work it out from your info above :)
Thanks again.
I've been looking for a while now and can't find anything that will slot in - I don't have the skills to write my own script so I will have to abandon the idea for now and not publish the map :(
The maps looks too good to abandon, so I wrote this:
$name: "RunnerNest"
$spawninterval: 60 # number of frames between spawns
$maxrunners: 20 # max number of runners spawned at a time by this core
$runnermovespeed: 2
$runnerhealth: 10
$runnerpayload: 100
# spawn timer must be 0, must have digitalis, and must not be at runner max
if(eq0(GetTimer1) gte(GetDigitalis(CurrentX CurrentY) 0.5) lt(GetRunnerCount <-maxrunners) and and)
CreateRunner(CurrentX CurrentY <-runnermovespeed <-runnerhealth <-runnerpayload)
SetTimer1(<-spawninterval)
endif
:awake
SetUnitAttribute(self CONST_COUNTSFORVICTORY TRUE)
SetUnitAttribute(self CONST_CREATEPZ TRUE)
SetUnitAttribute(self CONST_NULLIFIERDAMAGES TRUE)
SetUnitAttribute(self CONST_TAKEMAPSPACE TRUE)
SetUnitAttribute(self CONST_SUPPORTSDIGITALIS FALSE)
Create a new script file and copy that in. Then create a core and add the script to it and set the image to the runner nest. I think it's one of the built in options, but if not you can get the image here (http://knucklecracker.com/wiki/doku.php?id=cw3:units:enemy).
I haven't tested the code, so I can't gauruntee it will work. The top section contains all the variables that you can tweak to get the runners the way you want them. For max runners, I wouldn't go over 100 because it will probably bog down the map alot.
Quote from: Xeos on January 09, 2015, 10:18:17 AM
I have used a runner in my new map (THE DEVIOUS ARACHNID) as a logic gate - it isn't modified in anyway - it is how you play it normally in a conventional map and it i can see it being quite useful in a few ways if used as I have here.
How are you using it as a logic gate?
Oh Wow that is amazing you did that ;D Let me try and get it working now and if I can , then I will post it up .
The way I think about maps is to think in a sequential way. I want the player to plot a path around the map so I need to force them to have to do something in a particular order to achieve the desired result and progress. So I look to use features of the game to help me do that. I did that with the runner. Without giving to much away, you will see when you play it :)
So excited .. and thanks again so much yay :)
Cheers
Ian
I did that and on the compile it said :-
RunnerNest.crpl: Line: 1: An input var must have some default value: $name:
Ok fixed it - it was to do with the way it was formatted with the space between the colon: and the number :) Ok , going to try it now :)
Ok - I put it on the map and it produced runners but it still didn't go to victory :(
Anything else I can try please?
Thanks
It works as it should in the game but it still will not go to the victory condition :( I set the counts for victory to off as well and it didn't make any difference :(
Oops, change this line to false:
SetUnitAttribute(self CONST_COUNTSFORVICTORY TRUE)
That should do the trick. Was the runner nest a default image?
It works :) Hubs I am so grateful for your help :) I can't thank you enough as I spent 3 full days and nights designing, building and testing this map. I hope peeps like it although it is on the hard side :)
Thanks again
I'm looking forward to playing this map.
Glad I could help :) Can't wait to play it!
Its up and its hard .. I think :) Hope you like it ;D
A PAC map with Runner Nests instead of Spore Towers modified to spawn runners?
Someone has been making comparative leaps and bounds in this direction.
I think I can add a line to prevent normal enemy units interfering with victory... I'll include that in the next template update. Sorry it wasn't in time for your map... Hubs was just too fast ;)
How would you do that other than destroying them at the end? I have a sweet AET idea if you can make that work cleanly.
Quote from: Hubs on January 09, 2015, 08:56:50 PM
How would you do that other than destroying them at the end? I have a sweet AET idea if you can make that work cleanly.
I was just planning to destroy them. I don't think people will be bothered by it after they win. If the appearance of the map at the end is considered important, I could add some dummy cores with the same image.
Personally I wouldn't like them being destroyed, but I'm picky. The custom runner nest was pretty easy to make. Only thing I would want to add is an AET. How hard would that be to make? Is there a command for the anti air zone?
I couldn't see any air exclusion CRPL commands on the wiki. If destroyed silently with an image over the top, I doubt anyone would even notice.