Hey, folks
I wanted a fire extinguisher item in my quest (turning one type of damage combos into the next, following combo -just like the trigger->next function of generic combos), so I had the idea to modify a simialar lweapon code, that Venrob had written. (I already use the that script in one of my other projects ...it's great)
...it's the freeze water script.
-original code:
typedef const int DEFINE; typedef const int CONFIG; CONFIG MAX_ICE_LAYER = 0; lweapon script freezeWater { void run() { while(true) { freeze(ComboAt(this->X, this->Y)); freeze(ComboAt(this->X+15, this->Y)); freeze(ComboAt(this->X, this->Y+15)); freeze(ComboAt(this->X+15, this->Y+15)); Waitframe(); } } void freeze(int loc) { for(int q = 0; q <= MAX_ICE_LAYER; ++q) { mapdata scr = Game->LoadTempScreen(q); if(scr->ComboT[loc] == CT_WATER) ++scr->ComboD[loc]; } } }
I changed the script name to "FireExtinguisher" and CONFIG MAX_ICE_LAYER to MAX_CLEAR_LAYER
(I know, names doesn't matter, in this case)
But I had a big problem... (very intressting, btw)
When I changed this line...
if(scr->ComboT[loc] == CT_WATER)
to this...
if(scr->ComboT[loc] == CT_DAMAGE1)
...the script didn't do anything.
That's funny, cause I tried a bit around and I can replace CT_WATER with every other combo type and everything works fine.
....no matter if graves, Hookshootgrabs etc., they all turn into the next combo in the list.
It seems, it only doesn't work on damage combos.
Don't know why
I hope someone can help me.
btw, I decided to modify Venrob's script, cause I'm not a good scripter and can only write very simple codes on my own (still learning),
But there might be better ways, to do, whate I want.
I know I should rather use a code, the effects on a special combo ID (that I use for the "fire" damage combo), so the LWeapon won't work on other CT_DAMAGE1 combos, but yeah ...I have no idea how to script that.
Edited by Bagu, 08 September 2020 - 06:24 PM.