Knuckle Cracker

Creeper World 3 => Custom Map Discussion => Topic started by: wolkiewicz on July 10, 2015, 07:13:29 AM

Title: The castle v2
Post by: wolkiewicz on July 10, 2015, 07:13:29 AM
I was really confused before posting this topic because Helper said me I can test my future maps here:
http://knucklecracker.com/forums/index.php?topic=18857.0
And Karsten says that i shouldn't do it.
http://knucklecracker.com/forums/index.php?topic=15716.0
Anyway Helper is MapMod so i decided to do it.

Here is the map that was previously uploaded by me on CS, and after player's feedback i decided to upgrade it. Here are the changes:
-Added some totems
-Removed 2 ore deposits from the north
-Added 1 ore deposit on starting location
-Catapults don't attack AC anymore
-Catapults still work after loading game.

I hope you will have fun! Tell me if I should upload it.
Title: Re: The castle v2
Post by: Asbestos on July 10, 2015, 08:16:04 AM
You are not supposed to upload UNFINISHED maps to COLONIAL SPACE. However, you can upload MOSTLY FINISHED, BUT STILL IN NEED OF TESTING maps to the FORUMS.
Title: Re: The castle v2
Post by: Grayzzur on July 10, 2015, 01:06:54 PM
What Asbestos said. I believe Karsten's post was brought on because Colonial Space didn't exist when the game was first released, so all maps had to be shared via the forums before then. Once Colonial Space was released, it took some effort to get people to use it.

Short version:

Finished maps -- colonial space
Works-in-progress you want feedback on -- forums
Title: Re: The castle v2
Post by: Karsten75 on July 10, 2015, 01:19:23 PM
Quote from: Grayzzur on July 10, 2015, 01:06:54 PM
Short version:

Finished maps -- colonial space
Works-in-progress you want feedback on -- forums
^^
This.

Quote from: wolkiewicz on July 10, 2015, 07:13:29 AM
Anyway Helper is MapMod so i decided to do it.

Right.

Quote from: wolkiewicz on July 10, 2015, 07:13:29 AM

And Karsten says that i shouldn't do it.
http://knucklecracker.com/forums/index.php?topic=15716.0


Here is the full text of what I said.
Quote from: Karsten75 on March 16, 2014, 07:15:56 PM
If you make a map you wish to share with others, please use the built-in feature of the game to upload the map to Colonial Space. If your map is a work-in-progress, then feel free to post it here for comments.

Thank you.
Title: Re: The castle v2
Post by: warren on July 11, 2015, 01:14:06 AM
If you want, I have just finished writing code that allows a core to be disabled on right click.


  <-active if
     ...
  endif

  GetMouseCell ->mY ->mX
  1 GetMouseButtonUp
      CurrentX <-mX sub abs 1 lte and #this one
      CurrentY <-mY sub abs 1 lte and  #and this one
      if
    <-active not ->active
    <-active if
      self RemoveImages
      self CONST_REQUESTPACKETS TRUE SetUnitAttribute
    else
      self "no" "Custom35_128" SetImage
      self "no" 255 0 0 255 SetImageColor
      self CONST_REQUESTPACKETS FALSE SetUnitAttribute
    endif
  endif 

:awake
Once
  TRUE ->active
Endonce


Change the 1 to a 2 for a 5x5 structure.
Title: Re: The castle v2
Post by: wolkiewicz on July 11, 2015, 04:41:52 AM
Thank you for the code! I am begginer in CRPL so I tried to learn somethink from this, but i can't understand this part:
if
    <-active not ->active
    <-active if

oh, and also:
  <-active if
     ...
  endif
Title: Re: The castle v2
Post by: wolkiewicz on July 11, 2015, 05:04:57 PM
It seems that your code doesn't work for me. It only adds an image to the unit, but it still recives packets. I delated this part of code because it caused a syntax error.
  <-active if
     ...
  endif


But when I added self CONST_CONNECTABLE FALSE SetUnitAttribute it worked fine. I don't know why it happens.

Edit: I'm just idiot. I need to change it to CONST_REQUESTACPACKETS. Nvm.
Title: Re: The castle v2
Post by: warren on July 11, 2015, 10:46:52 PM
the ... is just a placeholder. See ellipsis. <boolean> if ... endif is a guard expression. The stuff inside only happens if the boolean is true. (for example if you want to freeze an animation when inactive)

<-active not ->active means: if active is true then active is false, if active is false, then active is true.