Jump to content
  • 0

Repeating specialeffect on item script?


Ticklish

Question


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  7
  • Reputation:   0
  • Joined:  06/30/12
  • Last Seen:  

What I'm trying to do is add a specialeffect to a useable/healing item that repeats itself for a few seconds and then stops. Is there a way to do this without source mods?

For example, in my item_db, I have a card with this script:

{ bonus2 bHPRegenRate,9,1000; },{},{}

And another item that uses its effect:

501,Red_Potion,Red Potion,0,50,,40,,,,,0xFFFFFFFF,7,2,,,,,,{ itemheal rand(45,65),0; sc_start SC_ITEMSCRIPT,5000,4766; }"; },{},{}

But I'm not satisfied with just that. I want it to repeat a specialeffect every time the HP regeneration thing "ticks" so that players can see very plainly when the HP regeneration is still active. If anyone could explain a way to achieve this, then much gratitude.

/lv

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  218
  • Topics Per Day:  0.05
  • Content Count:  1180
  • Reputation:   141
  • Joined:  01/27/12
  • Last Seen:  

This should be what you want, I hope:

501,Red_Potion,Red Potion,0,50,,40,,,,,0xFFFFFFFF,7,2,,,,,,{ specialeffect2 204; for( set @healtime,0; @healtime < 30; set @healtime,@healtime+1 ) { itemheal rand(45,65),0; sleep2 2000; } dispbottom "Your healing item has run out."; end; },{},{}

Peopleperson49

For an item you would wear that heals you:

2208,Ribbon,Ribbon,5,800,,100,,1,,0,0xFFFFFFFF,7,0,256,,0,1,17,{},{ set @healtime,1; while(1) { if(@healtime==0) break; itemheal rand(45,65),0; sleep2 2000; } },{ set @healtime,0; }

Edited by peopleperson49
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

You can repeat stuffs by using loops.

loops

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...