HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Timer, Pause/Unpause & Player turns?!?

07-30-2002, 10:51 PM#1
Guest
Hey folks
Ok Im working on something that requires me to add player turns. So when PL1 is moving PL2's units are paused also theres a timer so that a timer starts player 1 can move around until he either types a chat message "done"or the timer expires then PL1 units get paused and it's PL2 turn then he can move about freely untily he does the same.
Heres how I have it setup

Triggers
--Turn Phases--
-Setup Turn Timer-
PL1 types chat message "start"

-Condition-

-Action-
Countdown timer- Destroy last created timer window
Countdown timer- Start PL1 timer as Oneshot that wil expire in 180sec
Countdown timer- Create timer window for PL1timer
Set PL1 timer= last created timer
Countdown timer- Show PL1timer window

-PL1 Time Up-
Event- PL1Timer expires

-Condition-

-Action-
Countdown timer- Destroy last created timer window
Countdown timer- Start PL2 timer as Oneshot that wil expire in 180sec
Countdown timer- Create timer window for PL2timer
Set PL2 timer= last created timer
Countdown timer- Show PL2timer window
Unit group- pick every unit in (units in Board <gen> owned by Player 1 (red)) and do (unit-pause all units)
Unit group- pick every unit in (units in Board <gen> owned by Player 2 (blue)) and do (unit-unpause all units)

-PL1 Time Up-
Event- PL2Timer expires

-Condition-

-Action-
Countdown timer- Destroy last created timer window
Countdown timer- Start PL1 timer as Oneshot that wil expire in 180sec
Countdown timer- Create timer window for PL1timer
Set PL2 timer= last created timer
Countdown timer- Show PL1timer window
Unit group- pick every unit in (units in Board <gen> owned by Player 2 (blue)) and do (unit-pause all units)
Unit group- pick every unit in (units in Board <gen> owned by Player 1 (red)) and do (unit-unpause all units)

-----------------------------------------------------------------------------------------
The way I see this is that when PL1 time expires all the PLayer 1 units get paued and the Player 2 units get unpaused. Essentially this should be creating player turns...Obviousley I am missing something caue this doesn't work. The best I have done is get it so that when pl2timer starts player one gets paused then when PL1 timer starts up again PL1 units are un paused. But as soon as I add the crossing pause/unpause things it stops working.

Please help me anyone this is very crutial to my map.
Thankz

OOPS Sorry I posted this in the Main Map discusion area too...
07-30-2002, 11:03 PM#2
Guest
Quote:
Countdown timer- Create timer window for PL2timer
Set PL2 timer= last created timer
Countdown timer- Show PL2timer window

Change "Set PL2 timer= last created timer" to "Set PL2timer window = last created timer window". The timer variables are set when the timer is started, the timer windows are not. "Show pl2timer window" will not do anything because you have not set that variable otherwise.

Quote:
Unit group- pick every unit in (units in Board <gen> owned by Player 1 (red)) and do (unit-pause all units)
Unit group- pick every unit in (units in Board <gen> owned by Player 2 (blue)) and do (unit-unpause all units)

Even though you are picking units first, you are still giving the order to "all units" not to the picked units. So you're pausing them and then right away unpausing them (when you tried it with 1 player it would have worked because you only had the 1 action).

You need to change it to "Unit - Pause/Unpause" and change the variable there to "Picked unit". Then it will do the action you want.
07-30-2002, 11:31 PM#3
Guest
Hey thankz a ton!!!!

I think the pause/unpause works fine, but I have to actually test it in a 2 player game

As far as the timer goes..well the timer works fine after P1 timer expires P2 timer starts and so on and so forth.

My map is actually just a battle chess game for 2 players I needed these triggers so that I could have player turns. the map is nearly done if you or anyone you know likes to play chess or would like to help me perfect it, let me know or just look for me on Bnet

Once again Thank You