[Bug Report] Colonial Map creation with some CRPL bug

Started by exostum, May 15, 2014, 02:50:49 PM

Previous topic - Next topic

exostum

So in my realisation of my second CRPL map i come across some bug.

First I used this script :

Quote
once
   do(MapHeight 0)
      do(MapWidth 0)
         if (GetTerrain(I J) gte(10))
            SetTerrainOverride(I J 2147)
         endif
      loop
   loop
endonce

In order to protect height 10 againt creeper but i have some problems.

If i change the map height via the map editor after setting a core with this script the script didn't update even with a full reboot of the map and erasing the save. I needed to restart a fresh new map.

Also if the terrain 10 is in form of square, it get overflowed

Next it is about my script about the dynamic_emmiters. Is it possible to set a crpl tower health higher than 1 ? if it possible, then this doesn't work for me (unless i am doing it wrong)
My Work in progress Maps (On hold for now)

exostum

here come a cw3 with the bug

Expected behaviour : Heigth 10 not overflown

My Work in progress Maps (On hold for now)

knucracker

"once" sections evaluate only once for a given core, per compile.  So if you want a "once" section to run again, just recomplile scripts.  Recompilation resets everything about scripts (things like 'once' counters, delay counters, etc.)

If you want to always set level 10 terrain with a terrain override per game load, then do the override loops inside a :GameLoaded function.

How are you attempting to set the health of a unit?  Something like this should do it.
SetUnitAttribute(<-UID CONST_MAXHEALTH <-amt)
SetUnitAttribute(<-UID CONST_HEALTH <-amt)

Note that there is a maxhealth you should raise, not just the current health value.

exostum

Ok, So instead of a bug report i made a stupitidy report.

Thanks for the reply virgilw.


(Maybe this information will be useful for newbie on CRPL scripting)

My Work in progress Maps (On hold for now)