luckyrawatlucky's Recent Forum Activity

  • R0J0hound I got 1 issue. in your example file. set viewport to 1260 x 720 and set variable path value to 841,141,812,171,783,202,754,232,725,263,696,293,668,324,639,354,610,385,581,415,552,446,523,476,494,507,465,537,436,568

    and preview it. that blue sprite should be positioned to first p but its on the 13th.

    just change path value to default value you set. and then start set position to first p object.

    what's wrong here?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • R0J0hound there are more than 2 p.counts. its 15. I did check debug with breakpoint and I come to know that when I create all p objects. all objects were created but when I select any p object in debeug then it doesn't show its property. it showing current running loop. when all p objects are created then action for Sprite (t) and its position is set to NaN after that I can see p's property.

    and somehow if things work fine then Sprite's default position is not the first p's position.

    first time n sets -1

    Edit:

    I noticed why this issue occure. I put entire code under a variable comparision. and trigger once instead of start of layout.

    Why it causing issue putting under a variable camparision. do you know?

  • R0J0hound I used a new object for this purpose. So instead of creating all path I'm creating only specific path which will be used. Now one issue comes here.

    clamp(((self.X-p(self.n).x)*(p(self.n+1).x-p(self.n).x)+(self.y-p(self.n).y)*(p(self.n+1).y-p(self.n).y))/((p(self.n+1).x-p(self.n).x)^2+(p(self.n+1).y-p(self.n).y)^2),0,1)
    

    this returns NaN to me, I did copy exact code from example file.

    instead of creating object start of the layout, I'm creating on triggered once.

    I did debug this code and here is the screenshot

  • R0J0hound

    yes, that what I was trying to do, my method was not working at the end. in your example.

    clamp(((self.X-p(self.n).x)*(p(self.n+1).x-p(self.n).x)+(self.y-p(self.n).y)*(p(self.n+1).y-p(self.n).y))/((p(self.n+1).x-p(self.n).x)^2+(p(self.n+1).y-p(self.n).y)^2),0,1)

    I have multiple path and all those paths are already created on runtime. by default it picks object 'p' which was first created.

    I have set variable on 'p' by comparing which I want to choose which path to be picked.

    How can I pick a spesific path to use?

  • I fixed above issue by adding min,max

    -> System: Set d to clamp(distance(ax,ay,clamp(Touch.X,min(bx,ax),max(ax,bx)),clamp(Touch.Y,min(ay,by),max(ay,by))),0,distance(ax,ay,bx,by))

  • R0J0hound I used below method.

    | Global number ax‎ = 0
    | Global number ay‎ = 0
    | Global number bx‎ = 0
    | Global number by‎ = 0
    | Global number a‎ = 0
    | Global number d‎ = 0
    + System: On start of layout
    -> System: Set ax to point1.X
    -> System: Set ay to point1.Y
    -> System: Set bx to point2.X
    -> System: Set by to point2.Y
    -> System: Set a to angle(ax,ay,bx,by)
    
    + Touch: Is in touch
    -> System: Set d to clamp(distance(ax,ay,Touch.X,Touch.Y),0,distance(ax,ay,bx,by))
    -> star: Set position to (ax+cos(a)×d, ay+sin(a)×d)
    

    I place 2 points in layout. point1 poisition (681, 268), point2 position (426, 459).

    above code is working except one issue. when mouse is touching ahead of point1 then it still moving star towards point2

  • is there a way to make a path on layout then drag sprite over that path in runtime?

    is it possible if I make a path using timeline then drag object over that path?

    Tagged:

  • if bullet has grtavity applied then it could calculate impact. but gravity is zero, so these should work same.

  • I did raycast and shoot a bullet from same point and they both collides on same spot but reflections of both are not same there is slight difference in their reflection angle. please check and let me know if its working as it should or its a bug or my fault somewhere

    myfile is attached

  • Typo on my part. It should be mid(a,loopindex,1). I wrote i instead of 1

    yes it helped.

    Thanks R0J0hound

  • R0J0hound,I tried but it returns nothing, matching is still blank

  • I know about tokenat and its not about letters matching only. its about matching then comparing then counting and then adding. I tried a lot with tokenat, tokencount but I didn't find a way

luckyrawatlucky's avatar

luckyrawatlucky

Member since 27 Aug, 2015

Twitter
luckyrawatlucky has 10 followers

Connect with luckyrawatlucky

Trophy Case

  • 9-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x2
    Popular Game One of your games has over 1,000 players
  • x43
    Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

23/44
How to earn trophies