Knuckle Cracker

Particle Fleet => Map Makers, Ship Builders, and Coders => Topic started by: Xalos on October 01, 2016, 01:17:48 PM

Title: [PRPL]: Get and set global energy, check if Ship X is built
Post by: Xalos on October 01, 2016, 01:17:48 PM
I'm designing a map, and I was wondering how to get and set the global energy and see if a certain ship has been destroyed (to cause mission failure).

Normally, I would look at the wiki, but it's not organized yet, and I can't seem to find anything relevant in the alphabetical command list (http://knucklecracker.com/wiki/doku.php?id=prpl:alphabetic_list_of_commands).

How would I modify the global energy and get a specific ship through PRPL commands?
Title: Re: [PRPL]: Get and set global energy, check if Ship X is built
Post by: GoodMorning on October 01, 2016, 06:39:44 PM
GetGlobalStoredEnergy
<-Value SetGlobalStoredEnergy

<-Ship GetShipIsDestroyed


Yes, the wiki is not done yet. There are plans to restructure it when the post-release storm has died down a little. We are not doing much work on it until then, because it will likely need to be redone after the restructure.

Until then, ask here, or read Virgil and planetfall's scripts.
Title: Re: [PRPL]: Get and set global energy, check if Ship X is built
Post by: Xalos on October 02, 2016, 05:05:02 AM
Quote from: GoodMorning on October 01, 2016, 06:39:44 PM... or read Virgil and planetfall's scripts.

That was my second go-to as well, but I couldn't seem to find the Story or Inception maps anywhere in the game directories.  Strange...
Title: Re: [PRPL]: Get and set global energy, check if Ship X is built
Post by: GoodMorning on October 02, 2016, 05:20:21 AM
Unlike CW3, they don't exist in easily accessible form for PF.
The workaround is to save and inspect that.

Exchange can also be helpful.