• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

5th grader! More questions

ErinRigh

Well-known member
Well if someone could point me in the right direction, I am trying to code

~ If there is something in your offhand, get out now

I can't find any examples of this script to base what i need but I believe it has to do with the Hero.OffHand tag, I just don't know what I am doing with it to tell the script that if Hero.OffHand <> 0, get out
 
If you want to test for a "tag is present" you use tagis[] which returns 0 for false and 1 for true.

Then your "transition" tells you where you are going to test for the tag. See Mathia's Location Location Location article for full details.

In this case we want to test the "HERO" container (ie our transition) or the top most level of the character for this tag.

Combined together you get:
Code:
~ If there is something in your offhand, get out now
doneif (hero.tagis[Hero.OffHand] = 1)

"Hero." is the location to test and "Tagis[]" is the function we are going to do and the "Hero.OffHand" is the tag we are testing.
 
Ok, my issue must be timing, where do I put this script for timing to make it work?
I have no "this is the perfect timing to use" answer. Timing is half experience and half trial and error.

The later you can test the better is the only "default" answer. :) So if you can do stuff at Final/10000 you are pretty guaranteed that all values/tags are set. But trying to make any OTHER changes to the hero at that timing is going to be hard.

What I would do is add debug statements to the script to see if I can figure out what is wrong and if the tag is present yet:

Code:
debug "Off Hand is " & hero.tagis[Hero.OffHand]
~ If there is something in your offhand, get out now
doneif (hero.tagis[Hero.OffHand] = 1)

Start at like Pre-Level/1000 and go up from that point.

Remember to do "Develop->Floating Info Windows->Show Debug Output" to be able to see the above debug statements.
 
Well I made it all the way to Render/1000 and I can't get it to display Off hand is 1 it always displays offhand is 0 and before you ask, yes I made sure something was in his offhand
 
Well I made it all the way to Render/1000 and I can't get it to display Off hand is 1 it always displays offhand is 0 and before you ask, yes I made sure something was in his offhand
Hmmm strange. I will take a look once I get back later. Going out for a bit. :)
 
Any luck SC?
When looking at the tags on the hero did you notice anything? Like you equip a dagger in the off-hand and when you searched the Hero for the tag Hero.OffHand you didn't see it? ;)

Meaning how could a script find it if you yourself don't actually see it? :confused:

So please equip weapon in the off hand. Then go Develop->Floating Info Windows->Show Hero Tags. Then look to see which "TAG" is on the actual hero that tells you a weapon is in the off-hand. :)

Once you know this you can then change your script to look for the correct tag.
 
Well the only tag that changes is Hero.OffHand, so I don't know what I am doing wrong. Here is the whole script I am working with

Code:
debug "Off Hand is " & hero.tagis[Hero.OffHand]

    ~If there is something in the offhand, get out now
        doneif (Hero.tagis[Hero.OffHand] = 1)

      ~ If we're disabled, do nothing
      doneif (tagis[Helper.FtDisable] <> 0)

      ~ If we fail the test for being speedy, get out
      if (hero.tagis[Encumbered.Light] = 0) then
        perform assign[Helper.SpcDisable]
        done
      elseif (hero.tagis[Hero.MedArmor] + hero.tagis[Hero.HeavyArmor] <> 0) then
        perform assign[Helper.SpcDisable]
        done
        endif

    ~Get abValue
      if (#levelcount[Gladiator] >= 18) then
        field[abValue].value += 4
      elseif (#levelcount[Gladiator] >= 14) then
        field[abValue].value += 3
      elseif (#levelcount[Gladiator] >= 10) then
        field[abValue].value += 2
      elseif (#levelcount[Gladiator] >= 6) then
        field[abValue].value += 1
      else
        field[abValue].value += 0
        endif

      ~ We passed, so add to our dodge AC.
      hero.child[ArmorClass].field[tACDodge].value += field[abValue].value

it is currently at Render/1000
 
Well the only tag that changes is Hero.OffHand, so I don't know what I am doing wrong. Here is the whole script I am working with
So when you equip a weapon on the OFF hand and you do "Develop->Floating Info Windows->Show Hero Tags" you see "Hero.OffHand"?

Really? Are you 100% sure? Because when I do the above I see NO such tag.

Please provide a screen shot of where you are seeing this tag please....
 
Here ya go mate
That is what I thought you where doing. You are looking at tags on the DAGGER pick NOT the hero. :(

Please go to the menu Develop->Floating Info Windows->Show Hero Tags. This means click on the "Develop" menu and then at the bottom click on "Floating Info Windows" and finally the "Show Hero Tags" option.

Notice I didn't say to "RIGHT" click on the dagger and click show debug tags. :D :)

Then you will be able to see the tags on the HERO instead of the tags on the Dagger. In which case you will see NO such tag of Hero.OffHand gets to the hero. Its a tag on the Dagger/Weapon/Pick only.

Help1.jpg

Help2.jpg
 
Back
Top