Question:
So I want to make a move where a user is able to copy and turn into an opponent that is surrounding them. I just need to know how I would be able to start that cause honestly I'm pretty stuck.
Oh and also, they shouldn't be allowed to copy the opponent's stats, only their moves. So in retrospect, it would kinda be like Zorua in Pokemon and what move he uses.
Many thanks
~ Excalibur
Thanks for the quick reply bro!
Awesome, now I can get started on this. Thanks for the info :P ~ Excalibur |
Also, what if the user has some of the same moves as the target, is there any way that we can avoid having duplicates?
|
Verbs do not add twice.
You'll want to keep track of the verbs you added if you want to remove them, to ensure you don't remove any that were not added. I think you can do the following to do that: for(v in typesof(/mob/moveuser/verb)) |
In response to MisterPerson
|
|
MisterPerson wrote:
+= with lists will only add things that aren't already in the list. This is not true; it's only true with a special list like verbs. |
In response to MisterPerson
|
|
MisterPerson wrote:
+= with lists will only add things that aren't already in the list. Don't you mean |= ? |
Oh, so actually, sorry if im annoying you, but is there any way you can just select the verbs from a certain category?
|
In response to Gogeta9000
|
|
Gogeta9000 wrote:
Oh, so actually, sorry if im annoying you, but is there any way you can just select the verbs from a certain category? I don't believe so, only by the specified path.
verbs+=typesof(/mob/PATH/verb)
|
You actually can get verbs in specific categories. Most people don't know it, but the verbs inside of the verb list have variables, but the compiler isn't really exposed to them, so you have to use the : operator to access them.
mob TestOutput() will output all of the names and categories of all the verbs you have in your verbs list. |
In response to Nadrew
|
|
Nadrew wrote:
You actually can get verbs in specific categories. Most people don't know it, but the verbs inside of the verb list have variables, but the compiler isn't really exposed to them, so you have to use the : operator to access them. > mob TestOutput() will output all of the names and categories of all the verbs you have in your verbs list. Interesting o: |
In response to Kozuma3
|
|
Kozuma3 wrote:
Nadrew wrote: > > mob TestOutput() will output all of the names and categories of all the verbs you have in your verbs list. an example of this - with both explicit and implicit typing - has been in the Red Book forever. There is a few things I should expand in there, though... |
/mob/moveuser/verb/example_move()
Then let's assume the target is target and we're giving the verbs to src:
Another way to do this that you may not be a good idea: