Thank you!!!!!!! : D
-Strike
Edited by strike, 02 April 2014 - 02:59 PM.
Posted 02 April 2014 - 02:59 PM
Edited by strike, 02 April 2014 - 02:59 PM.
Posted 02 April 2014 - 03:01 PM
Posted 02 April 2014 - 03:03 PM
I want it so that each time you jump a certain Roc's feather uses three bombs. How can this be done?
Thank you!!!!!!! : D
-Strike
Well in the item editor go to the Pickup tab and put in the "Counter Reference" drop down tab Bombs, Then below it put in -3, This (should) then use 3 bombs when you use the rocs feather.
Posted 02 April 2014 - 03:08 PM
Posted 02 April 2014 - 03:13 PM
Are you sure that works? I can't use ZQuest right now.
-Strike
I am sure it would work, But I am not sure if the Rocs feather would stop working after all the bombs ran out.
Posted 02 April 2014 - 03:16 PM
const int RocsFeatherItemID = 0; //item ID of Roc's Feather item script UseUp3Bombs{ void run(){ Game->Counter[CR_BOMBS] -= 3; } } global script active{ void run(){ while(true){ if ( GetEquipmentB() == RocsFeatherItemID && Game->Counter[CR_BOMBS] < 3 ) { Link->PressB = false; Link->InputB = false; } if ( GetEquipmentA() == RocsFeatherItemID && Game->Counter[CR_BOMBS] < 3 ) { Link->PressA = false; Link->InputA = false; } Waitframe(); } } }This is how I'd script it, anyways. I'm sure there's a different way to script it, though.
Posted 02 April 2014 - 03:54 PM
Posted 02 April 2014 - 04:04 PM
Yeah, that should work. Also, it shouldn't lag the game at all because this is a very small script.
Edited by DaviAwesome, 02 April 2014 - 04:04 PM.
Posted 02 April 2014 - 04:20 PM
I was wondering why you used the global script, instead of just using an if statement on the item active script, and then I realised that your method is actually a bit more elegant than what I would have done. That's a rather useful way to handle counter-based items that aren't fully-scripted.
Many of my items are fully scripted, so I would have tied the CR check to the item activation script, rather than the global, starting with something like this:
if Game->Counter[CR_BOMBS] < 3 ) { Game->Counter[CR_BOMBS] - 1; //Do item functions //produce sfx. } else { //produce error sfx return; }
With an item that already has a function, this wouldn't work well, because it wouldn't stop the item from using its in-built abilities, so linking it to the global is good, although it does mean you need to do a lot of bookkeeping if you want to change anything, because the global isn't using a variable.
What I'd suggest here, is to create a global int for rocDCounter, and set the value of this on the item pickup script, and use this assign in the global functions for the amount to decrease the counter; or for the counter to use.
The assign makes it a lot more flexible, and would allow you to control the value of counter items used with upgrades to the item, if you would ever want to do that.
I do have to ask: Why bombs for Roc's Feather?
That seems quite a bit, illogical. Are you making a CastChaos-esque quest, so we should expect torches to be activated by arrows, and bush triggers to require the boomerang?
Edited by ZoriaRPG, 02 April 2014 - 04:28 PM.
Posted 02 April 2014 - 04:40 PM
Posted 02 April 2014 - 07:56 PM
With all the explosives in the land of Hyrule, I am less shocked that evil forces go after the Triforce to dominate the world. They could just as easily stock up on all the easily acquired detonable items, and demolish entire kingdoms. Now, we know why bombs are such valid currency and are available in such abundance: You need them to fly.
Just try that in real life: Explode some C4 under yourself, and see how far you can go! Huzzah!
When you say 'jump an entire screen', ignoring how little sense 'bomb boots' makes, what in the world do you mean? Does it move link up a floor in DMAPs? Does it move link to the same X/Y coordinates one screen away? If so, is this based on the direction he is facing? What happens if the combo at those coordinates is not walkable? Does it work everywhere? What if there is no adjacent screen?
It's so absurd, as to be marvellous, but I don't understand how you intend that to function.
By the way, if you eat a bomb, and it explodes in you, scattering your remains, does that count as you moving, or does is it more like 'In Soviet Russia, bomb moves you!' ?
Posted 03 April 2014 - 02:51 PM
Posted 04 April 2014 - 05:03 PM
Save me! I just remembered I'm a total n00b at scripts! Even uploading them!
How do you add a global script into my game. Sorry, I basically never use scripts. Sorry!
Anyone able to help?
-Strike
Posted 04 April 2014 - 05:22 PM
Save me! I just remembered I'm a total n00b at scripts! Even uploading them!
How do you add a global script into my game. Sorry, I basically never use scripts. Sorry!
Anyone able to help?
-Strike
Just like a normal FFC script, But into the global tab in the script assigner thing (Where you put in imported scripts).
Posted 04 April 2014 - 05:43 PM
Do you need import "std.zh"; in the front because when I put that it won't compile. If I take it away it says BOMB_CR is undefined.
What am I doing wrong?
Thanks for the help!
-Strike
0 members, 0 guests, 0 anonymous users