obj/button/attack |
Problem description:
This is a button on the hud I want it to use the verb attack for the player. But it seems to think the button wants to use attack not the usr. please help
ID:143365
Sep 28 2007, 11:28 pm (Edited on Sep 29 2007, 4:09 pm)
|
||
Code:
Problem description: This is a button on the hud I want it to use the verb attack for the player. But it seems to think the button wants to use attack not the usr. please help | ||
No I still get the problem
^ | Heres my attack verb
^ | Heres my attack button ------------------------------------------------------------ and it does nothing at all... when I had it at usr:attack it thought the button was using the attack! not the mob... | |||
That's because no arguments were being sent over (hint: You may want to read up on arguments in the DM Ref.)
A suggested alternative for Attack() is not to get a mob reference by means of an argument but defining it in the verb itself.<font color="black">.</font>. though I suggest it would be easier to locate() a /mob using get_step(). That may sound a bit complex and fancy, but all you have to do is read it carefully instead of skimming through. If you're lucky enough to use that noggin' when replying to me, you'll probably get a treat to the answer I was mentioning :P | |
You did not understand a word I said, neh?
When you do "usr.Attack()", the argument is null. Meaning in the verb, M is defined as nothing. Place the definition of who M is in the body of the verb, not in the argument. Hint: There's a (hidden) link posted to a helpful solution of a similar problem in my last post. Either find that link or use forum search ;/ | |
Please look up what each parameter for the procedure is next time.
Also, avoid using : unless you want runtime errors (such as when you remove a variable later on and forgot to delete all references to it)