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
    136
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    781
    Level
    9
    vBActivity - Bars
    Lv. Percent
    80.64%
    Daily Activity
    0%
    Weekly Activity
    3.83%
    Monthly Activity
    4.97%

    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....

    Help this cat on it's quest for world domination!

  2. #2
    Keese
    Join Date
    May 2015
    Posts
    54
    Mentioned
    22 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    259
    Level
    5
    vBActivity - Bars
    Lv. Percent
    95.61%
    Daily Activity
    0%
    Weekly Activity
    3.83%
    Monthly Activity
    4.97%
    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
    Keese
    Join Date
    May 2015
    Posts
    54
    Mentioned
    22 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    259
    Level
    5
    vBActivity - Bars
    Lv. Percent
    95.61%
    Daily Activity
    0%
    Weekly Activity
    3.83%
    Monthly Activity
    4.97%
    EDIT: Double posted for some reason.

  4. #4
    Octorok Lelouche Vi Britannia's Avatar
    Join Date
    Oct 2015
    Location
    Britannia - Area 11
    Posts
    136
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    781
    Level
    9
    vBActivity - Bars
    Lv. Percent
    80.64%
    Daily Activity
    0%
    Weekly Activity
    3.83%
    Monthly Activity
    4.97%
    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....

    Help this cat on it's quest for world domination!

  5. #5
    Keese
    Join Date
    May 2015
    Posts
    54
    Mentioned
    22 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    259
    Level
    5
    vBActivity - Bars
    Lv. Percent
    95.61%
    Daily Activity
    0%
    Weekly Activity
    3.83%
    Monthly Activity
    4.97%
    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
    Mad, Mad, Author ZoriaRPG's Avatar
    Join Date
    Oct 2006
    Location
    Prydon Academy
    Posts
    759
    Mentioned
    67 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    2,916
    Level
    17
    vBActivity - Bars
    Lv. Percent
    51.76%
    Daily Activity
    268.46%
    Weekly Activity
    42.11%
    Monthly Activity
    33.06%
    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.


    Script Headers: RPG.zh ( v. a0.97.1 ) ( RPG.zh Thread ) | stdArguments.zh (v.6.9.9/1) | | Timers.zh (v.1.5)
    ZScript | ZC Dev | ZC 2.53 | Alucard's: stdCombos.zh (v1.1) | stdWeapons.zh | particles.z
    All of the code that I create and publish here is free for use, modification and distribution under the GPL v2.0.

  7. #7
    Octorok Lelouche Vi Britannia's Avatar
    Join Date
    Oct 2015
    Location
    Britannia - Area 11
    Posts
    136
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    781
    Level
    9
    vBActivity - Bars
    Lv. Percent
    80.64%
    Daily Activity
    0%
    Weekly Activity
    3.83%
    Monthly Activity
    4.97%
    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....

    Help this cat on it's quest for world domination!

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