godot-card-game-framework icon indicating copy to clipboard operation
godot-card-game-framework copied to clipboard

using "compare_with_owner" or "compare_with_trigger" with KEY_BOARD_POSITION sets the board position to the relevant card

Open BertezBertez opened this issue 3 years ago • 9 comments

Good If you want to drag a card to a spot and have a card spawn there for example

BertezBertez avatar Nov 26 '21 22:11 BertezBertez

If the spawned card is directly on top of the owner, then it will hide it as well though.

db0 avatar Nov 27 '21 09:11 db0

Hmm, maybe there could also be a spawn_offset key in spawn card that takes a vector2 which it adds for board position. Could be useful for other values that are conditional such as ones based off the viewport and such.

BertezBertez avatar Nov 27 '21 17:11 BertezBertez

Alternatively a change board position task might be nice. That could follow the spawn card task and not put extra functionality on the spawn card task

BertezBertez avatar Nov 27 '21 19:11 BertezBertez

Why don't you just use a 'move_card_to_board' on the spawned card?

db0 avatar Nov 28 '21 13:11 db0

oh can you use compare_with_owner for the position in move_card_to_board?

BertezBertez avatar Nov 28 '21 22:11 BertezBertez

Well, no. I was replying to this comment

Alternatively a change board position task might be nice.

db0 avatar Nov 29 '21 00:11 db0

I guess what I was thinking was a task to move a card based on where it is. Like add 50 to the X position.

BertezBertez avatar Nov 29 '21 08:11 BertezBertez

If your name needs it, it is not difficult to extend the scripting engine and add this sort of task. If you feel it needs to be in the core CGF, feel free to send me a PR

db0 avatar Nov 29 '21 08:11 db0

That makes sense. I stuff is busy right now but I would like to give back to the project

BertezBertez avatar Nov 30 '21 18:11 BertezBertez