Senior Member
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797
|
All I did was copy and pasted what you had
hero#fieldval:acIsWild <> 0 |
#11 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
try
fieldval:acIsWild <> 0 |
#12 |
Senior Member
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797
|
This is the error I get by trying the above
Tag expression accessing field value 'acIsWild' for pick 'grpHSFMAP4' that doesn't contain field |
#13 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Oh yeah. fieldval can't be used with hero#, only tags can be used with hero#.
In the develop menu, choose "Floating Info Windows", then "Show Hero Tags". Try switching wild card on and off - is that field also generating a tag? If so, you can test for that tag's presence, instead of testing the field directly: hero#XXXXX.YYYY <> 0 If there isn't a tag to work with, scratch this idea of mine, and add a prereq to the Edge to make sure the user selected Wild Card back on the configure hero form, and add an eval rule to something that all spaceships share, that will, if they're a wild card, complain until the user purchases that edge. |
#14 |
Senior Member
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797
|
How would I write it. I have been trying to get this to work for 3 hours and have had no luck - sorry about being such a pain but this is the last thing I need for total completion of High-Space. Thanks in advance for your help.
|
#15 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Is there a tag that means "we're a wild card", and is present while wIsWild = 1, but not present while wIsWild = 0?
If so, what is that tag? Or were you asking me about how to code the prereq/eval rule? |
#16 |
Senior Member
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797
|
Sorry - I didn't see any tags when doing what you told me to do -So i thought to go and try it with the pre-req/eval rule? I like that idea better anyway. I think it will work a lot smoother with mechanics of the program, doing it that way. I tried working with it but for the life of me I couldn't get it to work right and give up and ask for help. Thanks for the quick response, this is the last hang up I have for the High-Space data file, if I can get this taken care of. I can resend it to John and CapeCrusader. to have it complete as far as I can tell.
|
#17 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
What have you tried? Where did you run into trouble?
|
#18 |
Senior Member
Join Date: Dec 2009
Location: Independence, Mo
Posts: 797
|
On the edge I checked the box that said "Wild Card Required which makes the edge need to be a Wild Card to take the edge, there is the Pre-Req for the edge. Then I made a mechanic: It works if your a Wild Card - It tells you that you have to have the Wild Card Starship Edge and when you take it the warning goes away, but if you are not a Wild Card it still want you to pick the Wild Card Starship Edge. I know I'm missing some part of the script, I just can't figure it out. Here is what I got.
Mechanic Phase: Validation Priority: 5000 if (herofield[acIsWild].value <> 0) then if (hero.tagis[Edge.edgHSFMWCS] = 1) then validif (hero.tagis[Edge.edgHSFMWCS] = 1) Done endif endif |
#19 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
Remember - eval rules are NOT valid when you start the script, so if you want to leave the script at some point - like for example if the "are we wild" test failed, you want to say that you're valid at that point by setting the special @valid variable = 1 (or to be more precise, equal to any non-zero value).
Here's now I'd write that: Code:
~this only applies if we're a wild card character validif (herofield[acIsWild].value = 0) ~if so, we're required to choose the edge that makes a spaceship a wild card validif (hero.tagis[Edge.adgHSFMWCS] <> 0) |
#20 |
|
|