Re: I wrote a script!!! but it ain't dun wurk good...
Quote:
-Howabout some script showcase/tutorials? What I mean is kind of like here, where you have a really simple script and variations on it, where each one can be broken down a bit and explained "why it works". While not really a tutorial exactally, it would certainly help out alot of the script-challenged masses that are smashing their faces against the keyboard. (myself included)
:computer: ....... :confuse2: ........... :angry: .......... :mad2: ........... :banghead:
Yes, if every script were broken down and explained like they are here, it would be so much easier for people to learn how to script. To be honest, I think I have learned to script from this thread alone (and a book on beginning c++). Now we just need to get evry one to label their scripts like this.
Re: I wrote a script!!! but it ain't dun wurk good...
Still can't figure this one out.
Code:
import "std.zh"
item script level_test
{
void run() {
int ItemClass = 1;
if (Link->HP <= 16 && // 25
Game->Counter[CR_RUPEES] >=1) {
ItemClass = 2;
Game->Counter[CR_RUPEES] -= 1;
}
else
{
ItemClass = 1;
}
}
}
ItemClass = 2; is the only statement that would compile. Everything else say's ->(not a valid pointer) or error (you suck at scripting). My computer is not nice. ;)
The game takes away one rupee though....
Hey C- did you use any thing like what i'm trying to do with that badass swordman type script. I didn't see it in Zodiac though. Did you remove it? Maybe I could just modify that?!
Re: I wrote a script!!! but it ain't dun wurk good...
I don't see anything particularly wrong with that, other than the fact that it drains Link's rupees without actually doing anything.
Unless it doesn't like the variable name "ItemClass", since that's also the name of a built in type.
Re: I wrote a script!!! but it ain't dun wurk good...
Quote:
Originally Posted by
Gleeok
Hey C- did you use any thing like what i'm trying to do with that badass swordman type script. I didn't see it in Zodiac though. Did you remove it? Maybe I could just modify that?!
Swordsman? You mean the Aries Boss? (The big centaur that slashes at you with his big ol' saber) or the Aries Saber weapon (Three-tile-long sword slash in front of the player as a custom weapon)? Or something else...?
Re: I wrote a script!!! but it ain't dun wurk good...
Oh yeah! hehe. I found it. Just forgot what it was called, but once I started to look at the code I figured out which one was which.
if link dir ==1 then weapon y = link y - 16... that's genious! I couldn't figure that out...
All in all that's some heavy stuff to look at right now for me, especially since you have a whole community of of these buggers that are dependant on each other. But you did manage to change weapon damage in there, so if I can figure out what the hell you did, I could add some if statements and take out some other stuff. tweak this and that maybe...
Quick question; For these ffc that are "hard coded", do you need to set them to each screen? That could take awhile. If not, How'd you bypass having to do that altogether.
PS- thanks for writing notes on the stuff btw. ;)
Re: I wrote a script!!! but it ain't dun wurk good...
Hard coded FFCs? They're all "hard coded", and there's no way to "un-hard code" them.
If you need certain scripts to run on each screen, then you can check off the box named "Carry over", and that FFC will (surprise) carry over with Link. You then need to create the FFC on each screen that Link could possibly start on (any screen with a Green Square, pretty much).
Re: I wrote a script!!! but it ain't dun wurk good...
My commenting isn't great, but it gets the job done.
The way I'm doing custom weapons is this. Each custom weapon gets an item script that sets up FFCs 29, 30, and 31 (which are set aside and only ever used for custom weapons). Then there's an FFC script that runs on every screen, on FFCs 29, 30, and 31. I use carryover FFCs (which means you need to set up the FFCs only on every screen you can continue on). The FFC scripts activate once they are set by the item script. My trigger is the Combo of the FFC. Once FFC 29, 30, or 31 notice that their combo has changed to one of the custom weapon combos, they set their damage, move accordingly, watch for enemy collisions, and apply enemy damage if necessary.
This means that the FFC weapon script gets REALLY complicated with nested if-else statements. In the more recent, yet-unreleased version of Zodiac I've added the Virgo Tribeam (two in front, one out your bottom), and the Cancer Charge (which gets stronger when you hold down the A button). So the general weapon script is getting pretty bloated.
Re: I wrote a script!!! but it ain't dun wurk good...
Quote:
This means that the FFC weapon script gets REALLY complicated with nested if-else statements. In the more recent, yet-unreleased version of Zodiac I've added the Virgo Tribeam (two in front, one out your bottom), and the Cancer Charge (which gets stronger when you hold down the A button). So the general weapon script is getting pretty bloated
.
I can't wait for the next version. That sounds awesome..what do you got though, like 5 more to get done.heh.
It seems the type of weapon scripts that you've assembled is kind of like what i'm trying to make, exept that I only need very basic ones. I've got the rapid fire, the perpetual potion script, and the Door buster, Thanks again guys, And only need a few more to replace candle, whistle, N.Love, and some melee weapons. I'll be trying to analyze the mass of weapon scripts you've put together in Zodiac to try and get a better understanding of how to create some of that stuff. Who know's, I might end up with something completely sick that I can show off in S. Showcase. LOL! Well I can assure you that more questions will be forthcoming, it's only a matter of time.
PS-Yes i'm an FFC dumbass that never bothered to mess with all the 2.5 features untill now. Forgive me. ;)
Re: I wrote a script!!! but it ain't dun wurk good...
OK, I wroted up this one real good like...but it ain't dun work neither..
Code:
import "std.zh"
//========================================================
// FFC SCRIPT TRIGGER SECRETS (no pun intended) hah;)
// D0 - D2; Items neccesary. Check std.zh for values
//========================================================
ffc script trig_secret2{
void run(int have_item, int have_item2, int have_item3){
while(true) {
if ( (Link->Item[have_item] == true) && (Link->Item[have_item2] == true) &&
(Link->Item[have_item3] == true) && (Screen->NumNPCs() >= 1) ) {
npc enemy_trig = Screen->LoadNPC(1);
enemy_trig->HP = 0;
Waitframe();
}
}
}
}
Here is the original, which somehow doesn't work also....
Code:
ffc script trigger_secrets{
void run(int have_item){
if (Link->Item[have_item] == true && Screen->NumNPCs() >= 1){
npc enemy_trig = Screen->LoadNPC(1);
enemy_trig->HP = 0;
}
}
}
Can anyone tell me why it doesn't actually do anything????
Re: I wrote a script!!! but it ain't dun wurk good...
Thats odd it should work fine. I would try debugging the script by putting a very visible response inside the {} of the if statement. (something like creteing an enemy something you are sure not to miss) this will test to see if the if is bieng executed at all. Also you might want to add a while loop and waitframe to the simpler code and try running that again. Do all the simple checks, did I put the right item ID in, does Link actually have the item (I know it sounds dumb but you would not beleve how many times "a repair man is called becuse the computer is not plugged in" :D )