EffectGroup activation if fleet moved?

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

Moderators: Oberlus, Committer

Post Reply
Message
Author
banduri
Space Floater
Posts: 47
Joined: Tue Dec 15, 2015 6:20 pm
Location: Solaria

EffectGroup activation if fleet moved?

#1 Post by banduri »

Hi All

How do I activate effects if a fleet moved between two systems? The jumpdistance between the two systems is one.

Code: Select all

activation = Not Stationary
seems not to work for me since the UU-distance between the two systems is lower then the speed of the ship. I assume the same holds true for

Code: Select all

activation = Not InSystem id = Source.PreviousSystemID
. Did I miss something?
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project (this includes pullrequest of the useraccount banduri at github)

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

Re: EffectGroup activation if fleet moved?

#2 Post by Geoff the Medio »

I don't think there's anything suitable exposed. The game does track whether a particular fleet arrived in its system on the current turn, but I don't think there's a way to test for that in FOCS.

Wouldn't be too difficult to add, though... I'd probably change it to track the number of the turn a fleet has arrived, and expose that, and rework the Fleet::ArrivedThisTurn() function accordingly... Or maybe do the same for ships, so an effect could be made to depend on how long a ship has been at a particular location (which doesn't make sense to do through fleets since ships can be moved between fleets)

banduri
Space Floater
Posts: 47
Joined: Tue Dec 15, 2015 6:20 pm
Location: Solaria

Re: EffectGroup activation if fleet moved?

#3 Post by banduri »

Geoff the Medio wrote:Or maybe do the same for ships, so an effect could be made to depend on how long a ship has been at a particular location
This would be nice :o)
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project (this includes pullrequest of the useraccount banduri at github)

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: EffectGroup activation if fleet moved?

#4 Post by MatGB »

Agreed, I've always been confused by the stationary script as it doesn't do what I expected, and I really want to have some of the damage control effects only work if the ship has stayed still for at least a turn.
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Post Reply