Jump to content
  • 0

Repeating specialeffect on item script?


Question

Posted

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

2 answers to this question

Recommended Posts

  • 1
Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...