Jump to content

Photo

Need some Scripting help, also waiting for Zoria


  • Please log in to reply
3 replies to this topic

#1 SkyLizardGirl

SkyLizardGirl

    Unbeknownst to danger we call upon your help

  • Banned
  • Real Name:Arianna Crystal Ritter
  • Location:Earthia

Posted 14 June 2017 - 10:50 PM

Hellows.*  I am in need of an item -ID script of some kind where you cannot pass a certain tile or cannot pass a landmark tile until the preferred item is used on it or if chara is holding it. One idea is like some kind of Lock-Block you cannot pass until any random needed item you have with you is used against it or if it's ID is picked up like a key or weapon or tool, then you can enter or pass

 

I am having trouble because i would like to create my own easy 'home-made combos', so if the hero uses that certain item, he can proceed past the object or block or destroy it.

 

-But i can only use so many items as various dungeons you get a hammer and etc. i may run out of different items, to lock the character out of each upcoming dungeons with, 

Until you pick them up,  the very 'next needed item' to enter the next dungeon.

 

Because I can't make my own combos with ZC editor it limits my possibilities.  This is even going to be used to identify if i have 15 - Harps Relics at first so Link can enter the shrine and deposit them and face the first of the Nine main general bosses.

 

This is the Mechanic my game is really built for needing. Or it cannot be proceeded to finish Season one of the first 15 dungeons chapter - for the next 15 dungeons afterward and beyond.

 

I need a scripter to make this script so i can give to Zoria to implement into my .qst file



#2 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 15 June 2017 - 12:41 AM

The easiest way to do this is probably to use an FFC that changes a specific combo onscreen if you have a certain item. I've got to crash, right now, but if no one has gotten to it by the time I get home from class tomorrow, I'll whip something up.


  • SkyLizardGirl likes this

#3 SkyLizardGirl

SkyLizardGirl

    Unbeknownst to danger we call upon your help

  • Banned
  • Real Name:Arianna Crystal Ritter
  • Location:Earthia

Posted 15 June 2017 - 01:20 AM

Thank yous.* I will waits till thens.* <3



#4 Binx

Binx

    Formerly Lineas

  • Members
  • Real Name:Brian
  • Location:Lancaster, CA

Posted 17 June 2017 - 06:54 PM

Sorry that it took so long, I've had a lot going on at home. Anyways, this isn't tested, but in theory, it should change any combo onscreen to another combo if you have a specific item.

ffc script Obstacle
{
    void run (int itemid, int Combo1, int Combo2)
{

if (Link->Item[itemid] == true)
{
  for (int i = 0; i < 176; i++) 
{
    
  if (Screen->ComboD[i] == Combo1) 
  {
        Screen->ComboD[i] = Combo2;
        Game->PlaySound(27);
  }       

}  
}
}
}

So the basic setup is as follows: D0 is the item id of whichever item is required to pass, D1 is whichever combo you're using to block the path (for example, a dungeon block), and D2 is the combo you want it to change to. Place the FFC anywhere onscreen and attach this script to it.
 
Here's an alternate version that works based on counter items:

 

ffc script Counter_Obstacle
{
    void run (int counterid, int Combo1, int Combo2, int quantity)
{

if (Game->Counter[counterid] >= quantity)
{
  for (int i = 0; i < 176; i++) 
{
    
  if (Screen->ComboD[i] == Combo1) 
  {
        Screen->ComboD[i] = Combo2;
        Game->PlaySound(27);
        Game->DCounter[counterid] -= quantity;
  }       

}  
}
}
}

In this version, D0 is the id of the counter you're using 

Game counter ids

D1 and D2 are the same as in the other script, D3 is the quantity of the counter item that you need (for example, you mentioned needing 15 harps for something); setup is otherwise the same.
 
Be advised that both of these scripts will activate as soon as you walk onscreen, mainly because I don't know how to make it only take effect if you come in contact with the combo that's to be changed. If you need it to only take effect when you come in contact with the combo, I'm sure someone can make the necessary alterations. Also be advised that if you leave the screen, the combos reset, so it might need a bit of work to get the counter items to work right (after all, you don't want to lose 15 harps every time you go to that screen), would be good for a toll bridge  or something like that, though.

 

EDIT: Here's a version that triggers screen secrets, instead; this will make it so the combos change permanently:

ffc script Counter_Secret
{
    void run (int counterid, int quantity)
{
 
if (Game->Counter[counterid] >= quantity)
{
        Screen->TriggerSecrets();
        Game->PlaySound(27);
        Screen->State[ST_SECRETS] = true;
        Game->DCounter[counterid] -= quantity;
  }       
 
}
}
}
 
 
This version only uses 2 arguments, D0 for the counter id and D1 for the quantity needed, then you just place secret flags over whichever combos you want to change. This will trigger ALL secrets onscreen, so you will only be able to use one FFC per screen (as opposed to the other versions which you could have more, by simply having multiple combo ids that change)
 
FURTHER EDIT: Also, Zoria put a scripted lock block in the DB a while back: http://www.purezc.ne...=scripts&id=256

Edited by Binx, 17 June 2017 - 07:31 PM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users