Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Vending Machine Script Help

Barry Moody
Registered User
Join date: 17 Dec 2006
Posts: 24
02-21-2007 11:55
I'm working on making a vending machine that uses back/next button prims to control a central display prim. I've successfully rigged the buttons to control the display based on a notecard's info (changes display prim's texture, sets correct values for name and price, etc) but now I'm at the step to actually apply the price so a user gets the payment dialog and I'm not sure of how to get this to work.

I've used:

llSetPayPrice (PAY_HIDE, [itemPrice, PAY_HIDE, PAY_HIDE, PAY_HIDE]);

after setting itemPrice but I think that the linking is making this behave incorrectly (pay option is on the right-click wheel, but greyed out.)

The display prim is the last in the link chain and the main vending script is located in this prim.

I'm trying to set the vendor up so that when a customer finds an item they want to buy, they'll right-click to pay, and then the vendor will supply the item from it's inventory.

Any ideas (I'm assuming I'm missing something I'll eventually kick myself for it being 'obvious'.)
Pale Spectre
Registered User
Join date: 2 Sep 2005
Posts: 586
Random Suggestion
02-21-2007 12:10
From the Scripting Wiki: "This function [llSetPayPrice] has no effect if the state that it's used in does not implement a money event handler."
Barry Moody
Registered User
Join date: 17 Dec 2006
Posts: 24
02-21-2007 12:42
Oops! Thanks :)