i want the HAIRGoku to flick on the usr mob when i use the TraingBag verb. but i dunno how
obj
TrainingBag
icon = 'Gym.dmi'
icon_state = "TB"
density = 1
verb
TrainingBag()
set name = "Training Bag"
set category = "Training"
set src in oview(1)
if(usr.FLY == 1)
usr << "You can't train while flying."
return
else
if(usr.dir == 4)
flick("TBHit",src)
flick("TKick", usr)
usr.MPL += 1
else
usr << "You must face the training bag."
thats my training bag object
obj
Hair
Goku
icon = 'HAIRGoku.dmi'
that's my hair object. how do i make the hair flick when i use the TrainingBag verb?
ID:174128
Sep 27 2003, 1:58 pm
|
|
Sep 27 2003, 2:01 pm
|
|
the same way the kick flick works for when you kick the bag
|
In response to Aridale
|
|
that doesnt seem to help much
|
In response to ZDarkGoku
|
|
youve got this
if(usr.dir == 4) flick("TBHit",src) flick("TKick", usr) usr.MPL += 1 else usr << "You must face the training bag." thats my training bag object obj Hair Goku icon = 'HAIRGoku.dmi' to flick HAIRGoku you need to tell flick to use it under flick("TKick",usr) the same way that TKick is used it looks like you got the hair as an obj which isnt really nessary for the flick. if the hair icon is 'HAIRGoku.dmi' and thats all thats in that dmi then flick('HAIRGoku.dmi',"",usr) should work. Look up flick in help with F1 and read what it says about it. EDIT: Wow that paste really blew... |
In response to Aridale
|
|
i named the states in the HAIRGoku.dmi the same as in my mob.dmi. like in "TKick" for mob.dmi, the hair for it is "TKick" but its in HAIRGoku.dmi. i tried urs and it had an error.
here's what i tried. flick("TKick", usr.overlays) <-- doesn't work flick("TKick", M.overlays) <-- doesn't work (M is my mob) i dunno how to put the Hair on without using it as an object so that's why i have this problem. |
In response to ZDarkGoku
|
|
You have to add the hair as an overlay but it doesnt matter if its an obj or just an icon. But with all the icons states named matching I dont see why the hair wouldnt be flicking when you kicked. I dont have any similiar code of mine that I can pull up to show ya how I did it. But I know for sure you dont need to be using usr.overlays in the flick. And if M is your mob then and flick with usr in it should be M too. But for a verb that does the flicking then usr should be fine so if when you use the verb if you see the flick for TKick then usr is what you should use. But like I said if your overlay is made right for the hair and the icon state names match then just calling flick("TKick",usr) should be all you need to do to get the hair to flick as well.
|