Create account / Log in

All the dead in nice neat rows

Talk about module design ideas and techniques.

Moderators: Tim M, uckelman

All the dead in nice neat rows

Postby pgeerkens » January 13th, 2011, 7:32 pm

Here is a simple means of lining up counters sent to the graveyard, or other off-board zone. It just requires the creation, and assignment to all relevant units, of a prototype, and the creation of appropriate zones and a global variable in the offboard map. First the prototype:
Image
and its key components:
Image
The offset here places the counter initially from the zone center to the lower left corner.

Image

Image

The Dynamic Property Placed is initialized at 0 and set to 1 on arrival in the Graveyard to halt infinite recursion.
Set Global Property - Increment Arrived increments the variable Arrived (see below) by 1 with a wrap and limits of 0 to 8 (as my graveyard has 9 columns).

Every counter is assigned a value of the variable Side which will control the graveyard zone which it is to line up in, and the graveyard has zones named with each possible value of Side. Each graveyard Zone has the global variable Arrived defined and initialized to 0 with wrapping limits of 0 to 8. A dummy instance of Arrived is created at the module level to prevent an 'Invalid Variable' message on module load, and initialized to zero.

Finally, the Graveyard map is set to invoke the Watch For keystroke from above, CTRL ALT G in my case, for all units arriving on the map.

The result of sending several units to the Graveyard then looks like this:
Image
Pieter
-----------------------------------------
"Even on the attack, I found the spade [to be] the equal of the rifle."
Erwin Rommel, Infantry Attacks
User avatar
pgeerkens
 
Posts: 228
Joined: September 12th, 2010, 4:33 am
Location: Hamilton, Ontario, Canada

Re: All the dead in nice neat rows

Postby iam2509 » January 16th, 2011, 10:23 pm

Incredible! Thanks a lot.

This would make it so much simpler than what I have done before and entered EACH coordinate individually for every unit. Especially tedious as the number of units increases in a particular game.

Haven't tried it out but looking forward to implementing it in my next game.

Stephen
User avatar
iam2509
 
Posts: 71
Joined: August 1st, 2010, 12:01 am

Re: All the dead in nice neat rows

Postby pgeerkens » January 16th, 2011, 10:37 pm

One more note - the counters are actually stacking on the bottom row as I have implemented it here, since $Arrived$ is counting modulo 9. If you want the counters to actually land on distinct hexes, a second counter stepping up at the value of:
hex-height / #-of-rows
with a suitable stargint offset will achieve that effect.
Pieter
-----------------------------------------
"Even on the attack, I found the spade [to be] the equal of the rifle."
Erwin Rommel, Infantry Attacks
User avatar
pgeerkens
 
Posts: 228
Joined: September 12th, 2010, 4:33 am
Location: Hamilton, Ontario, Canada

Re: All the dead in nice neat rows

Postby tozesantos » December 28th, 2018, 6:50 pm

I would like to implement this function in a module, but unluckly looks like the images on the example are no more available.
Could someone send me the pictures ou give me more details about how to implement it, please?
---
Toze Santos
Braga - Portugal
tozesantos
 
Posts: 10
Joined: April 18th, 2008, 12:09 pm
Location: Braga - Portugal


Return to Module Design

Who is online

Users browsing this forum: No registered users and 4 guests