I'm trying to make it so that when a person eats this piece of fruit they gain other verbs then the item disapears (not the verbs). I'm stuck on what i should put in a certain section of code where the question marks are. Is there a certain proc i can make to allow me to put in the verbs i want the usr to have?
obj
Cursed_Fruit
icon = 'cursed fruit.dmi'
dark_dark
name = "Yami Yami No Mi"
icon_state="Dark Dark Fruit"
verb
Eat_Yami_Yami_Fruit()
??????????
del src
ID:156679
Aug 16 2010, 11:22 am
|
|
Blazzier wrote:
I'm trying to make it so that when a person eats this piece of fruit they gain other verbs then the item disapears (not the verbs). I'm stuck on what i should put in a certain section of code where the question marks are. Is there a certain proc i can make to allow me to put in the verbs i want the usr to have? You'll want to add the verb (specified by its type path) to <code>usr</code>'s <code>verbs</code> list. In the context of your code (assuming you put correct 'set' settings later on):
usr.verbs += /mob/something/verb/my_verb
Or if you want to add many verbs
usr.verbs += typesof(/mob/special_verbs/verb)
|
In response to Unknown Person
|
|
THANK YOU SO MUCH that's exactly what I needed! now i can continue
|
In response to Blazzier
|
|
Be warned Blazzier when handling objects and verbs expecially the kind that would otherwise be deleted on a logout.
When you logout any verbs that are not technically saved will be deleted so you need a way to remember what verbs you have at all times. one way is to make the save file save every verb you have or another way could be to write to a list and then have a proc on load reverb you as per that list. |
In response to Midgetbuster
|
|
ok thanks
|
In response to Midgetbuster
|
|
so even with a regular saving system i would need something more to give the person his or her verbs back?
|
In response to Blazzier
|
|
something like
if(usr.key == "") (tab)src.verbs +=/blah/blah/etc I think that will work for login. |
maybe usr.verbs += Look below
mob.verbs +=/mob/verb/Blahblah
m3
something like that. Can't remember correctl >_< im sure of the += tho.