Help with Overriding

Plug-in related stuff can be discussed here.

Moderator: Plugin Moderators

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Help with Overriding

#1

Post by KINGTUT10101 »

Code: Select all

[
   {
      "frames": [
         {
            "steal": "$radio00"
         }
      ],
      "fun": [
         {
            "actions": [
               {
                  "id": "newradio.kt101",
                  "type": "notify",
                  "z": 1
               }
            ],
            "condition": {
               "id": "$radio00",
               "invert": false,
               "max": 1,
               "min": 1,
               "type": "building count"
            },
            "p": 1
         }
      ],
      "height": 3,
      "id": "$radio00",
      "override": true,
      "text": "A radio station to keep you and your habitants informed.  Stay tuned for more.",
      "title": "Radio Station",
      "type": "public",
      "width": 3
   },
   {
      "frames": [
         {
            "bmp": "radionotif.png"
         }
      ],
      "id": "newradio.kt101",
      "once": true,
      "text": "Mayor builds a new radio station, habitants are crazy for it.",
      "type": "notification"
   }
]
It won't override the radio station.

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Help with Overriding

#2

Post by KINGTUT10101 »


User avatar
CommanderABab
AB
Reactions:
Posts: 11086
Joined: 07 Jun 2016, 21:12
Plugins: Showcase Store
Version: Beta

Plugin Creator

Platform

Re: Help with Overriding

#3

Post by CommanderABab »

KINGTUT10101 wrote:
22 Oct 2017, 05:30

Code: Select all

[
   {
      "frames": [
         {
            "steal": "$radio00"
         }
      ],
      "fun": [
         {
            "actions": [
               {
                  "id": "newradio.kt101",
                  "type": "notify",
                  "z": 1
               }
            ],
            "condition": {
               "id": "$radio00",
               "invert": false,  //**
               "max": 1,
               "min": 1,
               "type": "building count"
            },
            "p": 1
         }
      ],
      "height": 3,
      "id": "$radio00",
      "override": true,
      "text": "A radio station to keep you and your habitants informed.  Stay tuned for more.",
      "title": "Radio Station",
      "type": "public",
      "width": 3
   },
   {
      "frames": [
         {
            "bmp": "radionotif.png"
         }
      ],
      "id": "newradio.kt101",
      "once": true,
      "text": "Mayor builds a new radio station, habitants are crazy for it.",
      "type": "notification"
   }
]
It won't override the radio station.
//**
this line makes the condition false if you have one "id": "$radio00" built, overidden or not. Thus the action is not performed.

User avatar
KINGTUT10101
1,000,000 inhabitants
Reactions:
Posts: 2220
Joined: 07 Jul 2016, 22:50
Location: 'Merica
Plugins: Showcase Store
Version: Beta
Contact:

Plugin Creator

Platform

Re: Help with Overriding

#4

Post by KINGTUT10101 »

That wasn't my problem. It won't replace the actual radio in-game.

Post Reply Previous topicNext topic

Return to “Plug-In Discussion”