I’ve been trying to make a card game and I’m trying to make a mechanic that makes the card go up in the center when I press alt+click but whatever I do it wot work if anyone can go in my game and make a screen shot of what they done to help or an game that they can show me that will help.
You need to find and use the value of both coordinates (x,y) in the middle to send them to Position behavior (use Ease to make it more lively).
Idk if I did this right but I’m trying to make a single card goes up not all of them.
You need to find the value in the middle of your game coordinates with a blank object using this code. Run it in the code section to check and get the value
Then, put that value into the Ease like below (you would need 2 Ease for x and y
Now, you could try.
@Khoi_Pham Okay I did that and it works nice but it put all the cards in the middle I need the one that I click alt on goes up not all.
You need Key or Mouse Click behavior to activate only 1 instead of Always or Mailbox, which cause them to all in the middle.
@Khoi_Pham it works but the cards keep merging and making different colors instead of stacking and when I try to stop it until the enemys turn.
{"data":{"behavior":{"v":"2","nodes":[{"inputCount":0,"outputCount":4,"name":"MouseClick","behaviorType":"logic.triggers.MouseClick","x":-810,"y":-320,"group":"","id":"b87db302c2b8bd47","global":false,"rightClick":false,"skipAlpha":false,"version":2},{"inputCount":4,"outputCount":2,"name":"Position","behaviorType":"logic.properties.Position","x":-360,"y":-432,"group":"","id":"b87de6f28efa3841","pixelUnits":true,"resetVelocity":false},{"inputCount":6,"outputCount":2,"name":"Ease","behaviorType":"logic.logic.Ease2","x":-540,"y":-352,"group":"","id":"b87de6f2a0113c41","duration":1,"from":0,"to":160,"easeFunc":"Linear","easeType":0,"smartRot":false},{"inputCount":6,"outputCount":2,"name":"Ease","behaviorType":"logic.logic.Ease2","x":-540,"y":-496,"group":"","id":"b87de6f3fed6be45","duration":1,"from":0,"to":416,"easeFunc":"Linear","easeType":0,"smartRot":false},{"inputCount":0,"outputCount":1,"name":"Once","behaviorType":"logic.triggers.Once","x":-990,"y":-480,"group":"","id":"b87e3369cd8d1745","resetOnLevelStart":false},{"inputCount":1,"outputCount":1,"name":"Extractor","behaviorType":"logic.properties.Extractor","x":-810,"y":-528,"group":"","id":"b87e54aa107ac140","targetId":0,"eName":null,"prop":"x","version":2},{"inputCount":1,"outputCount":1,"name":"Extractor","behaviorType":"logic.properties.Extractor","x":-810,"y":-416,"group":"","id":"b87e55427e38ce4d","targetId":0,"eName":null,"prop":"y","version":2}],"links":[{"input_id":"b87de6f28efa3841i0","output_id":"b87de6f3fed6be45o0"},{"input_id":"b87de6f28efa3841i1","output_id":"b87de6f2a0113c41o0"},{"input_id":"b87e54aa107ac140i0","output_id":"b87e3369cd8d1745o0"},{"input_id":"b87e55427e38ce4di0","output_id":"b87e3369cd8d1745o0"},{"input_id":"b87de6f3fed6be45i1","output_id":"b87e54aa107ac140o0"},{"input_id":"b87de6f2a0113c41i1","output_id":"b87e55427e38ce4do0"},{"input_id":"b87de6f3fed6be45i3","output_id":"b87db302c2b8bd47o0"},{"input_id":"b87de6f2a0113c41i3","output_id":"b87db302c2b8bd47o0"}]}}}
It should work, and remember this is just my example so you still to fix some little stuffs.
Thank You so Much it works.
@Khoi_Pham So I did all of that and now I need the cards to come out of the deck.