dop2000's Recent Forum Activity

  • In sprite font you can get the size of each character, space width, line height etc. This allows you to calculate position of any words in the text, but in a big multi-line text with word wrapping it may not be a very easy task.

    How do you currently scroll the text? Do you have a really tall text object and scroll the entire layout?

  • Your question is too general. You might need to use instance variables, "For each" loops, Timer behavior etc.

    Search for "AI" in the Tutorials section, there are lots of examples there:

    scirra.com/tutorials/all

  • You can pick sprites by animation name. If you want to continue using the family, you'll have to add a bunch of events for creating individual weapons, there is no workaround for this in Construct 2.

  • See this chapter from the manual:

    scirra.com/manual/83/variables

    Local variables are often used when you need a "temporary" variable in an event for some calculations. Note, that local variable is reset on the next tick, so if you use "Wait" in the event, the variable will be reset after it.

    If you need the variable to not reset, you can set it as Static. For example, you can create an event group Audio, add local static variable MusicVolume there. This variable will only be accessible inside the Audio group (which is good, because you don't need it anywhere else) and it will not be reset even if you reset all global variables.

  • I did it! Don't ask me how, but it works..

    dropbox.com/s/8ae8h948w8jt1sa/SineRopeChangeMagnitude.capx

  • Do you mean screen coordinates (x,y), or position (index) of a word in text?

    Text is rendered differently, so it's a really difficult task to get correct screen coordinates with text object. You can do it with sprite font though.

    If you just need to know the position of a sub-string, use find() expression. For example, find("ab cd ef", "cd") will return 3.

  • I'm sure, this can easily be done with asin() expression, this is basically a school-level math. The problem is, I don't remember it :)

    So here is a workaround - change the magnitude gradually over a short period of time. You can do something like this:

    Set newMagnitude=100
    On every tick: sprite Sine set magnitude to lerp(self.Sine.magnitude, newMagnitude, dt*4)
    or:
    On every tick: sprite Sine set magnitude to min(self.Sine.magnitude+1, newMagnitude)
    
  • When you spawn a family, you can't control which family member will be created, it's random.

    So you need to create the object explicitly: "if currentweapon=laser, then create laser, else if currentweapon is missile, then create missile" etc.

    Alternatively, you can ditch the family, combine all these sprites into one as different animations. Then on "Z" pressed, you spawn this one bullet sprite and only need to change its animation.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • LiteTween is the greatest addon for tweening, you won't find a better one.

    Just set Tweened Property=Value, and set sprite angle to Sprite.LiteTween.Value on every tick while the tween is running.

    However, I just tested and it looks like you can do this by tweening the angle directly. Say, if you want to rotate your sprite 30 degrees clockwise, tween to (sprite.angle+30). If you need to rotate counter-clockwise, tween to (sprite.angle-30)

  • newt Well, of course it's not iterating like "For" loop, the actions in the event are not repeated Object.PickedCount times. But internally, when the engine determines which instances should be picked, it iterates through all instances and compares each with choose(0,1), in each iteration calculating a new result for choose(0,1). It would make more sense to calculate it only once before running this loop.

  • here is an example I made just yesterday, you can modify it to your needs:

    dropbox.com/s/mvllis416491ywn/SlidersTwoLayouts.capx

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 269 followers

Connect with dop2000

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
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,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
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x14
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

29/44
How to earn trophies