I'm very much a graphics kinda guy, then a quest maker. That's a lot, so I don't even try to script really, I mean I have a little, but when I read the scripting tutorials posted here the author would go from step 1 to step 2, and suddenly I'd be like, wait- there's 5 steps missing that I'm just supposed to understand? Clearly it was written for people with more than zero knowledge of programming...
Anyway scripters are generous to make scripts for me and sometimes they get mildly irritated when I ask for easy favors, so I'm going to try a little scripting here. I figure people would rather correct my attempts to help me learn instead of just doing it for me.
Today I'm going to try combining these two scripts. I might do it wrong, if so, I hope to be corrected so I can learn. Here goes:
Script 1:
ffc script CreateItem { void run(int itemID) { item i = Screen->CreateItem(itemID); i->X = this->X; i->Y = this->Y; } }
Script 2:
ffc script CreateHoldUpItem { void run(int itemID) { item i = Screen->CreateItem(itemID); i->X = this->X; i->Y = this->Y; i->Pickup=IP_HOLDUP; } }
My attempt to combine:
ffc script CreateItem2 { void run(int itemID, int Pickup) { item i = Screen->CreateItem(itemID); i->X = this->X; i->Y = this->Y; { if (Pickup > 0) i->Pickup=IP_HOLDUP; else i->Pickup=false; } } }
I expect to be combining global scripts soon, global scripts are so freaking intimidating to me, because if something's wrong it can affect multiple scripts which can be quest-breaking. I much prefer ffc and item scripts because they affect only themselves, but sometimes ya need a global.