User Tag List

Results 1 to 7 of 7

Thread: Damaging Sparkles

  1. #1
    Octorok Lelouche Vi Britannia's Avatar
    Join Date
    Oct 2015
    Location
    Britannia - Area 11
    Posts
    167
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    877
    Level
    10
    vBActivity - Bars
    Lv. Percent
    32.19%
    Daily Activity
    0%
    Weekly Activity
    3.89%
    Monthly Activity
    3.63%

    Damaging Sparkles

    Been looking all over the script functions and I can't find anything on it. I know damaging sparkles are hard coded like the magic book's fire damage is, which is fine, I always thought it was fluff anyway. What I can't find is a script function to add that effect on a custom item.

    For example, if I wanted to add damaging sparkles to the magic thrown by the wand, how would I do that? What function(s) do I need to use to make that happen?
    Last edited by Lelouche Vi Britannia; 05-13-2016 at 12:44 AM. Reason: I hate touch screens
    Lost my wings and grew 8 tentacles... I've seen enough Hentai to know where this is going....

  2. #2
    Octorok
    Join Date
    May 2015
    Posts
    129
    Mentioned
    34 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    458
    Level
    7
    vBActivity - Bars
    Lv. Percent
    72.22%
    Daily Activity
    0%
    Weekly Activity
    11.66%
    Monthly Activity
    24.84%
    You'd need either a global function or an FFC script launched by said wand item. I'd go with global. Have a timer
    Code:
    int timer = 0; 
    timer++; 
    timer %=8;
    running, and when the timer reaches a certain number,
    Code:
    if (timer == 1)
    detect all magic LWeapons using a for script
    Code:
    for (int i = 1; i <= Screen->NumLWeapons(); i++) { 
    lweapon Magic = Screen->LoadLWeapon(i);
    if (Magic->ID == LW_MAGIC)
    And then create a damaging sparkle weapon where the magic is located.
    Code:
     lweapon Sparkle = Screen->CreateLWeapon(LW_FIRESPARKLE);
    Sparkle->X = Magic->X;
    Sparkle->Y = Magic->Y;
    Sparkle->Damage = 4;

  3. #3
    Octorok
    Join Date
    May 2015
    Posts
    129
    Mentioned
    34 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    458
    Level
    7
    vBActivity - Bars
    Lv. Percent
    72.22%
    Daily Activity
    0%
    Weekly Activity
    11.66%
    Monthly Activity
    24.84%
    EDIT: Double posted for some reason.

  4. #4
    Octorok Lelouche Vi Britannia's Avatar
    Join Date
    Oct 2015
    Location
    Britannia - Area 11
    Posts
    167
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    877
    Level
    10
    vBActivity - Bars
    Lv. Percent
    32.19%
    Daily Activity
    0%
    Weekly Activity
    3.89%
    Monthly Activity
    3.63%
    Spoiler: show

    Wow, all that for what is basically going to be a visual effect? Forgive my lack of knowledge, but what does the modulus (%) symbol do exactly?


    Nevermind that, I looked it up. My real question is why global? Wouldn't an FCC be easier?
    Last edited by Lelouche Vi Britannia; 05-13-2016 at 03:47 PM. Reason: Answered my own question
    Lost my wings and grew 8 tentacles... I've seen enough Hentai to know where this is going....

  5. #5
    Octorok
    Join Date
    May 2015
    Posts
    129
    Mentioned
    34 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    458
    Level
    7
    vBActivity - Bars
    Lv. Percent
    72.22%
    Daily Activity
    0%
    Weekly Activity
    11.66%
    Monthly Activity
    24.84%
    FFC's are limited, and you might have a situation where the FFC just quits, like if it fails to detect magic. Globals are better for this kind of thing.

  6. #6
    The Timelord
    ZC Developer
    ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    1,147
    Mentioned
    101 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,932
    Level
    19
    vBActivity - Bars
    Lv. Percent
    96.49%
    Daily Activity
    0%
    Weekly Activity
    73.82%
    Monthly Activity
    142.31%
    Quote Originally Posted by Lelouche Vi Britannia View Post
    Spoiler: show

    Wow, all that for what is basically going to be a visual effect? Forgive my lack of knowledge, but what does the modulus (%) symbol do exactly?


    Nevermind that, I looked it up. My real question is why global? Wouldn't an FCC be easier?
    In addition, a global component grants you control over Waitdraw() placement.

    With an ffc, your sparkle will be created one frame after its parent weapon, and the sparkle will last for one frame after the parent weapon dies. This has the potential to lead to bugs, as your sparkles have a damaging effect, but it could also be a desirable result.


    Featured Scripts & Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | Zelda 3 Thief's Town Treasure Chest Minigame (ffc) | Bobomb (enemy)
    ZScript & ZC-Related Pastebin | Quests and ZScript Repository | ZC Dev & Betas | Latest ZC 2.54 Beta | YouTube Channel
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0, or v3.0 where applicable..

  7. #7
    Octorok Lelouche Vi Britannia's Avatar
    Join Date
    Oct 2015
    Location
    Britannia - Area 11
    Posts
    167
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    877
    Level
    10
    vBActivity - Bars
    Lv. Percent
    32.19%
    Daily Activity
    0%
    Weekly Activity
    3.89%
    Monthly Activity
    3.63%
    Just recently discovered that the damaging sparkles are a weapon type under "constants" meaning it can be scripted as an lweapon. This is what I get for asking questions before I read. I had no idea what the LW_FIRESPARKLE even was until now.
    Lost my wings and grew 8 tentacles... I've seen enough Hentai to know where this is going....

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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