Ok I made a healing spell and it uses the click proc
obj/magic/Heal1
name = "Minor Healing"
icon = 'Spellicons.dmi'
icon_state = "Recovery"
Click()
if(usr.MP>=2)
if(usr.Casting == 1)
usr<< "You cannot perform this action now because you are currently casting a spell!"
else
if(usr.Death == 0)
for(var/mob/M in view())
And it heals all in site but I dont want that I wanter the user to have to choose what mob to heal if you could help thanks
ID:173682
Nov 30 2003, 10:17 am
|
|
In response to Malver
|
|
It not working right its shows the turfs,objs, and mobs is there a way I can fix this?
|
In response to Malver
|
|
There is, however, a more elegant solution:
mob Then, for any spell, you just have to override action() to do what you want. Spells that don't need a target can override Click(). |
In response to Garthor
|
|
Do any of those have a popup that you select a mob?
|
In response to Darkfirewolf5
|
|
No. The way it works is that you click on the spell you want to cast, then click on the target. If the target is invalid, then you simply get your mana back and nothing happens.
|
In response to Darkfirewolf5
|
|
Darkfirewolf5 wrote:
It not working right its shows the turfs,objs, and mobs is there a way I can fix this? Yep. You can specify what type to include using the as keyword. Another example: var/mob/Target = input("What mob to heal?") as mob in view() |
The input() function can by handy (and ugly!) for choosing a particular mob. For example:
Check out the reference of input() for more info.