• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Two 'doSendMagicEffect' on 1 tool <shoot effect and ground effect>?

kessykins

Intermediate OT User
Joined
Mar 15, 2010
Messages
297
Reaction score
105
Is it possible to make a tool have both of the following:

doSendMagicEffect(toPosition, CONST_ME_LOSEENERGY)
and a shoot effect
doSendMagicEffect(toPosition, CONST_ANI_SHIVERARROW)?

I've tried just adding them beside eachother but.. they end up doing something completely different :/

What do I need to change to correct this?
 
Try using these 2 functions instead,

Code:
                doSendMagicEffect(getPlayerPosition(cid), CONST_ME_LOSEENERGY)
                doSendMagicEffect(getPlayerPosition(cid), CONST_[COLOR="lime"]ANI[/COLOR]_SHIVERARROW)

For distance effects you must use param 'ANI' instead of 'ME'

Hope this helped
Nightmare,
 
Try using these 2 functions instead,

Code:
                doSendMagicEffect(getPlayerPosition(cid), CONST_ME_LOSEENERGY)
                doSendMagicEffect(getPlayerPosition(cid), CONST_[COLOR="lime"]ANI[/COLOR]_SHIVERARROW)

For distance effects you must use param 'ANI' instead of 'ME'

Hope this helped
Nightmare,

And also doSendDistanceShoot instead of doSendMagicEffect

doSendAnimation(getPlayerPosition(cid), secondPositionHere, CONST_ANI_SHIVERARROW)
 
Nightmare, I tried yours but it just made the lose energy and smoke effects appear on the player. I changed the position but it this is what happens:

The spell effect doesn't shoot the shiver arrow - it just adds smoke on the water :/// idk why the smoke appears :/

energyandsmokewtf.png


slawkens, I'm trying your suggestion right now
 
Hmm..

Code:
                doSendMagicEffect(toPosition(cid), CONST_ME_LOSEENERGY)
                [I][B][COLOR="lime"]doSendDistanceShoot[/COLOR][/B][/I](toPosition(cid), CONST_ANI_SHIVERARROW)

Try this?
 
Last edited:
I copied it right from above and I got this error:

[17/08/2010 00:23:23] [Error - Action Interface]
[17/08/2010 00:23:23] data/actions/scripts/tools/fishing.lua:onUse
[17/08/2010 00:23:23] Description:
[17/08/2010 00:23:23] attempt to index a function value
[17/08/2010 00:23:23] stack traceback:
[17/08/2010 00:23:23] [C]: in function 'doSendDistanceShoot'
[17/08/2010 00:23:23] data/actions/scripts/tools/fishing.lua:222: in function <data/actions/scripts/tools/fishing.lua:132>


I'm trying to make it so when a player uses a fishing rod on water they shoot a shiver arrow effect to the <lose energy effect> spot on the water
 
Ty for your help thus far! +rep

Can someone help me validate
doSendDistanceShoot(frompos, topos, type[, player])?

I tried
doSendAnimation(getPlayerPosition(cid), toPosition, CONST_ANI_SHIVERARROW)

but I'm getting
Code:
[17/08/2010 01:27:54] [Error - Action Interface] 
[17/08/2010 01:27:54] data/actions/scripts/tools/fishing.lua:onUse
[17/08/2010 01:27:54] Description: 
[17/08/2010 01:27:54] data/actions/scripts/tools/fishing.lua:222: attempt to call global 'doSendAnimation' (a nil value)
[17/08/2010 01:27:54] stack traceback:
[17/08/2010 01:27:55] 	data/actions/scripts/tools/fishing.lua:222: in function <data/actions/scripts/tools/fishing.lua:132>


EDIT:

After playing around with things..

doSendDistanceShoot(getPlayerPosition(cid), toPosition, CONST_ANI_SHIVERARROW)

It worked! WOOT! Thanks guys for your help <3
 
Last edited:
I never understand error logs :(
I don't know why it's not working though..

Maybe it's
doSendAnimation(fromPlayerPosition(cid), toPosition, CONST_ANI_SHIVERARROW)

Maybe some little error like this, I'm not sure
Requesting extra help! :huh:
 
We figured it out :P


After playing around with things..

doSendDistanceShoot(getPlayerPosition(cid), toPosition, CONST_ANI_SHIVERARROW)

It worked! WOOT! Thanks guys for your help <3
 
Back
Top