ID:155095
 
Hum...I'm curious,i'm still doing my mud monster battle project,and i'm curious about a thing,
on my game,the actions will have their procs,but i wan't to call the proc when it's needed.
Like as...
After showing the skills selection,it calls the proc "Do(A,T)" from the skill at variable "action".

So,how can i do that?
Nakano15 wrote:
Hum...I'm curious,i'm still doing my mud monster battle project,and i'm curious about a thing,
on my game,the actions will have their procs,but i wan't to call the proc when it's needed.
Like as...
After showing the skills selection,it calls the proc "Do(A,T)" from the skill at variable "action".

So,how can i do that?

http://www.byond.com/docs/guide/ Chapter 6.


~Deathscyth
In response to Deathscyth15
Deathscyth15 wrote:
Nakano15 wrote:
Hum...I'm curious,i'm still doing my mud monster battle project,and i'm curious about a thing,
on my game,the actions will have their procs,but i wan't to call the proc when it's needed.
Like as...
After showing the skills selection,it calls the proc "Do(A,T)" from the skill at variable "action".

So,how can i do that?

http://www.byond.com/docs/guide/ Chapter 6.


~Deathscyth

Sigh...Let-me explain.
The variable action,is the variable that have the skill info.
I've tried to put "action.Do(Attacker,Victim)" to try to call the procedure of the skill,but what happens is "Tamers Network.dm:513:error: action.Do: undefined proc",i've tried too other many ways,but ever goes wrong.

Obs:.Do is the proc i'm trying to call.
In response to Nakano15
Your not being very clear, it looks like your having Code Problems. Go there, show your code and ask for help. Because as of now you don't seem to understand how to call procs, if so, go to the guide, if not, post your code problems.
Look at the call()() proc in the reference.
In response to Ill Im
Ill Im wrote:
Look at the call()() proc in the reference.

Thanks,but i think i'm doing anything wrong...
I put
                action = "[action]/proc/Do"
call(action)(Attacker,Victim)

but it's calling the wrong variable,it's calling the MonsterSelection variable,that is all-diferent thing.

@MegaBlazer,Hum,you're right.
But the topic have been made,so,let's finish this topic first.