Jump to content

Photo

Slashable, non stabbable bushes needed

ffc or global script

  • Please log in to reply
38 replies to this topic

#16 Bagu

Bagu

    Fandomizer

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

Posted 13 January 2020 - 08:35 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

I only wanted to know, how to put it in the right slots, that you told me.

All the other scripts I loaded are working fine and I know how to use 'em.
I already said, please don't laugh my stupid trials.

You just gave me a constance and a void, but this doesn't appear in any slot.
That's why I asked if it is 2 scripts, one item and one global script.

I would be glad, if you will answer this question.

 
(btw: I never called myself a scripter)

 


Only this alone doesn't appear in any slot.

 

 
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;
}

One of my latest versions, while trying to make two scripts of it (global and item)

 

const int BUSH_COMBO_ID = 1966;
 

global script Bushes

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

item script Bushes

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

But in this case the report says, the scripts need a void run


So I had absolutely no other Idea, than doing THIS (which is probably the most awkward thing, I ever tried)

 

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;
}

global script Bushes

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

item script bushes

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

But THIS was succesful in compiling and now I have scripts, available to put in the slots.
Don't really know, if THAT was a good idea  :confused:


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


#17 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 13 January 2020 - 08:37 PM

So, to call a function like this, you just type `updateBushes();`. So you would make a void run, and put that once line inside it.
  • Bagu likes this

#18 Bagu

Bagu

    Fandomizer

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

Posted 13 January 2020 - 08:42 PM

Hope I understood right.
Gonna try now.

Thank you, very much.
REALLY...!

I know, it's not so easy, teaching me



#19 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 13 January 2020 - 08:51 PM

So, now that I'm at my computer and can actually type code,

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;
}

global script onSaveLoad
{
	void run()
	{
		updateBushes();
	}
}

itemdata script pickupUpdateBushes
{
	void run()
	{
		updateBushes();
	}
}

  • Bagu likes this

#20 Bagu

Bagu

    Fandomizer

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

Posted 13 January 2020 - 09:22 PM

Compiling successful, thanks

That's great!



#21 Bagu

Bagu

    Fandomizer

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

Posted 13 January 2020 - 09:56 PM

It works perfect...
 

Just one more thing I had to do (and I ACTUALLY made it on my own - really can't believe it),
was to combine the itemdata script pickupUpdateBushes with the slashscroll script
- cause this is already a script for the pickupslot, and involving one more item, seemed very sensless to me.

So this is the current code I use. ...works perfectly.

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;
}

global script onSaveLoad
{
	void run()
	{
		updateBushes();
	}
}

item script SlashScroll
{
	void run()
	{
		Game->Generic[GEN_CANSLASH] = 1;
		{
			updateBushes();
		}
	}
}

When I pick it up I can slash and solid generic combos turn into slashable bushes.

:love:  :love:  :love:  :love: 


 


Edited by Bagu, 13 January 2020 - 09:58 PM.

  • ShadowTiger likes this

#22 Bagu

Bagu

    Fandomizer

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

Posted 18 January 2020 - 03:38 PM

Error in the global onSaveLoad function.
Since I use I am very happy with it but now I found this one, single error.
(cause I guess it's been first time "I died" in during a testrun.

#23 Bagu

Bagu

    Fandomizer

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

Posted 18 January 2020 - 05:39 PM

If you die (and did not save before - active by player) continue is the same as retry. Like when you active the "no save on continue" rule.
When you die (and save after dying) everything's fine (you just have to start your game again).

But when you die after you picked up the slashscroll (combined with your pickupUpdateBushes script) and didn't save, since picking IT up, the save/continue screen is skiped end the game ends without saving.

I can handle that by a save point in the room, and a line in the related string, that advises the Player to save, at this moment.
...the rest of the gameplay will need to use a "secret of mana fashioned" save system (dying without saving would means to return, to the last saved state), if the error can't be fixed.
That's not a real problem, but it's a bit strange in a Zelda Game.


Sorry for the long break between my last, two posts. Battery was down...

Edited by Bagu, 18 January 2020 - 05:40 PM.


#24 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 18 January 2020 - 11:26 PM

There is a 0% chance this is related to this script. Either you checked a QR that causes this, or you have another script causing this.



#25 Bagu

Bagu

    Fandomizer

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

Posted 19 January 2020 - 12:49 AM

But it NEVER happend before I loaded this script in the onSaveload Slot.
And the problem is only related to the save/load Function.
And if you saved AFTER picking up the related Item and chose continue after dying, everything works fine.
And just like it should be.
There only seems to be a problem with the state before generating the bush change.
Did you try it?

I only tried it in my current quest.
The QR setting is correct
...first thing I checked, when this bug appeared.

Gonna make a test qst.file, where I only load this one single script combi (item script + global onSaveLoad)... if there's no error, it has to be a problem with my other scripts.
...if it's still causing the same error, there has to be another reason, and it can't be a problem of my other scripts

Edited by Bagu, 19 January 2020 - 12:50 AM.


#26 Bagu

Bagu

    Fandomizer

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

Posted 19 January 2020 - 02:09 AM

I made the update an ffc script (placed on all the screens, that use these bushes) so, instead of updating on save/load, it datas up on screen init, each time you enter a screen with recent bushes.
Since I removed it the onSaveLoad slot everything works fine again.
Just like before.
I still habe NO IDEA, what could cause my problems with the global OnSaveLoad version, but I found a solution that works perfect for me l.
...so I'm absolotely happy.

Thanks for your help, once more.
I really like this script.

#27 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 19 January 2020 - 02:12 AM

I made the update an ffc script (placed on all the screens, that use these bushes) so, instead of updating on save/load, it datas up on screen init, each time you enter a screen with recent bushes.
Since I removed it the onSaveLoad slot everything works fine again.
Just like before.
I still habe NO IDEA, what could cause my problems with the global OnSaveLoad version, but I found a solution that works perfect for me l.
...so I'm absolotely happy.

Thanks for your help, once more.
I really like this script.

It only needs to update once, ever. It updates permanently once it updates, until you go back to the save select. Using an FFC for it is a total waste.

All `onSaveLoad` does, is runs something when you load from save. It's not even new for 2.55, it's actually what USED to be called `onContinue`, but it was renamed to more clearly indicate what it does. It's just a script that runs when you load a save. It does not affect saving, in the slightest, at all, and it causing `continue` to send you back to the title screen is 100% impossible and there is no way that is happening.

 

In short, `onSaveLoad` has NOTHING TO DO WITH SAVE, AND HAS A 0% CHANCE OF AFFECTING IT. What other scripts do you have set? What QRs do you have set? Something else MUST be causing it.



#28 Bagu

Bagu

    Fandomizer

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

Posted 19 January 2020 - 02:33 AM

I still try to figure it out.
It's the only script I used onSaveLoad, no combi with other Scripts.
...the rest of my Script is still the same I pasted on pastebin.

After I removed it from the slot, all save/continue functions work as usual.

The quest rules are the same as before.
There are only errors when I use the Script in the onSaveload Slot

Edited by Bagu, 19 January 2020 - 03:00 PM.


#29 Emily

Emily

    Scripter / Dev

  • ZC Developers

Posted 19 January 2020 - 02:45 AM

I still try to figure it out.
It's the only script I used onSaveLoad, no combi with other Script.
...the rest of my Scripte, that is still the same I pasted on pastebin.

After I removed it from the slot, all save/continue functions work as usual.

The quest rules are the same as before.
There are only errors when I use the Script in the onSaveload Slot

What is the exact error you are having? You said that hitting continue is doing retry? That sounds entirely broken....



#30 Bagu

Bagu

    Fandomizer

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

Posted 19 January 2020 - 03:19 AM

Continue is handeled like retry, till you picked up the recent slashscroll item, then everything works as usual.

...and when you die AFTER picking it up (and didn't save the pickup) the whole save/Continue screen is skipped, and you get "thrown back" to last save state (if completly unsaved before, you're restart from the beginning)

Edited by Bagu, 19 January 2020 - 03:21 AM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users