Main Page
News
History
Limitations
Graphics
Music
Levels
Gameplay
Now Browsing
Links
Download

Group
Group binds a group of sprites to a certain common event once they've been shot down. The main usage of this flag is dropping a pickup, a coin or whatever else, as reward for shooting a string of Baddies. This can then be used to spawn a Death Path once the whole group is dead.

Example: present from dead enemies.

Let’s say we want a set of 5 sprites to drop a coin if we manage to shoot them all; that would look something like this:

StartPathData:
        Wait       16        ; Make sure there's some level on screen
        ResetGroup        0
        PFor      5
                     Start         DemoPath1, Baddie1, 330+40, 70, Group|KillClip
        PNext

InfLoop:
        Pause 255
        Goto InfLoop

Now the path we use for this doesn’t matter, so we’ll just use a really simple one:

DemoPath1:
                            PFor 300
                                   Move -2, 0
                           PNext

The “trick” is now to setup the sprites “info” structure correctly, when defining all the flags into Alien structure:

  BaddieName                   db 0                           ; Flags
                                          db TYPE_ALIEN        ; Type
                                          dw Baddie1Anim      ; Animation
                                          db 4,4                        ; center offset/2
                                          db 4,4                        ; radius/2
                                          db 2                           ; Hits
                                          db $00,$10                ; Points
                                          dw FallingPath          ; Death Path
                                          dw BigCoinBaddie    ; Death Struct

Death Path and Death Struct only activate when the whole group of Baddies has been defeated, otherwise it will just used the BoomPath.

See also:
Start

Main Table