• 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

Gizmo's and Magic Armor....

ShadowChemosh

Well-known member
In simple terms I am trying to write a "pre-requisites" script on a "Item Power" that checks to see if the custom armor is made from Dragonhide material.

My issue is trying to figure out the right wording to transition from the Item Power to the Gizmo and to test if "eDragon" is live.

After much reading I was able to write the following script:
Code:
foreach pick in hero from BaseArmor where "thingid.iMagArmor"
    foreach pick in eachpick.gizmo
      debug "gizmoid: " & eachpick.idstring
    nexteach
nexteach
Which gets me the following results:
Code:
gizmoid: lCommon
gizmoid: gCustMagic
gizmoid: ipDADisch
gizmoid: eDragon
gizmoid: arHide

So I am getting close as I can see the "eDragon" but I would like to be able to transition directly to the Thing that the "Item Power" is attached to. As I don't want to test every magic armor on the hero just the one I am attached to.

In example:
Code:
If (gizmo.container.childlives[eDragon] <> 0) Then
  @valid = 1
Endif

OR 

If (gizmo.tagis[thingid.eDragon] <> 0) Then
  @valid = 1
Endif
I have tried dozen of different combinations and searched the forums and searched Savage Tide for help but no luck.

Any grand master able to tell me the verbiage I need to transition from a "Item Power" to the gizmo and test that "eDragon" is on the gizmo.

Thanks
 
Doesn't

Code:
childlives[]

by itself work?

The default location for prereqs is always container., so the dragonhide child you're looking for is in the same container you want to add this to.

In a script, container.childlives[].

(the item power doesn't have a gizmo of its own, so transitioning to the gizmo of that power is a failed transition. I think what you may be looking for is parent.gizmo., which gets you to the same place as container.)
 
Doesn't

Code:
childlives[]

by itself work?
LOL very possibly it could. I guess I was just WAY over thinking things. I will give this a try tonight. :)

I admit for Gizmo's I am still not super clear on how they work and how things transitions from parents, container, and gizmos. :confused: Just need some time to work with them so that an visualize them in my head.

Thanks
 
For future readers yes the simple childlives works great. This can just be placed on a "Expr-reqs" as follows:
Code:
childlives[eDragon] <> 0

Man was that easy! :p
 
Back
Top