Zebbi's Recent Forum Activity

  • SKIDTHRESHOLD should be a value between 0 and 1, with values closer to 1 requiring less intense skidding to produce marks. SKIDINTENSITY can theoretically be anything, but I recommend values between 0 and 100, 100 being the most intense. As it is right now, the opacity of the skid marks is a function of tire grip and SKIDINTENSITY, so you get a gradual fade in as the skid intensifies, but you could simply set the opacity to SKIDINTENSITY directly for a more instant effect.

    I set the skidintensity to 88 and changed the gripstrength setter to "abs((Turt.car.VectorX / Turt.car.Speed) * cos(Turt.Angle) + (Turt.car.VectorY / Turt.car.Speed) * sin(Turt.Angle))/1.05" by adding "/1.05" and it seems to have made things closer to my needs! This is actually really perfect and solves my skid soundfx issues by allowing me to use the gripstrength as a soundfx trigger!

  • If you want the skid marks to persist -- i.e. last forever -- then I would definitely recommend using Paster so you don't have a bunch of static objects all over the place.

    Here's an example I pulled together showing how to do skid marks(using Paster):

    Skid Marks with Paster

    linkman2004 this is perfect! Just currently trying to adjust it for my needs to the skids happen at a slower speed with less of an intense turn required to start the skid, which is a more cartoony effect, but would work for my purposes, more like any kinda of near-right-angle would cause a skid. Adjusting the two globals hasn't helped much so far, is there another bit that needs tweaking for this kind of effect?

  • Nothing comes to mind. Reading your initial post maybe you can make the sound depend of the joystick instead of the turning rate?

    The car is computer driven, so maybe that has something to do with it :/ Can the amount of angles changed per second be calculated somehow?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I heard some folks mention using paster (not tried it yet) but supringly, I couldn't find as many good examples of "skid marks" as I was hoping to find through the forums. Would paster be the best way of achieving this? If so, I'm not sure how to use it and could use a suggestion. If not, would creating a lot of sprites be too heavy?

  • global number rateOfTurn=0

    global number previousAngle=0

    everytick

    --- set rateOfTurn to (sprite.angle-previousAngle)/dt

    --- set previousAngle to sprite.angle

    Trying again, this seems to increase as the cars speed increases, but the rate of turn appears to be the same, no matter how fast the car turns?

  • [quote:19l3u159]abs(x) Absolute value of x e.g. abs(-5) = 5

    Thankyou!

  • Is there some way, using expressions, of ignoring the fact a number is a negative value, and just treating it as a positive? Sort of like how round() ignores the decimal point, can you tell c2 just consider -50 as 50, -100 as 100, etc?

  • Makes sure to convert the values back to numbers. At the moment it is comparing "2" to "10" as a string: "2" < "10".

    Ahh, works now I changed "Value /> LayoutName" to "Value /> int(LayoutName)" I must have been getting on by with luck until now! Thanks!

  • I'm giving layouts static numbers as names (1,2,3,etc) and I am testing these numbers for LocalStorage events, to figure out which level is unlocked. Strange thing is, if the layout name is greater than 9, it doesn't seem to be saving the value properly LocalStorage, since there's a condition to only save the item if the variable is greater than the current layouts name (when returned as a number rather than a string). Does LocalStorage think of 10 as being somehow below 2, or does LocalStorage only keep numbers on single digit?

  • Thanks, I'm already doing some of that, I managed to work it be getting the LocalStorage checks in the right order, thanks fm4fanAT for reassuring me it would work!

  • If you would store also the "trophy size" to every level it should be solved.

    If trophy is bigger than the stored one = Tada

    Edit: you also could look at the stored score/time/lap because you know which trophy he has and so you could also check.... (but my first suggestion is simpler)

    Thanks, I actually tried that first method after I posted this but it also didn't work, I think I might need to try again and make sure the lap numbers are being reported properly...

  • global number rateOfTurn=0

    global number previousAngle=0

    everytick

    --- set rateOfTurn to (sprite.angle-previousAngle)/dt

    --- set previousAngle to sprite.angle

    Thanks! This seems to increase as the cars speed increases, is there a way to subtract the cars speed changes from the turn speed?

Zebbi's avatar

Zebbi

Member since 20 Jan, 2014

None one is following Zebbi yet!

Connect with Zebbi

Trophy Case

  • 10-Year Club
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

12/44
How to earn trophies