Can't post my score on finalization

Started by MysteryCreeper, November 05, 2018, 07:08:13 PM

Previous topic - Next topic

MysteryCreeper

I cannot post my score on my finalized map with the crpl of sleeper and play as creeper. the map doesn't finish once the world was perished

cornucanis

It sounds like the victory conditions haven't been triggered yet. The victory conditions are that every artifact on the map must be collected and every enemy unit must be destroyed. The most likely case, given that you mentioned working with CRPL for the map, is that there is an invisible core somewhere which needs to be destroyed for victory. I believe PAC has a special trigger that will make you win the level due to the nature of PAC maps, and I'm not sure about sleeper as I've never made a sleeper map. Are you trying to make a map that combines both modes?

Also, it may be possible that you simply forgot to pickup a tech/shield/message artifact somewhere if you included those in your map.

MysteryCreeper

I am trying to combine both sleeper and play as creeper together, and once the message of when you destroy all units, it didn't finish the mission

MysteryCreeper

or maybe it is because it has sleeper nodes, or it has thor

cornucanis

Yeah, I'm pretty sure PAC only destroys PAC units so you'll have to make a custom CRPL implementation to kill all the sleeper units too (or set them to not count for victory.) If there are still sleeper units on the map, that's definitely your problem.

MysteryCreeper

Quote from: cornucanis on November 05, 2018, 07:30:05 PM
Yeah, I'm pretty sure PAC only destroys PAC units so you'll have to make a custom CRPL implementation to kill all the sleeper units too (or set them to not count for victory.) If there are still sleeper units on the map, that's definitely your problem.
I am pretty sure the sleeper node is the only one that when destroyed, gives victory, because if all the sleeper units had "self CONST_COUNTSFORVICTORY true" every time a sleeper unit was destroyed, it would make you win, so that wouldn't make sense

cornucanis

That's not how the attribute works. As long as there is still a single unit with the COUNTSFORVICTORY attribute left on the map you can't win. You win when there are none of these units left on the map, as well as no artifacts remaining.

MysteryCreeper

Quote from: cornucanis on November 05, 2018, 09:51:10 PM
That's not how the attribute works. As long as there is still a single unit with the COUNTSFORVICTORY attribute left on the map you can't win. You win when there are none of these units left on the map, as well as no artifacts remaining.
I do not have artifacts

Grabz

#8
Quote from: MysteryCreeper on November 05, 2018, 09:52:37 PM
Quote from: cornucanis on November 05, 2018, 09:51:10 PM
That's not how the attribute works. As long as there is still a single unit with the COUNTSFORVICTORY attribute left on the map you can't win. You win when there are none of these units left on the map, as well as no artifacts remaining.
I do not have artifacts
You misunderstand what he said.

If any unit in the level has COUNTSFORVICTORY set to TRUE, the game is not won. Only if you defeat the last unit that has this flag set to TRUE, you will win. Sleeper nodes have this flag, so that you have to defeat them all to win. An early iteration of Sleeper destroyed all units on the map with COUNTSFORVICTORY set to TRUE, which consequently also destroyed other Sleeper nodes, but it was changed.

If you beat your level, and you haven't won, that means there is still a unit with COUNTSFORVICTORY set to TRUE somewhere in the level, that the player normally would need to destroy.

This is also the reason why the Inhibitor destroys every enemy unit on the map upon destruction as well, because the Inhibitor runs code on death that goes over every unit, checks if it has COUNTSFORVICTORY set to TRUE, and destroys it if so, winning the level.

MysteryCreeper

Quote from: Grabz on November 09, 2018, 08:07:14 PM
Quote from: MysteryCreeper on November 05, 2018, 09:52:37 PM
Quote from: cornucanis on November 05, 2018, 09:51:10 PM
That's not how the attribute works. As long as there is still a single unit with the COUNTSFORVICTORY attribute left on the map you can't win. You win when there are none of these units left on the map, as well as no artifacts remaining.
I do not have artifacts
You misunderstand what he said.

If any unit in the level has COUNTSFORVICTORY set to TRUE, the game is not won. Only if you defeat the last unit that has this flag set to TRUE, you will win. Sleeper nodes have this flag, so that you have to defeat them all to win. An early iteration of Sleeper destroyed all units on the map with COUNTSFORVICTORY set to TRUE, which consequently also destroyed other Sleeper nodes, but it was changed.

If you beat your level, and you haven't won, that means there is still a unit with COUNTSFORVICTORY set to TRUE somewhere in the level, that the player normally would need to destroy.

This is also the reason why the Inhibitor destroys every enemy unit on the map upon destruction as well, because the Inhibitor runs code on death that goes over every unit, checks if it has COUNTSFORVICTORY set to TRUE, and destroys it if so, winning the level.
I know that all buildings with the COUNTSFORVICTORY set to true must be destroyed for the level to be beaten, after I found out what the problem was.