ID:272838
![]() Apr 7 2009, 3:34 pm
|
|
How do I make it where when some one joins the game they do not get any verbs? Like when you press join on the hub or pager and it loads and its on the pop up login or on the map you don't have verbs like emote, attack, report bug, train...ect.
|
![]() Apr 7 2009, 3:53 pm
|
|
I'm not absolutely sure on this but I think it's something along the lines of src-=verbs and then add them when needed.
|
I think you mean nulling their verbs list? But your way could work. I didn't test it to see if it worked or not :\
verbs = list() //empties out the verbs list :3
|
You can't modify the verbs var's value (it's read-only), so assigning it to something different won't work; you have to clear the existing list. Unlike user-declared vars, what you're able to do with various built-in vars varies (one case: various vars can't be set to inappropriate values, e.g. you can't set density to a text string), and even list access does as well. Here's what you can and can't do with the built-in list vars, mostly copied from an old post of mine:
CAN DIRECTLY MODIFY VALUE: atom.contents atom.overlays, atom.underlays client.screen CAN'T DIRECTLY MODIFY VALUE: atom.verbs client.verbs* - also, len always shows 0 mob.group* savefile.dir * "special list may not be cut" - cannot use Cut() or change the len of this list. (in order to empty these lists, you can still remove them from themselves, i.e. List -= List or loop through them) CAN'T MODIFY LIST AT ALL (neither add/remove items, cut, nor directly set): proc.args, [verb.args] world.contents datum.vars (can only modify existing associated values) |
As others have implied, to get rid of players' verbs you can empty their mob's verbs list. Normally, a quick way to empty lists is to use Cut() or change their len to 0, but some special (built-in) lists don't allow this (as outlined in my previous post).
Note however that verbs may also be attached to other objects than the player's mob, so doing the above will still not necessarily eliminate all of the player's available verbs. Other than verbs on the mob, the options are:
<small>EDIT: Oops, wrong word.</small> |