User Tag List

Page 3 of 4 FirstFirst 1 2 3 4 LastLast
Results 21 to 30 of 31

Thread: I wrote a script!!! but it ain't dun wurk good...

  1. #21
    Wizrobe
    Join Date
    Dec 2006
    Age
    29
    Posts
    3,693
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,935
    Level
    28
    vBActivity - Bars
    Lv. Percent
    42.86%

    Re: I wrote a script!!! but it ain't dun wurk good...

    -Howabout some script showcase/tutorials? What I mean is kind of like here, where you have a really simple script and variations on it, where each one can be broken down a bit and explained "why it works". While not really a tutorial exactally, it would certainly help out alot of the script-challenged masses that are smashing their faces against the keyboard. (myself included)
    ....... :confuse2: ........... :angry: .......... :mad2: ...........
    Yes, if every script were broken down and explained like they are here, it would be so much easier for people to learn how to script. To be honest, I think I have learned to script from this thread alone (and a book on beginning c++). Now we just need to get evry one to label their scripts like this.
    Quote Originally Posted by rock_nog View Post
    Well of course eveything's closed for Easter - don't you know of the great Easter tradition of people barricading themselves up to protect themselves from the return of Zombie Christ?


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

    Re: I wrote a script!!! but it ain't dun wurk good...

    Still can't figure this one out.

    Code:
    import "std.zh"
    
    item script level_test
    {
    void run() {
            int ItemClass = 1;
    	if (Link->HP <= 16 &&               // 25
               Game->Counter[CR_RUPEES] >=1) {
    		ItemClass = 2;
                    Game->Counter[CR_RUPEES] -= 1;               
    	}
    	else
    	{
    		ItemClass = 1;  
    	}
    }
    }
    ItemClass = 2; is the only statement that would compile. Everything else say's ->(not a valid pointer) or error (you suck at scripting). My computer is not nice.
    The game takes away one rupee though....

    Hey C- did you use any thing like what i'm trying to do with that badass swordman type script. I didn't see it in Zodiac though. Did you remove it? Maybe I could just modify that?!
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  3. #23
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,141
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.37%

    Re: I wrote a script!!! but it ain't dun wurk good...

    I don't see anything particularly wrong with that, other than the fact that it drains Link's rupees without actually doing anything.

    Unless it doesn't like the variable name "ItemClass", since that's also the name of a built in type.
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

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

    Re: I wrote a script!!! but it ain't dun wurk good...

    Quote Originally Posted by Gleeok View Post
    Hey C- did you use any thing like what i'm trying to do with that badass swordman type script. I didn't see it in Zodiac though. Did you remove it? Maybe I could just modify that?!
    Swordsman? You mean the Aries Boss? (The big centaur that slashes at you with his big ol' saber) or the Aries Saber weapon (Three-tile-long sword slash in front of the player as a custom weapon)? Or something else...?

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

    Re: I wrote a script!!! but it ain't dun wurk good...

    Oh yeah! hehe. I found it. Just forgot what it was called, but once I started to look at the code I figured out which one was which.
    if link dir ==1 then weapon y = link y - 16... that's genious! I couldn't figure that out...
    All in all that's some heavy stuff to look at right now for me, especially since you have a whole community of of these buggers that are dependant on each other. But you did manage to change weapon damage in there, so if I can figure out what the hell you did, I could add some if statements and take out some other stuff. tweak this and that maybe...
    Quick question; For these ffc that are "hard coded", do you need to set them to each screen? That could take awhile. If not, How'd you bypass having to do that altogether.

    PS- thanks for writing notes on the stuff btw.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  6. #26
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,141
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.37%

    Re: I wrote a script!!! but it ain't dun wurk good...

    Hard coded FFCs? They're all "hard coded", and there's no way to "un-hard code" them.

    If you need certain scripts to run on each screen, then you can check off the box named "Carry over", and that FFC will (surprise) carry over with Link. You then need to create the FFC on each screen that Link could possibly start on (any screen with a Green Square, pretty much).
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

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

    Re: I wrote a script!!! but it ain't dun wurk good...

    My commenting isn't great, but it gets the job done.

    The way I'm doing custom weapons is this. Each custom weapon gets an item script that sets up FFCs 29, 30, and 31 (which are set aside and only ever used for custom weapons). Then there's an FFC script that runs on every screen, on FFCs 29, 30, and 31. I use carryover FFCs (which means you need to set up the FFCs only on every screen you can continue on). The FFC scripts activate once they are set by the item script. My trigger is the Combo of the FFC. Once FFC 29, 30, or 31 notice that their combo has changed to one of the custom weapon combos, they set their damage, move accordingly, watch for enemy collisions, and apply enemy damage if necessary.

    This means that the FFC weapon script gets REALLY complicated with nested if-else statements. In the more recent, yet-unreleased version of Zodiac I've added the Virgo Tribeam (two in front, one out your bottom), and the Cancer Charge (which gets stronger when you hold down the A button). So the general weapon script is getting pretty bloated.

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

    Re: I wrote a script!!! but it ain't dun wurk good...

    This means that the FFC weapon script gets REALLY complicated with nested if-else statements. In the more recent, yet-unreleased version of Zodiac I've added the Virgo Tribeam (two in front, one out your bottom), and the Cancer Charge (which gets stronger when you hold down the A button). So the general weapon script is getting pretty bloated
    .

    I can't wait for the next version. That sounds awesome..what do you got though, like 5 more to get done.heh.

    It seems the type of weapon scripts that you've assembled is kind of like what i'm trying to make, exept that I only need very basic ones. I've got the rapid fire, the perpetual potion script, and the Door buster, Thanks again guys, And only need a few more to replace candle, whistle, N.Love, and some melee weapons. I'll be trying to analyze the mass of weapon scripts you've put together in Zodiac to try and get a better understanding of how to create some of that stuff. Who know's, I might end up with something completely sick that I can show off in S. Showcase. LOL! Well I can assure you that more questions will be forthcoming, it's only a matter of time.

    PS-Yes i'm an FFC dumbass that never bothered to mess with all the 2.5 features untill now. Forgive me.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

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

    Re: I wrote a script!!! but it ain't dun wurk good...

    OK, I wroted up this one real good like...but it ain't dun work neither..

    Code:
    import "std.zh"
    
    //========================================================
    // FFC SCRIPT TRIGGER SECRETS (no pun intended) hah;)
    // D0 - D2;  Items neccesary. Check std.zh for values
    //========================================================
    ffc script trig_secret2{
        
        void run(int have_item, int have_item2, int have_item3){
    
                      while(true) {
    
                     if ( (Link->Item[have_item] == true) && (Link->Item[have_item2] == true) &&
                                (Link->Item[have_item3] == true) && (Screen->NumNPCs() >= 1) ) {
                              npc enemy_trig = Screen->LoadNPC(1);
                              enemy_trig->HP = 0;
                              Waitframe();
                        }
                 }
          }
    }

    Here is the original, which somehow doesn't work also....
    Code:
    ffc script trigger_secrets{
        
        void run(int have_item){
    
            if (Link->Item[have_item] == true && Screen->NumNPCs() >= 1){
                            npc enemy_trig = Screen->LoadNPC(1);
                enemy_trig->HP = 0;
                
            }
        }
    }
    Can anyone tell me why it doesn't actually do anything????
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  10. #30
    Octorok
    Join Date
    May 2007
    Posts
    331
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,505
    Level
    13
    vBActivity - Bars
    Lv. Percent
    10.96%

    Re: I wrote a script!!! but it ain't dun wurk good...

    Thats odd it should work fine. I would try debugging the script by putting a very visible response inside the {} of the if statement. (something like creteing an enemy something you are sure not to miss) this will test to see if the if is bieng executed at all. Also you might want to add a while loop and waitframe to the simpler code and try running that again. Do all the simple checks, did I put the right item ID in, does Link actually have the item (I know it sounds dumb but you would not beleve how many times "a repair man is called becuse the computer is not plugged in" )

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