User Tag List

Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 42

Thread: ghost.zh - A header file for ghosted enemy scripts

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,435
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.42%
    They should all still work. I do plan to update them soon anyway, though.

  2. #2
    Friends Furever XMuppetSB's Avatar
    Join Date
    Dec 2005
    Location
    San Antonio, Texas
    Age
    34
    Posts
    1,932
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    6,331
    Level
    24
    vBActivity - Bars
    Lv. Percent
    53.02%
    Thing is, though, some of them have the old ghost_explode variable, which has been replaced with ghost_deathanimation.

  3. #3
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,435
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.42%
    It hasn't been removed, it's just deprecated.

    Edit: Sorry. Left a bug in one of the FindSpawnPoint functions. Fixed now.
    Last edited by Saffith; 12-10-2012 at 02:16 AM.

  4. #4
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,435
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.42%
    Another small update, requiring 2.50. I added another way to set up AutoGhost enemies. Set misc. attribute 12 to -1 and put the script name in the enemy's name after @, for instance:
    Goriya (LttP, green) @Goriya_LttP

    Also, I added constants to control flashing and knockback, so now you can fling enemies clear across the screen if you like.

  5. #5
    Floormaster Imzogelmo's Avatar
    Join Date
    Sep 2005
    Location
    Earth, currently
    Age
    45
    Posts
    387
    Mentioned
    7 Post(s)
    Tagged
    3 Thread(s)
    vBActivity - Stats
    Points
    1,463
    Level
    12
    vBActivity - Bars
    Lv. Percent
    95.18%
    Oh wow, I see you've been busy. I haven't played with ghost.zh in a while (ever since the Spark.h and HomingFireballShooter.h scripts), but I want to get back into it and see what I can make happen... I still have an enemy that moves in an epicycloid that got left on the cutting room floor, so I need to work out its kinks to get it ready for prime time.

  6. #6
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,435
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.42%
    Speaking of which, I never did update the scripts I've got linked... But I was thinking I should just post them here instead, anyway. I'll probably do that this weekend.

    Anyway, another small update because I messed up flickering. :p
    Last edited by Saffith; 12-21-2012 at 10:53 PM.

  7. #7
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,435
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.42%
    Another update. This will invalidate existing saved games. (Generally the case, but I thought I'd start mentioning it.)
    There's a particularly high chance of new bugs this time, so be ready for that.

    • It's finally possible to read and change ghosted enemies' properties from other scripts using the functions GetEnemyProperty() and SetEnemyProperty().
    • SetEWeaponMovement() now takes another argument. Some similar weapon movement types have been merged with the differing functionality now controlled by the second argument.
    • The movement functions have been rewritten to be more accurate and faster.
    • The FireEWeapon functions can now take -1 for the sprite and sound arguments to use defaults for the weapon type.
    • 2x2 shadows are now used for enemies 3x3 and larger. (Only applies if GH_FAKE_Z or GHF_FAKE_Z is used)
    • Added GHF_STATIC_SHADOW for enemies whose shadows should never animate. (Only applies if GH_FAKE_Z or GHF_FAKE_Z is used)
    Last edited by Saffith; 03-01-2013 at 02:45 PM.

  8. #8
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,435
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.42%
    Hey, I'm actually updating it. How about that.

    The biggest change this time is the __GH_ALWAYS_USE_NAME setting. If it's enabled, AutoGhost() will always read an enemy's name to get the script and combo number. Misc. attributes 11 and 12 will be free for other scripts to use.
    The script and combo number both go after @ in the name. Order and spacing aren't important, and other characters are allowed afterward. Either of these will work:
    Goriya (LttP, Green) [@Goriya_LttP, @25804]
    Goriya (LttP, Green) @25804@Goriya_LttP
    You have to provide the script name, but if you don't specify a combo, it'll default to GH_INVISIBLE_COMBO. This will work fine:
    Armos @Armos_LttP

    The downside to this is that enemy scripts can no longer assume misc. attribute 11 specifies the base combo. I don't think that was a common thing to do, anyway.

    Other notable changes:
    The files in the ghost_zh directory have been moved to a numbered subdirectory. This will allow multiple versions to coexist.
    Ghost_TileWidth and Ghost_TileHeight should now be considered read-only. Ghost_SetSize() should be used to set them.
    You can now control what constitutes a pit by editing the __IsPit() function in the main file.
    There's also a __HaveAmulet() function, used to determine if enemies are visible when the "All Enemies Are Invisible" screen flag is used.
    Weapons can now have fake Z movement, both individually and globally.
    Added a new death animation, as well as constants to use as arguments to Ghost_DeathAnimation() and Ghost_Waitframe().

    There haven't been any changes to global data, so this version should be compatible with existing saves using 2.7.x. Still, be careful.

  9. #9
    Here lies mero. Died by his own dumbassitude.
    Join Date
    May 2011
    Posts
    929
    Mentioned
    102 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    5,527
    Level
    23
    vBActivity - Bars
    Lv. Percent
    13.96%
    You just made my day. Thanks Saffith.


    edit: I use this meme way too much. XD
    @Saffith
    I am laughing so hard right now. Burt the Bashful anyone?

    * GHD_SHRINK
    * The enemy grows slightly and then shrinks away to nothing. This does not
    * work with enemies that use additional combos.
    Last edited by Tamamo; 10-06-2015 at 01:53 PM.

  10. #10
    The Timelord
    QDB Manager
    ZC Developer

    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,396
    Mentioned
    112 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    4,765
    Level
    21
    vBActivity - Bars
    Lv. Percent
    69.72%
    Nice one. Are you adding a backward-compatibility setting, as a constant for this?

    Code:
    const int GHOST_USE_ENEMY_NAMES_FOR_SCRIPTS = 1; 
    
    if ( GHOST_USE_ENEMY_NAMES_FOR_SCRIPTS ) gohst_use_at_sign_routines();
    else ghost_use_misc11_misc12();
    Something like that would be good. Just set the constant in the main header file, and use it as needed. That will prevent conflicts with games that are built on the old system.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social