var/amount = input("what you want","") as num
cost = amount*cost
or something like that, the problem is creating multiple objs, i dont kno how to create a bunch of objs, instead of one.
ID:271351
May 20 2007, 8:02 am
|
|
hi, im trying to make it so you can buy x amount of the same item like
var/amount = input("what you want","") as num or something like that, the problem is creating multiple objs, i dont kno how to create a bunch of objs, instead of one. |
Hope this helps. It's self-explanatory.
Note: the while(X) proc will repeat everythign under it as long as X is true (not "0" or "null") mob/NPC/verb Any questions ? |
In response to Gooseheaded
|
|
@gooseheaded: heh heh, I read your post first and thought "that guy's code ought to work, why is he asking how to make multiple objects?". Lesson learned: read the posts in order.
|
In response to Gooseheaded
|
|
Comic Book Guy: "Most Helpful Code EVER!" Thanks Goose! |
In response to Gooseheaded
|
|
Why all the repeated code? Why while() instead of for()?
mob/shopkeeper Untested, might not actually compile without minor syntactical changes (In particular, I don't think 'new o.type(usr)' compiles), but the changes that are required should be obvious. |
"you" would be whatever the person buying things is in this case, and "/whateveryoubought" is the type path of the thing being purchased.