-
ادمه ی آموزش ::46:
یه آبجکت بسازید به اسم obj_mouse.
خب برید تو آبجکت obj_all و ایونت Step رو بیارید و توش این اکشن ها رو بذارید.
1-اکشن Test Instance Count :
گزینه ی اول : obj_walkit
گزینه ی دوم : 1
گزینه ی سوم : Larger than
2-اکشن Start Block
3-اکشن Destroy Instance :
گزینه ی اول : بین گزینه های Self و Other و Object گزینه ی Object رو انتخاب کنید و از گزینه های داده شده آبجکت obj_walkit رو انتخاب کنید.
اکشن Create Instance :
گزینه ی اول : بین گزینه های Self و Other و Object گزینه ی Object رو انتخاب کنید و از گزینه های داده شده آبجکت obj_mouse رو انتخاب کنید.
گزینه ی دوم : obj_walkit
گزینه ی سوم : mouse_x
گزینه ی چهارم : mouse_y
اکشن End Block.
-
ماشالله تاپیک استریپی شد.:13:
-
ادامه ی آموزش ::46:
خب این کد رو تو ایونت Step آبجکت obj_hero1 بذارید (البته این کد ها کاره آقا احسانه) :
کد:
if speed>0.1 {
if direction>0 {if direction<22.5 {sprite_index=spr_hero1_right_walked}}
if direction>337.5 {if direction<360 {sprite_index=spr_hero1_right_walked}}
//360 Direction
if direction>67.5 {if direction<112.5 {sprite_index=spr_hero1_up_walked}}
if direction>157.5 {if direction<202.5 {sprite_index=spr_hero1_left_walked}}
if direction>247.5 {if direction<292.5 {sprite_index=spr_hero1_down_walked}}
//ehsan sakhte HHH
if direction<67.5 {if direction>22.5 {sprite_index=spr_hero1_upright_walked}}
if direction<157.5 {if direction>112.5 {sprite_index=spr_hero1_upleft_walked}}
if direction<247.5 {if direction>202.5 {sprite_index=spr_hero1_downleft_walked}}
if direction<337.5 {if direction>292.5 {sprite_index=spr_hero1_downright_walked}}
}
if speed=0 {
if sprite_index=
spr_hero1_right_walked {sprite_index=
spr_hero1_right_stoped}
if sprite_index=spr_hero1_left_walked {sprite_index=spr_hero1_left_stoped}
if sprite_index=spr_hero1_up_walked {sprite_index=spr_hero1_up_stoped}
if sprite_index=spr_hero1_down_walked {sprite_index=spr_hero1_down_stoped}
if sprite_index=spr_hero1_downright_walked {sprite_index=spr_hero1_downright_stoped}
if sprite_index=spr_hero1_downleft_walked {sprite_index=spr_hero1_downleft_stoped}
if sprite_index=spr_hero1_upright_walked {sprite_index=spr_hero1_upright_stoped}
if sprite_index=spr_hero1_upleft_walked {sprite_index=spr_hero1_upleft_stoped}
}
حالا این اکشن ها رو به ترتیب بذارید زیر اکشنی که کد بالا رو توش وارد کردید :
1-اکشن Test Instance Count :
گزینه ی اول : obj_walkit
گزینه ی دوم : 1
گزینه ی سوم : Equal to
2-اکشن Start Block
3-اکشن Move Towards :
گزینه ی اول : بین گزینه های Self و Other و Object گزینه ی Self رو انتخاب کنید
گزینه ی دوم : obj_walkit.x
گزینه ی سوم : obj_walkit.y
گزینه ی چهارم : 4
-
ادامه ی آموزش ::46:
روی ایونت Collision کلیک کنید و از بین آبجکت ها آبجکت obj_walkit رو انتخاب کنید.
حالا به ترتیب اکشن های زیر توی همون ایونت بذارید.
1-اکشن Destroy Instance :
گزینه ی اول : بین گزینه های Self و Other و Object گزینه ی Other رو انتخاب کنید
2-اکشن Move Fixed :
گزینه ی اول : بین گزینه های Self و Other و Object گزینه ی Self رو انتخاب کنید
گزینه ی دوم : از بین 9 تا فلش ، اون فلش وسطی رو انتخاب کنید (همون مربع)
گزینه ی سوم : 0
-
اون اسپرایت های بیلدینگ رو چی کار کنیم یعنی همون خونه رو دو بار لود کنیم و اینکه چه جوری تو گیم میکر ریسایز کنیم؟
-
قصد نداری ادامه بدی ارمین
-