User Tag List

Results 1 to 5 of 5

Thread: [2.50.2 and Above]Setting Link->Action = LA_CASTING No Longer Works

  1. #1
    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,762
    Level
    21
    vBActivity - Bars
    Lv. Percent
    69.22%

    Not A Bug [2.50.2 and Above]Setting Link->Action = LA_CASTING No Longer Works

    Reported by Alucard, and confirmed. Setting LA_CASTING worked in 2.50.,0 and 2.50.1, but ceased working in 2.50.2.

    test script:
    Code:
    import "std.zh"
    
    global script a{
    	void run(){
    		int timer = 120; 
    		while(true){
    			if ( Link->PressEx1 ) { 
    				while ( --timer) { Link->Action = LA_CASTING; Waitframe(); }
    				timer = 120;
    			}
    			Waitdraw(); Waitframe(); 
    		}
    	}
    }

  2. #2
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,432
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70%
    I don't see it working in the older versions. Could you make a quest?

    action is set back to none if no magic item has been used, and that's always been the case. I don't see why it would ever have worked.

  3. #3
    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,762
    Level
    21
    vBActivity - Bars
    Lv. Percent
    69.22%
    Quote Originally Posted by Saffith View Post
    I don't see it working in the older versions. Could you make a quest?

    action is set back to none if no magic item has been used, and that's always been the case. I don't see why it would ever have worked.
    I saw that in link.cpp. i was going to go in and try to fix it, but I don't see what could have caused it to work. I had some files from 2.50.1, and even there, I see nothing.

    Alucard claims it did, and I'm waiting for a reply. I feel as if I have set it before, back in 2.50.0, but IDK if it worked or not. I suppose I could make a patch to make it work, but I have no idea if the result would be useful, because without a clk value to control it, there isn't much for it to do. The magic items all have a clock for their animation, so I guess a generic clock would work, that has a 100 frame count, or something.

    Code:
      if(magicitem==-1)
            {
               if ( --castclock <= 0 ) { action = none; castclock = 90; }
            }
            
            break;
    Something like that.

    Adding that var to the class shouldn't affect much in 2.50.3, AFAIK, but this is speculative in general. I'll test that next build and see if it works at all.
    I'll wait for is reply, but I'm still trying to sort out the flipping npc script defs. IDK if you checked in on that thread, but after adding the code to the loader, everything is going mad. I'm uploading that source and bins, and I'll post them in that thread, if you want to have a look while I check into this LA_CASTING business.


    ------------------

    Edit: Hmph. In link.cpp, switch(new_action), i did:

    Code:
    case casting: 
    	if ( !magiccastclk ) magiccastclk = 96;
    	action = casting;
    	break;
    and in switch(action)

    Code:
    case casting:
            if(magicitem==-1)
            {
                if ( --magiccastclk <= 0 ) { action = none; }
            }
            
            break;
    Doing that froze link for the 96 frames that I specified, but it didn't change his sprite. If I can get his sprite to change to the casting sprite, that will work; so I suppose that counts as progress?

    ------

    When determining what version of ZC a quest was mad ein, should I be using one of these:

    Spoiler: show
    Code:
    //Version number of the different section types
    #define V_HEADER           3
    #define V_RULES           13
    #define V_STRINGS          5
    #define V_MISC             7
    #define V_TILES            1
    #define V_COMBOS           7
    #define V_CSETS            4
    #define V_MAPS            18
    #define V_DMAPS            9
    #define V_DOORS            1
    #define V_ITEMS           25
    #define V_WEAPONS          6
    #define V_COLORS           2
    #define V_ICONS            1
    #define V_GRAPHICSPACK     1
    #define V_INITDATA        18
    #define V_GUYS            25
    #define V_MIDIS            4
    #define V_CHEATS           1
    #define V_SAVEGAME        11
    #define V_COMBOALIASES     2
    #define V_LINKSPRITES      5
    #define V_SUBSCREEN        6
    #define V_ITEMDROPSETS     2
    #define V_FFSCRIPT         6
    #define V_SFX              6
    #define V_FAVORITES        1


    ...or

    Code:
    #define ZELDA_VERSION       0x0254                          //version of the program
    #define VERSION_BUILD       32                              //build number of this version
    or something else?

    If I knew where the check for how bitmap placement is handled was located, that would be a good template.

    I need to set up a check to determine if a quest was made in 2.50.3 or earlier, versus this, so that checking edefSCRIPT for all types still occurs in quests designed with that in mind.

  4. #4
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,432
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70%
    There's no mechanism for checking the quest version during the game. All the "if version then behavior" stuff is set up during quest loading, and I'd rather keep it that way. For weapon defenses, I'd prefer to add weapon->Defense, which would indicate which defense should be used for the weapon. That would be more flexible and wouldn't need any special handling for backward compatibility.

  5. #5
    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,762
    Level
    21
    vBActivity - Bars
    Lv. Percent
    69.22%
    Well, for the time being, I fixed the problem. Now these things work from ZQuest's enemy editor, and all is well in the world.

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