Wizardum Posted August 25, 2010 Share Posted August 25, 2010 Hi everyone! I'm currently coding a token adding system for my mod, but unfortunetely it isn't working as I wanted, for some unknown reason actually. Here is the part of the code that should work, but it doesn't: set nextRef to Apple set nextRef to GetFirstRef 69 while ( nextRef ) if ( nextRef.GetDead == 0 && nextRef.GetIsReference player == 0 && nextRef.GetDisabled == 0 ) if ( nextRef.HasMagicEffect DSPL && nextRef.GetItemCount wizAAATokenDispelSummonDamage <= 0 && nextRef.IsSummonable ) PrintC "Token Added to the Actor" nextRef.AddItem wizAAATokenDispelSummonDamage 1 endif endif set nextRef to Apple set nextRef to GetNextRef loop So it browses through all actors in the same cell as the player, checks if it's dead, if it's the player and if it's disabled.If none of these are true, he will continue and then check if the actor has the Dispel effect on it, doesn't have that specific token and if is a summonable actor.This is the part that doesn't work, somehow it doesn't detect if the actor has the effect.I tried to remove the other two conditions, and it didn't detected the actor with the Dispel effect, I even tried to use the fire damage effect and still no luck. It's frustrating because I have the code from another mod, that mod works, and mine doesn't. My code is almost a copy, with a few less things that weren't really necessary. Know that I'm asking for help as a last resource, I usually find the way to fix bugs, this time I couldn't though. Thanks in advance :) Link to comment Share on other sites More sharing options...
slygothmog Posted August 27, 2010 Share Posted August 27, 2010 Hi everyone! I'm currently coding a token adding system for my mod, but unfortunetely it isn't working as I wanted, for some unknown reason actually. Here is the part of the code that should work, but it doesn't: set nextRef to Apple set nextRef to GetFirstRef 69 while ( nextRef ) if ( nextRef.GetDead == 0 && nextRef.GetIsReference player == 0 && nextRef.GetDisabled == 0 ) if ( nextRef.HasMagicEffect DSPL && nextRef.GetItemCount wizAAATokenDispelSummonDamage <= 0 && nextRef.IsSummonable ) PrintC "Token Added to the Actor" nextRef.AddItem wizAAATokenDispelSummonDamage 1 endif endif set nextRef to Apple set nextRef to GetNextRef loop So it browses through all actors in the same cell as the player, checks if it's dead, if it's the player and if it's disabled.If none of these are true, he will continue and then check if the actor has the Dispel effect on it, doesn't have that specific token and if is a summonable actor.This is the part that doesn't work, somehow it doesn't detect if the actor has the effect.I tried to remove the other two conditions, and it didn't detected the actor with the Dispel effect, I even tried to use the fire damage effect and still no luck. It's frustrating because I have the code from another mod, that mod works, and mine doesn't. My code is almost a copy, with a few less things that weren't really necessary. Know that I'm asking for help as a last resource, I usually find the way to fix bugs, this time I couldn't though. Thanks in advance :) Your using Vipers add bones script - that script works perfect, yours is confusing - go back to the origional and look at how it's done again. You say you have removed things not nesseccary, perhaps they were nesseccary? Link to comment Share on other sites More sharing options...
Recommended Posts