How can I make a piece mimics Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » How can I make a piece mimics « Previous Next »

Author Message
Yu Ren Don (Dandolo)
New member
Username: Dandolo

Post Number: 5
Registered: 7-2008
Posted on Wednesday, March 04, 2009 - 4:13 am:   

Hi, everyone. I am a newer of ZOG

Recently, I want to make a pieces called Jester.

The Jester :mimics the move of emeny's last moved piece.

How can I make a piece like it?

Any help would be appreciated. Thanks.
Greg Schmidt (Gschmidt2)
New member
Username: Gschmidt2

Post Number: 98
Registered: 1-2007
Posted on Wednesday, March 04, 2009 - 7:26 am:   

Every time you make a move, you need to store the corresponding move type in a variable. Then when the Jester moves, it examines the move type stored in the variable and bases its move on that.

But in Zillions, you don't have variables, so you will have to simulate what I described above by using a dummy position as the variable, and dummy pieces as the values (move types) stored in that variable.

-- Greg

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: