User Tag List

Page 1 of 4 1 2 3 ... LastLast
Results 1 to 10 of 34

Thread: Yet Another Script Problem (YASP)

  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%

    Yet Another Script Problem (YASP)

    Well, this time, it's serious. To protect my plans with the scripts I will show soon, I am going to take out any mentions of the names.

    These two scripts work in tandem to trigger one effect, but when I open a quest in ZC with them in it, the player freezes before the quest is finished loading.

    Code:
    ffc script -taken out-
    {
    	int Activated = 0;
    
    	void run()
    	{
    		while(true)
    		{
    			while (Activated == 1)
    			{
    				Screen->ComboD[176] = 3;
    			}
    		}
    	}
    }
    Code:
    import "std.zh"
    import "-taken out-.z"
    ffc script -taken out again-
    {
    	int Type = 0;
    	int Piece = 1;
    	int Weapon = 0;
    
    	void run()
    	{
    		while(true)
    		{
    			if (Type == 0)
    			{
    				-taken out-.Activated = 1;
    			}
    			else if (Type == 1)
    			{
    				Screen->ClearSprites(0);
    				int ScrnNPCs = Screen->NumNPCs();
    				if (ScrnNPCs == 0)
    				{
    					-taken out-.Activated = 1;
    				}
    			}
    			else if (Type == 3)
    			{
    				if (Link->Item[Weapon])
    				{
    					-taken out-.Activated = 1;
    				}
    			}
    		}
    	}
    }
    Yeah... I have no clue what's wrong. Is it because I try to clear the guys from the screen?

  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,433
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.08%

    Re: Yet Another Script Problem (YASP)

    Offhand, I'd say it's because you have an infinite loop without a Waitframe().

  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: Yet Another Script Problem (YASP)

    Quote Originally Posted by Saffith View Post
    Offhand, I'd say it's because you have an infinite loop without a Waitframe().
    Oh darn, I forgot that. XD I'm too used to item scripts. XD Thanks for telling me that. :)

    Edit: Well darn. That fixed the freezing problems, but... Now, whenever the "thing" is triggered, it goes to the wrong location. Okay, help me out here. I want to put a combo at an exact location without using FFCs (Because for some reason, doing it that way completely erases combo type...). I want to put Combo 3 at 96,80. How would I tell the script to look at x-96, y-80?

  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,433
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.08%

    Re: Yet Another Script Problem (YASP)

    I'm not sure I see what you mean... Are you trying to change Screen->ComboD at a particular location? If that's it, it would be Screen->ComboD[ComboAt(96, 80)]=3.

  5. #5
    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: Yet Another Script Problem (YASP)

    Quote Originally Posted by Saffith View Post
    I'm not sure I see what you mean... Are you trying to change Screen->ComboD at a particular location? If that's it, it would be Screen->ComboD[ComboAt(96, 80)]=3.
    Oh. XD I've always wondered how I'd use ComboAt.... XD

    Edit: It works, but there's a problem- The Combo Type refuses to work.

  6. #6
    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,433
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.08%

    Re: Yet Another Script Problem (YASP)

    What type of combo is it you're changing it to?

  7. #7
    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: Yet Another Script Problem (YASP)

    Quote Originally Posted by Saffith View Post
    What type of combo is it you're changing it to?
    Stairs. If I change it using a variable that isn't a loaded FFC, the combo type works. If I use a variable with a loaded FFC, the combo type doesn't work. It doesn't work here, either, and this is in build 240!

  8. #8
    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,433
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.08%

    Re: Yet Another Script Problem (YASP)

    So Screen->ComboD[x]=3 works, but Screen->ComboD[x]=ffcPtr->Data doesn't? Is that what you're saying?

  9. #9
    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: Yet Another Script Problem (YASP)

    Quote Originally Posted by Saffith View Post
    So Screen->ComboD[x]=3 works, but Screen->ComboD[x]=ffcPtr->Data doesn't? Is that what you're saying?
    Huh? No, let me explain...

    Before, I tried to make a variable be equal to "(96)&(80)", and that would put it at the wrong spot. When I did that, the stairs worked.

    If I did "ffc varaible_here = Screen->LoadFFC(32)", I had to put the FFC's X and Y positions into one variables, so I'd do "variable_Here = (FFC->Y & 240)+(FFC->X>>4)", which is supposed to attach it to a specific combo location instead of by pixels (or so I was told). Then, when putting THAT variable into the ComboD line, it acts like I put the combo on Layer 1.... Meaning, the combo type gets completely erased!

    Not even your version of doing it worked.

  10. #10
    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,433
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.08%

    Re: Yet Another Script Problem (YASP)

    Hm... Okay, what are you changing it from, then?
    And when you say it doesn't work, you mean you can walk over the stairs and they just don't warp you anywhere?

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