• 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!

About hitEffect game.cpp

Stanos

Veteran OT User
Joined
Jun 12, 2018
Messages
584
Solutions
4
Reaction score
314
Location
Europe
Sorry for making thread again :D
Is it possible to send hitEffect with specific skill? Lets say i have Spell1 that send one kind of hitEffect Spell2 sends different hitEffect and etc? Talking about only energydamage.
 
Solution
This one has no effect, but you can add, as line 6 add this one

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)

Each effect has a name, you just change CONST_ME_EXPLOSIONHIT for other effect.
I don't understand then. Maybe you can demonstrate with a drawing or something.
Yea sure :D
llu.png

So yea you hit spell to target but when you hit spell to target some kind (that triangle) effect goes around him to. So its like when you hit monster with sword you can see like blood goes around him so i want to make like specific skill has his own hitEffect. Because now lets say i have some nice sprites for hitEffect but to use the same sprite for all energydamage hitEffect will look stupid
 
i not understand @Stanos, you need what each spell have diferent effect
Each spell doesnt have different effect they have one effect which is in game.cpp you can see COMBAT_ENERGYDAMAGE if you apply lets say hitEffect = CONST_ME_BLOCKHIT; so all energydamage spells will have that blockhit effect. Or i just dont know something about setCombatParam :D
 
That's not how it work, each spell has it own effect defined on its lua script.
Really i never though about it. Maybe can you show me how its made? Lets say i have this simple spell
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_ENERGYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ARROW)


function onCastSpell(cid, var)
    doCombat(cid, combat, var)
end
 
This one has no effect, but you can add, as line 6 add this one

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)

Each effect has a name, you just change CONST_ME_EXPLOSIONHIT for other effect.
 
Solution
This one has no effect, but you can add, as line 6 add this one

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_EXPLOSIONHIT)

Each effect has a name, you just change CONST_ME_EXPLOSIONHIT for other effect.
Wow thanks dude i never though this will be so easy. I'm such a idiot.
 
Back
Top