User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 14

Thread: Item Scripts- Activating

  1. #1
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.94%

    Item Scripts- Activating

    How do Item Scripts work? Do the scripts activate the moment you pick them up, or is there a variable to allow them to work only when the button it's equipped to is pressed? I want to make more usable items, but I can't if the scripts activate as long as you have them (Like with the equipment items).

    And why is it that my other question has been virtually ignored?

  2. #2
    Developer
    ZC Developer
    jman2050's Avatar
    Join Date
    Jun 2001
    Location
    Do you really need to know
    Age
    37
    Posts
    3,883
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    5,709
    Level
    23
    vBActivity - Bars
    Lv. Percent
    46.19%

    Re: Item Scripts- Activating

    Item scripts activate when you press the B (or A) button. The script occurs for one frame then is destroyed. The engine already allows for scripts to be run when you collect an item, but it isn't selectable in the current beta.
    AGN's Resident Zelda Classic Developer and Sonic the Hedgehog Fanboy

  3. #3
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.94%

    Re: Item Scripts- Activating

    Thanks. I was hoping it'd work like that, but I wanted to make sure first. On a somewhat-related note, is it possible to simply create a certain combo on the screen at a location dependent on the direction Link is facing WITHOUT it being an FFC (it's STILL impossible to make FFCs truly solid, right?)?

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

    Re: Item Scripts- Activating

    I'm assuming we can still include "while" loops in item scripts though, for lasting effects?

  5. #5
    Developer
    ZC Developer
    jman2050's Avatar
    Join Date
    Jun 2001
    Location
    Do you really need to know
    Age
    37
    Posts
    3,883
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    5,709
    Level
    23
    vBActivity - Bars
    Lv. Percent
    46.19%

    Re: Item Scripts- Activating

    once you hit a waitframe or the script quits, the script will not run again.
    AGN's Resident Zelda Classic Developer and Sonic the Hedgehog Fanboy

  6. #6
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.94%

    Re: Item Scripts- Activating

    Whoops. There's one more important question I need answered:

    When I compile a Zscript, how do I tell the compiler that the script in the buffer is an Item Script? Or do Items simply use the FFC scripts?

  7. #7
    Developer
    ZC Developer
    jman2050's Avatar
    Join Date
    Jun 2001
    Location
    Do you really need to know
    Age
    37
    Posts
    3,883
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    5,709
    Level
    23
    vBActivity - Bars
    Lv. Percent
    46.19%

    Re: Item Scripts- Activating

    use

    Code:
    item script script_name
    replacing ffc with item. Then, when compiled, put the script under the Item tab.
    AGN's Resident Zelda Classic Developer and Sonic the Hedgehog Fanboy

  8. #8
    Ultimate Prankster Lucario QDB Manager
    Just registered
    Nimono's Avatar
    Join Date
    Nov 2005
    Location
    Static Void Kingdom
    Age
    32
    Posts
    1,963
    Mentioned
    5 Post(s)
    Tagged
    2 Thread(s)
    vBActivity - Stats
    Points
    6,276
    Level
    24
    vBActivity - Bars
    Lv. Percent
    43.94%

    Re: Item Scripts- Activating

    Yep, just what I assumed. XD I looked at Saffith's ChaserTrap script to see how he set up his lines and stuff, and I noticed he put "ffc script ChaserTrap" before void run(). I figured changing "ffc" to "item" would work. Thanks again!

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

    Re: Item Scripts- Activating

    Quote Originally Posted by jman2050 View Post
    once you hit a waitframe or the script quits, the script will not run again.
    Wha... well wait a minute. How do we code for persistent item effects, then? Like, say I want the item to create a ball of energy that orbits the player and damages enemies. One button press creates it, and it persists until magic is empty or until the button is pressed again.

  10. #10
    Developer
    ZC Developer
    jman2050's Avatar
    Join Date
    Jun 2001
    Location
    Do you really need to know
    Age
    37
    Posts
    3,883
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    5,709
    Level
    23
    vBActivity - Bars
    Lv. Percent
    46.19%

    Re: Item Scripts- Activating

    put the effect in a global script, have the item script trigger it, then have the same item script untrigger it.
    AGN's Resident Zelda Classic Developer and Sonic the Hedgehog Fanboy

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