The Dink Network

How can I change enemies' spawning speed?

March 15th 2011, 12:50 PM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
What are the simplest ways to change a regular enemy's spawning speed? Also, so it will never come back?
March 15th 2011, 01:03 PM
dinkdead.gif
editor_type(&sprite, &type);


1: kill completely
(2-5: other stuff)
6: respawn after 5 minutes
7: respawn after 3 minutes
8: respawn after 1 minute
March 15th 2011, 01:03 PM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
From the DinkC Reference:
  int &hold = sp_editor_num(&current_sprite);
  if (&hold != 0)
  {
     // this [sprite] was placed by the editor, let's make the barrel stay flat
     editor_type(&hold, 3); 
     editor_seq(&hold, 173);
     editor_frame(&hold, 6);
     // type means show this seq/frame combo as background in the future
  }


Editor_type can be set to the following:
0 - no change
1 - kill sprite completely
2 - draw pic from enclosed seq/frame data as a sprite WITHOUT hardness
3 - draw pic from enclosed seq/frame data as a BACKGROUND object WITHOUT
hardness (can be walked on [but not] behind)
4 - draw pic from enclosed seq/frame data as a sprite WITH hardness
5 - draw pic from enclosed seq/frame data as a BACKGROUND object WITH
hardness (can't walk [on or] behind)
6 - kill sprite, but let him come back after 5 minutes
7 - kill sprite, but let him come back after 3 minutes
8 - kill sprite, but let him come back after 1 minute

EDIT: Sparrow beat me!
March 15th 2011, 01:04 PM
dinkdead.gif
Well, you beat me with details
March 15th 2011, 01:06 PM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
But mine was a lame copy paste because I didn't know the data by heart
March 15th 2011, 02:05 PM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Thanks, d00ds.
March 24th 2011, 03:41 PM
goblinh.gif
firegoblin
Peasant He/Him
Destruction is a language everyone understands 
It wont work, i set it to kill sprite completely, but it appears once you leave the screen
March 24th 2011, 03:45 PM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Be sure you put &hold instead of &sprite or &current_sprite, cause I did that mistake at first.
March 24th 2011, 05:12 PM
goblinh.gif
firegoblin
Peasant He/Him
Destruction is a language everyone understands 
Here, let me see...
March 24th 2011, 05:15 PM
goblinh.gif
firegoblin
Peasant He/Him
Destruction is a language everyone understands 
nope, no luck
March 24th 2011, 07:23 PM
dinkdead.gif
Is the sprite placed in the editor? This won't work with a sprite created from a script, you'll have to do it some other way (for example, make a global variable change when it's killed and then just don't create it again afterwards).
March 25th 2011, 12:15 AM
goblinh.gif
firegoblin
Peasant He/Him
Destruction is a language everyone understands 
Yes, i am actually changing the script of the sprite from within the editor