Full Version : Trigger On Carried and Gold
xmlspawner >>Q&A >>Trigger On Carried and Gold


<< Prev | Next >>

DazedAndConfused- 07-08-2006
Love the spawners. I wanna spawn an NPC, but only if a player is carrying enough gold to buy them a drink. The TAKEBYTYPE will remove the required sum I think, but I am having trouble with the syntax for checking that the player has at least 10 gold on them to make the purchase. Does the Trigger On Carried property support a check for stackable amounts or is it just unique items?

Discord- 07-10-2006
If I understand what you are looking to do... this should help.

QUOTE
TriggerObject
TriggerOnProperty

This allows for the ability to make player-proximity triggered spawning also dependent upon a property of any targetable item. This allows spawn chaining by making one spawner dependent on the state of another spawner. It also allows spawners to be made dependent upon things such as switches, doors, number of items, weight, or amount of gold in containers, etc.

To use this feature, select the TriggerObject property in the props list, then target the object to trigger off of. Then set the TriggerObjectProperty field with the property and the value to test for.

For Example: maxgold=20, or killcount>10, or open=true. Where maxgold, killcount, and open are property names on the objects. Supports <, >, and = operators for testing the values. Supports, int, bool, string, and double value types.


If you are looking to have the carried check done by the NPC when the player comes in range, you just need to set the condition field to check for the required amount of gold on the trigger line for the NPC

GETONCARRIED, gold>50
Text: Hey moneybags, get your butt over here and buy me a drink.


Least that is my understanding, but if I have that wrong Im sure Arte will correct me. tongue.gif

Dis~

DazedAndConfused- 07-11-2006
Thanks for the input. I can see how this would work as a spawner entry using:

IF/GETONCARRIED,gold>50/ do something here

I will have to play with it in the property test fieldslike TriggerOnCarried.