User Tag List

Results 1 to 3 of 3

Thread: Making a custom weapon

  1. #1
    Octorok
    Join Date
    Jan 2007
    Age
    36
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,429
    Level
    12
    vBActivity - Bars
    Lv. Percent
    81.27%

    Making a custom weapon

    I'm seeing if I can figure out this scripting thing, and I was seeing if I could make a custom weapon. The idea is that it will spawn a freeform combo and shoot it out kinda like the boomerang goes except after a certain range it will disappear instead of returning and will just damage, not stun. The script should be able to specify how much damage it can do to any given enemies. I have the part where you make the FFC and shoot it off in a desired direction with the desired velocity (I think), but how do you make it disappear at the end of the range? That will not happen the frame the item is used so it would seem to be a problem.

    Also, how do I make it damaging to enemies? I can see what function would change the HP of any given enemy, but how do I identify that I'm hitting an enemy and then tell which type of enemy it is (I don't want to do anything rash like kill the old man, and I probably want to be able to make things like Darknuts and Digdoggers immune)?

    Thanks for any help ahead of time.

  2. #2
    Wizrobe C-Dawg's Avatar
    Join Date
    Jan 2002
    Posts
    4,205
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,630
    Level
    25
    vBActivity - Bars
    Lv. Percent
    2.88%

    Re: Making a custom weapon

    Gleeok has some scripts for custom weapons out there somewhere. There's also the scripts in Zodiac (over at Quest Announcement) where all of my custom weapons are open for ripping. Go inspect how I'm doing them and you'll get the hang of it.

    The easiest way to limit range, to answer your question, is to use a cycling combo. The script only moves the weapon-ffc while it's a certain combo. Once it cycles to another one, it stops.

    For enemy damage, you have to simulate damage, flashing, and knockback to make it satisfying. This isn't so bad. But it's a little complicated, as you'll see when you review the scripts, because you want to be able to hit more than one enemy at a time.

  3. #3
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,827
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,978
    Level
    33
    vBActivity - Bars
    Lv. Percent
    28.31%

    Re: Making a custom weapon

    Actually I haven't posted any weapon scripts yet as they aren't done yet. The problem with the script i'm using and the Zodiac script is it's so damn complicated for non-scripters to use. However, i've fixed the crash and bool problems with the Global Weapon script i've been working on (for so long ), which means i'll switch over to that eventually as it runs faster and doesn't seem to slowdown ZC from enemy->pointers as much. *Sigh* I just can never have time for all these scripts...(I wish we had more scripters)

    You should at least check out what is available in the script showcase, and hopefully you'll pick up scripting in no time at all.


    To answer more specifically your questions though: Yep, combo cycle the ffc.
    And you need to check the coordinates of the ffc with the coordinates of every on screen enemy. If the ffc is over an enemy, you need to store that npc's id in a variable, then assign damage to it with:

    npc enemy = Screen->LoadNPC(npc_id);
    enemy->HP -= damage_amount;
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

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