GameInit Actionscript

Table of contents | Previous document | Download GameInit.as | SWF!T Homepage

RCSfile: GameInit.as,v  Revision: 1.10  Date: 2003/03/20 11:26:40  

Copyright 2003 Orgdot AS. All Rights Reserved. http://dev.swfit.com
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


Init script for the main DNAFactory game counter.
author      Olaf Havnes
version     Revision: 1.10  Date: 2003/03/20 11:26:40  
since       SWFIT1.0



We operate with two registers - one for the pieces above, and one for the pieces on the conveyor belt.


Upper register

conv_name = "";
drag_name = "";
wait_name = "";
dpst_name = "";

Lower register

num_conv = 9;
i = 0;
while (i < num_conv + 1)
{
   set ("conv_" add i, "");
   i++;
}

Common speed value for conveyor belt (shrink over time?)

conv_wait = _parent.conv_wait;
conv_start_x = 216;
conv_start_y = 176;

Measure these better

free_fall = 80;
merge_fall = 136;
water_fall = 204;

The extra visible clips

wait_x = acgt._x;
wait_y = acgt._y;
dpst_x = 235;
dpst_y = wait_y;

Common delay value for all clips

delay = 5;

Initiate values.

acgt_num = 0;


Pause between drops

drop_pause = 24;
drop_pause_counter = drop_pause;

Result flags

drown_size = 40;

NB! must shrink with the conv_wait variable!

life_size = conv_wait - 50;

drown = 0;
dead = 0;
life = 0;

nuggets = 0;