Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: LappySheep on August 12, 2017, 12:00:31 PM

Title: Custom "fight"
Post by: LappySheep on August 12, 2017, 12:00:31 PM
I'm not experienced with CRPL (like at all) but I'd like to ask whether there's a way I can make a custom fight using any of these ideas:
--> Nullifier damage, but it isn't an "instant kill" (like nullifying an emitter will completely destroy it; is there a way for it to deal a set amount of damage to a target)
--> Custom health bar - having for example 10,000 HP
--> Calling other scripts? (like having unit A calling unit B like a "summoning")

...and is there a way I can use shield keys? I'm not quite sure on how to use them, or what the randomly generated string is in the map editor.
Title: Re: Custom "fight"
Post by: Builder17 on August 12, 2017, 02:44:56 PM
Nullifier damage: Self CONST_NULLIFIERDAMAGEAMT Positivenumber SetUnitAttribute

Custom health bar: Self CONST_MAXHEALTH 10000 SetUnitAttribute
I am not sure does that work.

Calling other scripts: http://knucklecracker.com/wiki/doku.php?id=crpl:docs:createunit and
http://knucklecracker.com/wiki/doku.php?id=crpl:docs:addscripttounit

Shield keys: http://knucklecracker.com/wiki/doku.php?id=crpl:docs:artifactcollected but it's not so super useful IMHO :)
Not recommended to use it to forcing map order.
Title: Re: Custom "fight"
Post by: LappySheep on August 12, 2017, 04:09:00 PM
Thanks. Is there a reason why I shouldn't use it to force a map order?

Edit: And if I can use them, is there a way to have several keys as a requirement?
Title: Re: Custom "fight"
Post by: GoodMorning on August 12, 2017, 07:02:31 PM
That part is CRPL, so you can have complex requirements. However, giving bonuses when another map has been completed is the accepted use. Locking maps is doable only by insta-failing the mission. A warning "This map is intended to be played after completing X, Y, and Z." is also appropriate.
Title: Re: Custom "fight"
Post by: LappySheep on August 13, 2017, 06:23:40 AM
Alright, thanks.