Jump to content

Photo

Slashable, non stabbable bushes needed

ffc or global script

  • Please log in to reply
38 replies to this topic

#1 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 13 January 2020 - 09:18 AM

I'm almost ready to finish my first (3 level + Overworld) Mini Demo, with 2.55 Alpha 47.
To keep continunity of the game events, I need bushes (or other slashable combo types), which fail if Link can't already slash (stab = fail).

Maybe an ffc script, that checks slashable (solid) combos on the screen, and makes them "invincible" for stabbing.
Is such a script possible?


Thank you very much 

Bagu


Edited by Bagu, 13 January 2020 - 09:21 AM.


#2 ShadowTiger

ShadowTiger

    The Doctor Is In

  • Members

Posted 13 January 2020 - 12:25 PM

As awesome as that would be, I tend to think in potential alternatives that don't require a script.  Would it be feasible to just have some kind of an orb that only the sword can trigger that has obstacles on all four sides of it that only the slash can trigger?  (And one extra spacer on the bottom to accommodate for the player walking up that extra half-combo beneath it.)

 

I know this is probably not what you were looking for. :P


  • Bagu likes this

#3 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 13 January 2020 - 02:09 PM

Sounds complicate somehow...
I try to explain what I need it for.
In the quest, there's a list of things you have to do (in the right order), before you can enter first dungeon.
There are slashable and classical burn trigger bushes ("dry" looking bushes, not with stairs but walkable

ground secret combos under it) in the first forrest.

To get the ability, to slash the bushes, you first have to finish a "puzzle" in the first village.
(help people - then get a key for the gate in north east of the village.

This way leads to the first of seven towers
...where you get the different scrolls - designed like "soul orbs" (in this case) which contain the memories and abillities
of the first king of Hyrule.
(I use the slash scroll script, to make the "learn slash" an item, too - so it's checkable by string functions)
Without the slash, you'll not be abled to make your way through the forrest, by slashing those many slashable bushes
and find a hermit that gives you another key.
This one is needed for a gate, in an old diamond mine, where you get the torch/candle.

After you received first magic energie, you're finaly equiped to open the way to the first dungeon (in an old tree)
...which is blocked by burnable (dry)  bushes

But you shall not be abled to get the mine - "mini level" - key, if you not learned how to slash, before.
 

Making Extra barriers, for every single bush is not a good solution I guess.
But I like, how the way think ...tricky and inovative


 


Edited by Bagu, 13 January 2020 - 02:29 PM.


#4 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 13 January 2020 - 02:38 PM

Slash and stab are just different movements for the same weapon. This isn't possible.

To do anything like this, you'd need to make it so the bushes can't be cut at all, and then once you learn slashing, change the bushes to something that can be cut.


  • ShadowTiger and Bagu like this

#5 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 13 January 2020 - 02:45 PM

Slash and stab are just different movements for the same weapon. This isn't possible.

To do anything like this, you'd need to make it so the bushes can't be cut at all, and then once you learn slashing, change the bushes to something that can be cut.

You mean a script that changes the combo (into another simialar looking) combo, depending on an item ID in the inventory?
That sounds great.
I already searched for a script like that, (pretty sure I saw something familiar in a content headline (a few weeks ago).
...but I can't find it again.



#6 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 13 January 2020 - 03:10 PM

Such a script (changing combos on scrren init, by checking Items) would be exactly what I need.



#7 ShadowTiger

ShadowTiger

    The Doctor Is In

  • Members

Posted 13 January 2020 - 03:16 PM

I could've sworn that there was a way to change the "Type" of a combo  into another type on a global level by altering the combo itself.  It might have to be run each time the game restarts or something, but is that a thing that's possible?

 

I think it's Screen->ComboT[]
There's const int CT_BUSH               = 55;

So I'm guessing there could be an invisible script on-screen somewhere that has this script attached.  Warning:  I am a lowly peon of a scripter so take this with a boulder-sized grain of salt.

ffc script makeBushesslashable {
void run() {
if(Game->Generic[GEN_CANSLASH] == 1 {
// I have no idea what to do here, lol.
Screen->ComboT[]  // Or here. 
Quit();   // Is that right?
}
Waitframe();
 }
}

  • Bagu likes this

#8 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 13 January 2020 - 03:22 PM

In 2.55, you can use combodata.

const int BUSH_COMBO_ID = ; //put an ID here
void updateBushes()
{
	unless(Game->Generic[GEN_CANSLASH]) return;
	combodata cd = Game->LoadComboData(BUSH_COMBO_ID);
	cd->Type = CT_BUSH;
}

You'd need to call that script when you get the item, and every time you load the quest. Not every frame, or on every screen, just once when you gain the ability to slash, and once more when you reload the quest.


  • ShadowTiger and Bagu like this

#9 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 13 January 2020 - 04:01 PM

In 2.55, you can use combodata.

const int BUSH_COMBO_ID = ; //put an ID here
void updateBushes()
{
	unless(Game->Generic[GEN_CANSLASH]) return;
	combodata cd = Game->LoadComboData(BUSH_COMBO_ID);
	cd->Type = CT_BUSH;
}

You'd need to call that script when you get the item, and every time you load the quest. Not every frame, or on every screen, just once when you gain the ability to slash, and once more when you reload the quest.

Where to put this function in the script?
Is it a part of the global script...?

I don't really understand how to call it, after getting the slash scroll or everytime loading the quest and when I gain the ability and once more, when reloading.
What exactly means "calling a script"?
Is this something, the player has to do?
Sorry, always a bit difficult for me, in english.


Edited by Bagu, 13 January 2020 - 04:08 PM.


#10 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 13 January 2020 - 04:30 PM

What about something like this? (please don't laugh me, because of my infant trial)
D0 should be the Combo ID to replace (used for the solid type) , D1 would be the new Combo ID (used for the slashable type)
But this can also be handled by fixed constances, if it's a better way.

Honestly, I don't really know what I am doing

This is an example of both ways, that I could imagine, somehow.

const int Solid_Bush_Combo = // put Combo ID;
const int Slash_Bush_Combo = // put Combo ID;

ffc script ChangeBushes

void run (int changeItem, int ComboID, int NewComboID)
        {unless(Hero->Item[changeItem]) Quit();
        //from here I am completely clueless

Edited by Bagu, 13 January 2020 - 05:11 PM.


#11 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 13 January 2020 - 05:07 PM

 

What about something like this? (please don't laugh me, because of my infant trial)
D0 should be the Combo ID to replace (used for the solid type) , D1 would be the new Combo ID (used for the slashable type)
but it can also be fix constances, if it's a better way.

Honestly, I don't really know what I am doing

This is an example of both ways, that I could imagine, somehow.

const int Solid_Bush_Combo = // put Combo ID;
const int Slash_Bush_Combo = // put Combo ID;

ffc script ChangeBushes

void run (int changeItem, int ComboID, int NewComboID)
        {unless(Hero->Item[changeItem]) Quit();
        //from here I am completely clueless

It could also be a screendata script, if it might corrupt other ffc scripts on the same screen, otherwise


p.S.: It's not a problem if regulare bushes/slash->next Combos stay also stabbable as slashable in the global game functions.
I just need it for specific screens


Edited by Bagu, 13 January 2020 - 05:08 PM.


#12 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 13 January 2020 - 05:10 PM

No, I said to call the function when you load the quest and when you pick up the item. So, uh, the global script slot literally named "onSaveLoad", and the item pick-up script for the item, would be the places you want
  • Bagu likes this

#13 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 13 January 2020 - 05:19 PM

So it has to be 2 scripts?
One item script for the pick-up slot and one global script, to put it in "OnSaveLoad" slot?


Like this?

 

//1st - to put in the "onSaveLoad" slot

const int BUSH_COMBO_ID = ; //put an ID here

global script bushes

void updateBushes()
{
    unless(Game->Generic[GEN_CANSLASH]) return;
    combodata cd = Game->LoadComboData(BUSH_COMBO_ID);
    cd->Type = CT_BUSH;
}





//and 2nd - to put in the item script, pick-up slot


intem script bushes

void updateBushes()
{
    unless(Game->Generic[GEN_CANSLASH]) return;
    combodata cd = Game->LoadComboData(BUSH_COMBO_ID);
    cd->Type = CT_BUSH;
}

Edited by Bagu, 13 January 2020 - 05:27 PM.


#14 Bagu

Bagu

    Fandomizer

  • Members
  • Real Name:A.I. Bot Bottomheimer
  • Location:Germany

Posted 13 January 2020 - 06:05 PM

When I try it this way (like i wrote before - 2 scripts - 1 an item script, 1 a global script), it fails compiling.
report says: "unexpected zvoid, expecting Lbrace"


 

When I only load this (without giving it an item script/global script name), compiling is succesful.
 

const int BUSH_COMBO_ID = 1966;
void updateBushes()
{
	unless(Game->Generic[GEN_CANSLASH]) return;
	combodata cd = Game->LoadComboData(BUSH_COMBO_ID);
	cd->Type = CT_BUSH;
}

But then, there is nothing (because it has no name or script type definition), to put it into any slot.
The function doesn't appear .

HELP, PLEASE  :tard:  :tard:  :tard: 

 


Edited by Bagu, 13 January 2020 - 06:15 PM.


#15 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 13 January 2020 - 07:26 PM

You don't have the first clue how a script works, do you? That looks like you just typed random words and expected it to work. I'd check a scripting tutorial, as you seem to lack the very basics


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users