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
    173
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,107
    Level
    11
    vBActivity - Bars
    Lv. Percent
    44.09%

    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
    Banned
    Join Date
    May 2015
    Posts
    141
    Mentioned
    34 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    667
    Level
    9
    vBActivity - Bars
    Lv. Percent
    14.48%
    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
    Banned
    Join Date
    May 2015
    Posts
    141
    Mentioned
    34 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    667
    Level
    9
    vBActivity - Bars
    Lv. Percent
    14.48%
    EDIT: Double posted for some reason.

  4. #4
    Octorok Lelouche Vi Britannia's Avatar
    Join Date
    Oct 2015
    Location
    Britannia - Area 11
    Posts
    173
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,107
    Level
    11
    vBActivity - Bars
    Lv. Percent
    44.09%
    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
    Banned
    Join Date
    May 2015
    Posts
    141
    Mentioned
    34 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    667
    Level
    9
    vBActivity - Bars
    Lv. Percent
    14.48%
    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
    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,760
    Level
    21
    vBActivity - Bars
    Lv. Percent
    68.7%
    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.

  7. #7
    Octorok Lelouche Vi Britannia's Avatar
    Join Date
    Oct 2015
    Location
    Britannia - Area 11
    Posts
    173
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,107
    Level
    11
    vBActivity - Bars
    Lv. Percent
    44.09%
    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