|
Post by גל on Aug 8, 2021 7:01:17 GMT
אני רוצה להוסיף מפה שרואים את כל המסלול ואת שאר המכוניות עליה וגם שיהיה רשום כמה מטרים כל מסלול וכמה עברנו איך עושים את זה?
|
|
|
Post by Adi Barda on Aug 8, 2021 8:14:18 GMT
לגבי מפה - תוכל להשתמש ב minimap לדוגמא: minimap.show : size(300,300) and follow player
לגבי תצוגת מרחק: אתה יכול לקבוע מה המרחק של מסלול שלם לדוגמא: 10 ק"מ ואז לשים מספר collider boxes לאורך המסלול נניח 10 כאלה ובכל פעם שהמכונית עברה דרך collider כזה להציג את המרחק באותו מקום איך יוצרים collider? b is a static collider box המילה collider אומרת שהקוביה בעצם בלתי נראית אך עדיין תומכת בארוע התנגשות בגרסה הבאה אוסיף יכולת קלה יותר לחישוב מרחק ואעדכן פה
|
|
|
Post by גל on Aug 8, 2021 8:29:43 GMT
תודה רבה
|
|
|
Post by gal ashkenzi on Aug 8, 2021 9:28:34 GMT
//audio.play "car_racing1" canvas.size 2000,1300
var score=0, life=7, stg=0,car_speed = 80,speed=40 minimap.show : size(300,300) and follow player go.print "START PLAY": pos(300,300,0) and size 3 and color red
start_button.draw start_button : pos (300,400)
when mouse left is pressed on start_button do
start_button.draw clear go.print "" life=7 score=0 stg=0
end do
add "my_data" code add "loading" code add "input" code add "add_cars" code add "dashboard" code add "next_stage" code add "game_over" code
player.replay track1 in 30 seconds //camera.chase player camera.attach to player : pos (0,3,-10) and rotate(-15,0,0)
ככה זה לא עובד לי איפה אני אמור לשים את זה ב loading?
|
|
|
Post by Adi Barda on Aug 8, 2021 9:44:10 GMT
שים את זה אחרי ה add "loading" code מאחר שרק אז ה player מוכר למחשב וגם ישנה טעות בקוד. השתמש באופן הזה: minimap.show : size 300 and follow player
|
|
|
Post by gal ashkenzi on Aug 8, 2021 13:15:40 GMT
תודה
|
|