ID:146479
 
Ok... here is the problem im wanting to define a proc through a variable. i know that sounds weird but im wanting to tell a proc what move to use such as

mob/proc
SkillToBeUsed(skill)
src.skill()
mob/verb/UseMove()
SkillToBeUsed(PowerUp)


sorry about the code if its a little messed up. my brain is fried from me messing with this none stop and alot of other crap. But anyway what im wanting this code to do is when i click the verb UseMove i want it to set skill = PowerUp and then i want SkillToBeUsed to call src.PowerUp() instead of src.skill()

but everytime i try to do this the only thing it will tell me is that src.skill is a undefined proc... but it would be defined if it would just replace src.skill() with src.PowerUp()
Odine wrote:
Ok... here is the problem im wanting to define a proc through a variable. i know that sounds weird but im wanting to tell a proc what move to use such as

> mob/proc
> SkillToBeUsed(skill)
> src.skill()


Ah, what you need is call().

mob/proc
SkillToBeUsed(skill)
call(src,skill)()


mob/verb/UseMove()
> SkillToBeUsed(PowerUp)
>


Here you'd need /mob/proc/PowerUp for that.

Lummox JR