CommitLog |
This commit is contained in:
parent
c964df8a67
commit
d0a28aa811
4 changed files with 148 additions and 9 deletions
|
@ -7,7 +7,133 @@
|
|||
<persistent>0</persistent>
|
||||
<parentName><undefined></parentName>
|
||||
<maskName><undefined></maskName>
|
||||
<events/>
|
||||
<events>
|
||||
<event eventtype="0" enumb="0">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>/// GENERATE CHUNK
|
||||
var total_size = CHUNK_SIZE*TILE_SIZE;
|
||||
|
||||
instance_list = array_create(total_size);
|
||||
cur_inst = 0;
|
||||
loaded = true;
|
||||
|
||||
// GENERATION
|
||||
for(var xx = 0; xx < CHUNK_SIZE*TILE_SIZE; xx+= TILE_SIZE)
|
||||
{
|
||||
for(var yy = 0; yy < CHUNK_SIZE*TILE_SIZE; yy+= TILE_SIZE)
|
||||
{
|
||||
if(random_range(0,100) > 50)
|
||||
{
|
||||
instance_list[cur_inst] = instance_create(x+xx,y+yy, obj_asteriod);
|
||||
cur_inst ++;
|
||||
}
|
||||
}
|
||||
}
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="3" enumb="0">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>var chunk_total_size = CHUNK_SIZE * TILE_SIZE
|
||||
|
||||
|
||||
if(distance_to_object(obj_player) > chunk_total_size+(TILE_SIZE*5))
|
||||
{
|
||||
event_user(0);
|
||||
}
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="7" enumb="11">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>for(var i = 0; i < cur_inst; i++)
|
||||
{
|
||||
instance_activate_object(instance_list[i]);
|
||||
}
|
||||
loaded = true;
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
<event eventtype="7" enumb="10">
|
||||
<action>
|
||||
<libid>1</libid>
|
||||
<id>603</id>
|
||||
<kind>7</kind>
|
||||
<userelative>0</userelative>
|
||||
<isquestion>0</isquestion>
|
||||
<useapplyto>-1</useapplyto>
|
||||
<exetype>2</exetype>
|
||||
<functionname></functionname>
|
||||
<codestring></codestring>
|
||||
<whoName>self</whoName>
|
||||
<relative>0</relative>
|
||||
<isnot>0</isnot>
|
||||
<arguments>
|
||||
<argument>
|
||||
<kind>1</kind>
|
||||
<string>for(var i = 0; i < cur_inst; i++)
|
||||
{
|
||||
instance_deactivate_object(instance_list[i]);
|
||||
}
|
||||
loaded = false;
|
||||
instance_deactivate_object(id);
|
||||
</string>
|
||||
</argument>
|
||||
</arguments>
|
||||
</action>
|
||||
</event>
|
||||
</events>
|
||||
<PhysicsObject>0</PhysicsObject>
|
||||
<PhysicsObjectSensor>0</PhysicsObjectSensor>
|
||||
<PhysicsObjectShape>0</PhysicsObjectShape>
|
||||
|
|
Reference in a new issue