Full Version : Help - using Two Triggers on a Spawner
xmlspawner >>Scripting Support >>Help - using Two Triggers on a Spawner


<< Prev | Next >>

PigPen- 09-15-2010
I am having a problem getting an XML Spawner set up to work with two Triggers. For the most part I have it working fine - it is just the second Trigger part that has me stumped.

I want the spawner to trigger and spawn a rare item if a player who has a RevealWand in his pack walks within 3 tiles of the spawner. That part I have working fine. Here is what I did to make that part work.

On the Main Spawner Gump I have entered the following two entries:
DailyArrows/movable/false/STEALABLE/true
SETONCARRIED,Wand Of Revealing,RevealWand/DELETE

And then on the Properties Gump I have made the following edits:
HomeRange 0
MaxDelay 0
MinDelay 0
ProximityRange 3
SpawnRange 0
TriggerOnCarried "Wand Of Revealing,RevealWand"

This works perfectly. When a player with a the reveal wand walks within 3 tiles of the spawner the DailyArrows spawn and the wand is Deleted. Perfect.

Now here is where my problem begins. I also want to add a Stealing Skill check on the spawner to determine if the DailyArrows will spawn. I want to do this because eventually I want different rares to require higher levels of Stealing Skill in order to be to be revealed by the RevealWand.


So . . . I added this next edit to the Properties Gump:
PlayerTriggerProp "skills.stealing.value > 49"

Now when the Player walks within 3 tiles the RevealWand gets Deleted but the daily Arrows do not spawn. No good.

Do I need to set something else for all this to work?
Is one of my settings conflicting with another?
Is it not possible to have a spawner work with more than one Trigger?

Any helps or ideas would be appreciated.

Thx

Jason- 09-18-2010
Try Skills.Stealing.Base instead of Value. I had this issue before. Let me know if it works.

Or, in the spawner entry you can try. This will conditionally spawn the arrows based on your skill after you've triggered the spawn with the wand.

CODE
#CONDITION,GETONTRIGMOB,Skills.Stealing.Base>45; DailyArrows

PigPen- 09-19-2010

*See Edit At Bottom*

Thank you soo much for the help. Here is what I found.

"Try Skills.Stealing.Base instead of Value."

This does not solve the problem because the Wand gets deleted before it can Trigger the Arrows to spawn.

However . . .

CODE
#CONDITION,GETONTRIGMOB,Skills.Stealing.Base>45; DailyArrows


This works perfectly with one small wrinkle. - the wrinkle is not the end of the world - I can work around it in my storyline that goes with the quest.

Here is what happens - If the player has a high enough Stealing Skill then the Arrows spawn and the Wand gets deleted (perfect). If the player does not have enough Stealing kill the Arrows do not spawn but the Wand still gets deleted. This is not what I wanted but in an odd way I think it is a good thing. *smiles*

By the way - I used
CODE
#CONDITION,GETONTRIGMOB,Skills.Stealing.Base>45; DailyArrows/movable/false/STEALABLE/true


I really appreciate your advice.

*bows*

EDIT: An Odd Thing. It seems the spawns are not 100% of the time when the conditions are met. I am not sure if this is because I have TriggerProbability set at "1" or if some other property needs to be changed. The other possibility is the Trigger for Deleting the Wand and the Trigger for spawning the Arrows are competing with each other. The Wand always gets deleted but the Arrows do not always spawn even when both conditions are met.

Jason- 09-19-2010
EDIT: I just re-read your original post. Get get both entries to spawn at once you need to set both spawn entries in the same sub group level, and make sure the max for the spawner is set to 2. I dont know if this matters, but put a space before and after that semi colon that seperates the condition with what your spawning. To prevent the wand from deleting if you dont ehave enough skill, put the same condition in on both entries.

PigPen- 09-20-2010
Thx Jason - I will try this when I get home - test it and post my results.

I appreciate the help a lot. Thx man.

PigPen- 09-20-2010
Okay - on the Main Spawner Gump I have this in the first line and set to spawn 1

CODE
#CONDITION,GETONTRIGMOB,Skills.Stealing.Base>45; DailyArrows/movable/false/STEALABLE/true


Then on the Main Spawner Gump I have this in the second line (one entry lower) and it is set to spawn 1

CODE
#CONDITION,GETONTRIGMOB,Skills.Stealing.Base>45; SETONCARRIED,Wand Of Revealing,RevealWand/DELETE


It may not look like it but I do now have a space before and after the semicoln.

Bottom Right on the Main Spawner Gump shows Count 0 Max 2
When I expand the Gump it shows both lines at Count 0 Max 1 Per 1 Sub 0


Now when the player has a Stealing Skill lower then 45 nothing happens.
However if he has a skill of 45 or greater the Arrows will only spawn about 40% of the time but the Wand gets deleted every time.

I need to have the Arrows spawn every time or if the Arrows do not spawn then the Wand does not get deleted.

PigPen- 09-20-2010
Okay Jason - I seem to have it working now.

I changed the two Spawner Entries from both being in Subgroup 0 to both being in Subgroup 1.

So far I have tested it 20 times and every time it works perfect.

Thank you so much for your help.

*bows*