questiong about geting SetPlanetType to work

Creation, discussion, and balancing of game content such as techs, buildings, ship parts.

Moderators: Oberlus, Committer

Post Reply
Message
Author
omagaalpha
Space Krill
Posts: 2
Joined: Wed Jun 30, 2010 2:57 pm

questiong about geting SetPlanetType to work

#1 Post by omagaalpha »

Code: Select all

BuildingType
    name = "BLD_TERRAFORM"
    description = "BLD_TERRAFORM_DESC"
    buildcost = 1
    buildtime = 1
    maintenancecost = 0
    location =  OwnedBy TheEmpire Source.Owner
    effectsgroups = [	
        EffectsGroup
            scope = Source
            activation = Source
            effects = SetPlanetType type = Barren

    ]
    graphic = ""
When I was trying this building using "FreeOrion 3.14 rev 3621" on starting planet that the game begins with it as though the building does not work for planet seems planet is still the same type.

What am I doing wrong here?

p.s. I using win 7 64-bit and I hope it is the right section to post it in.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: questiong about geting SetPlanetType to work

#2 Post by Geoff the Medio »

omagaalpha wrote:

Code: Select all

scope = Source
This effect acts on the source object, which is the building. If you want to modify a planet that the buidling is on, you should do

Code: Select all

scope = Contains Source

omagaalpha
Space Krill
Posts: 2
Joined: Wed Jun 30, 2010 2:57 pm

Re: questiong about geting SetPlanetType to work

#3 Post by omagaalpha »

Thanks you very much it work like a charm.

Post Reply