ID:178233
 
consider this: I have a DblClick() on the usr so that when the usr double clicks themselves it calls a proc that uses an attack. Now unfortuanetly I have no way to define the enemy. I use src but ofcourse it then attacks the user instead of the target. I tried defining vars but it gives me and undefined var error look below:

proc/UseTech(mob/M in oview())
var/target = usr.ctarg
var/D = rand(((usr.max_ki + usr.max_enrgy) / 2) + usr.clvl,((usr.max_ki + usr.max_enrgy) / 2) - usr.clvl)
if(usr.ctech == "KameHameHa")
if(usr.ctarg || null )
if(usr.ki >= 30)
if(usr.enrgy >= 20)
src.hp = src.hp - D
usr.enrgy = usr.enrgy - 20
usr.ki = usr.ki - 30
usr << "You fired a [usr.ctech] at [usr.ctech]!"
src << "[usr] fired a [usr.ctech] at you!"
src.DeathCheck()
else
usr << "You're to tired to do that."
else
usr << "You don't have enough Ki to use that."
else
usr << "You must select a target."

I put the var in just to show you what I have, right now it would give me these errors:

Test World.dm:365:error:ctarg.DeathCheck:undefined proc
Test World.dm:354:target :warning: variable defined but not used

please help thx!

edit: Don't bash me for making seems to be a DBZ game, I assure you it is going to be much more than that.
DeathCheck(src) instead of src.DeathCheck
In response to Strange Kidd
uh thanks for your help but that won't work.

Actually it is part of the problem but it isn't solving the basic issue that the user is still attacking himself. And it wouldn't make any difference anyway
In response to Jinks
...

Dblclick()
if(src == usr)
for(var/mob/M in oview())
src.UseTech(M)

Or whatever your procs are.

Oh, did I mention that your DBZ game will not be special in any way shape or form? If you want to get respect, do something ORIGINAL.
In response to Garthor
How do you know if it won't be original? You haven't played it, you have no idea if it will be unorginal in any shape way or form.

BTW thanks for the help hehe
In response to Jinks
Jinks wrote:
How do you know if it won't be original? You haven't played it, you have no idea if it will be unorginal in any shape way or form.

Since DBZ is not your idea, and DBZ games have been done before, your idea is unoriginal on at least those two levels. A few aspects of your game might be original (or then, they might not), but that's the most claim to originality you're going to get.

Lummox JR