Scripting an in game kit change
Greener
Member Posts: 430
I'm trying to create a modified "fallen" effect for my kensai kit when the parties reputation drops below 6, with the help of Jarno Mikkola over at gibberlings3 I've come up with the following:
IF
Kit(Player1,KENSAI)
ReputationLT(Player1,6)
Global(“FallenKensai”,”GLOBAL",0)
THEN
RESPONSE #100
SetGlobal(“FallenKensai”,”GLOBAL",1)
ActionOverride(Player1,AddKit(TRUECLASS))
Wait(5)
PlaySound("REPDOWN")
END
IF
Kit(Player2,KENSAI)
ReputationLT(Player1,6)
Global(“FallenKensai”,”GLOBAL",0)
THEN
RESPONSE #100
SetGlobal(“FallenKensai”,”GLOBAL",1)
ActionOverride(Player2,AddKit(TRUECLASS))
Wait(5)
PlaySound("REPDOWN")
END
ect...
Unfortunately one custom innate ability remains and isn't removed by the kit change, and I can't figure out why that one of eleven custom abilities remains, thoughts?
IF
Kit(Player1,KENSAI)
ReputationLT(Player1,6)
Global(“FallenKensai”,”GLOBAL",0)
THEN
RESPONSE #100
SetGlobal(“FallenKensai”,”GLOBAL",1)
ActionOverride(Player1,AddKit(TRUECLASS))
Wait(5)
PlaySound("REPDOWN")
END
IF
Kit(Player2,KENSAI)
ReputationLT(Player1,6)
Global(“FallenKensai”,”GLOBAL",0)
THEN
RESPONSE #100
SetGlobal(“FallenKensai”,”GLOBAL",1)
ActionOverride(Player2,AddKit(TRUECLASS))
Wait(5)
PlaySound("REPDOWN")
END
ect...
Unfortunately one custom innate ability remains and isn't removed by the kit change, and I can't figure out why that one of eleven custom abilities remains, thoughts?
0
Comments
1. The global "FallenKensai" is the same global for player 1 as for player2, which means only one of them can fall in any game.
2. Apparently the Rep of Player1 determines if Player2 becomes fallen or not. Maybe all reputation is housed by player1 in the game, but if not this seems like an issue.
Does this custom ability have an 8-character filename?
So if you had 5x per day of that ability, used two of them, then ran the AddKit, 2 of them would be permanently removed, while the other 3 that haven't be cast yet would remain.