این اموزش ک لینکش رو گذاشتی اینو میگه که البته چیزی که میخوای هم میشه ازش در اورد
1
-First create a sprite like this, a long rectangle. It is important that you set the image point to the left like in the example above.
یک اسپرایت خط بساز ایمیج پونت خط رو سمت چپ تصویر بزار
2-
Add a Boolean to the sprite and call it “placed.” We will use this later.
شرط بولین بهش بده تو این اموزش به اسم placed
3-Add the touch object to layout.
تاچ رو وارد کن
5 -درایونت جدید on any touch start رو از منو های تاچ بزن
5 - اکشن create object and spawn رو اجرا کن (ساختن خط در صفحه ) از منو های سیستم
6-در ایونت جدید on any touch end رو از منو تاچ انتخاب کن و از منو های شی خط به اون truee شدن شرط بولین رو بده
7-
Now we need to set the size of the sprite and the direction you are touching the screen.
First add the action Sprite – on screen and another condition to check if the Boolean “placed” is false. We do this because we only want this action to apply to the line we are currently drawing.
در ایونت بعد باید اول روی شکل کلیک کنی و در قسمت saze&poz... روی is on screen کلیک کنی و یک شرط دیگه اضافه کنی که شی بولین نباشد (برای این کار باید روی قسمت instance vari... روی is bolean کلیک کنی و اون رو از طریق invert بر عکس کنی یعنی شرط بولین بر قرار نباشد
8-
Add the action sprite – set angle and set the angle towards touch.X and touch.Y
خب بعد از این ایونت ها این اکشن رو قرار میدی اسپرایت set angel toward بشه به x وY تاچ
و
9-
Add another action sprite – set width and use the handy build-in formula of construct2 called “distance.” Set the width to distance(sprite.x,sprite.y,touch.x,touch.y)
در قسمت اکشن باید اضافه کنی در set width خط که مینویسی
distance(sprite.x,sprite.y,touch.x,touch.y)
البته اگر دوست داری خط رو مثل فروت نینجا بشه بهش میتونی رفتار fade بدی ولی دقت کن تو تنظیمات بعد از محو شد distroy نکنی
سعی کردم به راحت ترین حالت توضیح بدم بازم مشکلی داشتی بپرس @user138592