#374

Solved

A way to manipulate the shared counters

Reported by Divided By zer0 on OCTGN · 01/05/2011 17:37:56

Assigned to:
jods
Priority:
Normal
Status:
Solved
Category:
Game scripts
Version:
0.9.*
Issue type:
Feature

Given that variables set in python are local to each player, I’d like to use the shared counters as a workaround. For example, in the game I’m working on, the phases are global for all players, and during each phase the player alternate turns. So I want to have a counter called phases and a function which increases or decreases it. Then I can control various scripts by checking if the phase is appropriate for them.

I tried to access such a counter by polling shared.Phases but it didn’t work. I notice that in the game, when those counters are increased, they are mentioned as “Global’s counters” but I cannot use the “global” keyword in python as it’s reserved.

Any way to do this, or is this impossible at the moment?

Attachments

No attachment has been uploaded, yet.


Loading comments...