PDA

View Full Version : Dragging attack dice onto PC in the Combat Tracker, dice showing but not 'rolling'



MadBeardMan
May 28th, 2017, 16:58
Folks,

Been working on the CT for WOiN, have got the basics working, init, all attacks show and so on.

If I target a PC and then drag the attack dice into the chat window then I get the dice 'rolled' and the effects shown (hit/miss etc).

However if I drag the dice onto the PC in the CT, they drop and vanish and no 'attack' is rolled.

Any thoughts on what I'm missing, or where to check?

Cheers
Col

Andraax
May 28th, 2017, 17:08
Do you have an "on drop" callback setup on the CT?

Trenloe
May 28th, 2017, 17:11
For CoreRPG: Check the onDrop function in ct\scripts\clientct.lua - this triggers CombatManager.onDrop - look into that global package function as to why nothing is happening. It checks for a valid target action (from GameSystem.targetactions) - are you using a new action name? Have you defined it in GameSystem.targetactions ??

MadBeardMan
May 28th, 2017, 17:20
Chaps,

The clientCT.lua OnDrop doesn't fire, but the onDrop inside the ct.lua does indeed fire.

These are vanilla CoreRPG files.

Cheers

Trenloe
May 28th, 2017, 17:26
The clientCT.lua OnDrop doesn't fire, but the onDrop inside the ct.lua does indeed fire.
I used ctlient.lua as an example. That is run if you're the player. ct.lua is run if you're the GM. They both run the exact same code if the drop is on a specific CT entry.

MadBeardMan
May 28th, 2017, 17:33
I used ctlient.lua as an example. That is run if you're the player. ct.lua is run if you're the GM. They both run the exact same code if the drop is on a specific CT entry.

It's ok, I can start to poke around now, thanks :)

MadBeardMan
May 28th, 2017, 19:22
It checks for a valid target action (from GameSystem.targetactions) - are you using a new action name? Have you defined it in GameSystem.targetactions ??

And in the end, that seems to be it....it doesn't know what an attack is so it 'bleeds' through and ignores the ActionManager.actionDrop()....

Cheers