issue with grass..again.

This forum is currently in read-only mode.
  • ok so i lied a little about not having problems with my grass blades swaying in my other thread. i do, apparently.

    i really dont know how to properly solve this:

    i have made the swaying with the sine- behavior. and the rough code is:

    player is overlapping a grass blade

    -set sine angle range/speed to bigger than it is while not overlapping.

    now the problems start.

    im having issues on how to handle single blades of the grass object, in other words, im having problems picking the specific instances.

    i dont really know how to set sine to normal to those blades the player just stopped overlapping since it does it for every instance.

    also encountered an issue with sine:

    resetting sine angle to something specific is rather problematic,since it doesnt have a default angle to revert to. so,when the range is bigger and i want to set it to smaller, the grass swaying can start from a completely different angle than the sine originally was..?

    if i sound confusing, i can make a simple .cap to get my point across lol

    anybody wanna help a guy out?

    i have candy... <img src="smileys/smiley8.gif" border="0" align="middle" />

  • Try putting your events under a "For each object > Grass blade" loop event from the System object. That should pick better based on the conditioning I think.

  • This is from another thread I helped out someone with grass.

    link

  • thanks guys, i got it working pretty much as i hoped, although the problem with the sine angle not resetting to default angle still persist, but i guess theres no simple way to fix that, and it looks good as it is now.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The sine behavior just sets the sprite's properties. You can reset them by just entering the original values. For example, if sine behavior changes the sprite's angle, add a pv 'startAngle' to the sprite, set it to Sprite.Angle at start of layout, then whenever needed, set Sprite.Angle = 'startAngle'.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)