R0J0hound's Recent Forum Activity

  • The only place I’ve seen anything to limit the fps is on the construct discord the user mikal made something to do that. Haven’t used it and not sure if there’s any limitations with that plug-in.

    Officially I think the devs tried to do that before but weren’t able to get anything that worked well. Maybe they will revisit it since it seems to be requested more as of late.

    I don’t think there’s anything that can be done with scripting to limit the fps. The render loop is controlled by the construct runtime and that part isn’t exposed to the scripting api as far as I can tell.

    I can think of one roundabout way to limit the fps but it’s more of a trick and doesn’t work with most of construct. The idea is the screen will only redraw if things change, so you could only move or change things every other frame or so. But as stated above that won’t work with most behaviors or other things that normally update every frame.

  • Here are some ideas:

    construct.net/en/forum/construct-3/general-discussion-7/better-text-input-170179/page-2

    One is to just use a bit of JavaScript to get keyboard input. It gives a bit more than what construct offers.

    A second idea is to use a textbox with 0 opacity. It will act just like a normal edit box but you draw manually.

  • What doesn’t work about it? Doesn’t this work?

    On f key pressed
    Control key is down
    — do something. 
  • You could do a timer with a variable. Something like this. It adds 1 when you click but makes a timer 0.2 sec later. After that it will add 1 quickly. There’s probably a more refined way. Basically you could just have a timer count how long the mouse button is down.

    On sprite click
    — add one to value
    — set sprite timer to time+0.2
    
    Left mouse is down
    Mouse over sprite
    Sprite timer >time
    — add 1 to value
  • You probably could do it with just the text using find(), but since you want to remove words once they are found it could get slow to replace stuff. We want to do it in a reasonably efficient way. Like dop said, it's useful to first parse the words out of the text and add them into a dictionary. You can even store the number of times each word occurs in the dictionary.

    1. parse the text to get all the words. Each word and the number of times that word is seen is added to a dictionary. This can be done over multiple frames.

    2. Random letters are typed. We only need to keep track of no more than the length of the longest word in characters.

    3. Then just use right(keys, 1), right(keys, 2), right(keys, 3), ...etc. to get a possible word and see if it's in a dictionary.

    dropbox.com/s/cq7yq79mpe8w6n8/monkey_type.capx

    Seems words longer than four letters long are seldom found, but that lines up with the probability.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Move to changes the position and the other sets the velocity but you can set the speed at an angle with this:

    A=angle of motion

    Vector X = -20*cos(a)

    Vector Y = -20*sin(a)

    Add it to the previous xy to be more like an impulse.

  • You can use the pin behavior oh the objects you want to move with the map, and pin them to the map sprite.

    Alternate idea is to set the scroll instead similar to the other suggestions.

    I like to try to simplify stuff so calminthenight’s solution probably could be simplified a bit further to something like this. I haven’t had a chance to test it.

    Var prevX
    Var prevY
    On touch
    — set prevX to touch.x
    — set prevY to touch.y
    Is touching
    — scroll to scrollx+prevX-touch.x, scrolly+prevY-touch.y
    — set prevX to touch.x
    — set prevY to touch.y
  • Sure. It has to do with when new objects can be picked. When you create new instances they can’t be picked in a general way till the next top level event (top level means an event to the far left). Basically the new instances aren’t added to the object list till the next top level event. Pick by uid is the one condition that can pick new objects regardless.

    More info here.

    construct.net/en/forum/construct-classic/help-support-using-construct-38/picking-problem-37830

    Anyways the wait 0 is a bit of a hack to work around this. It delays till the end of the event sheet before running. Which is often fine in a lot of cases.

  • Well if you didn’t change the camera scroll from the top left, and the origin of the sprite map’s image is top left then it should work from my tests. Did you check the origin?

  • Since the map sprite is the same size as the layout you can do this. Make the map sprite's origin be at the top left, give the map sprite the drag and drop behavior, and finally add this event to limit how far you can drag the map.

    every tick: map: set position to clamp(self.X, OriginalWindowWidth-LayoutWidth, 0), clamp(self.Y, OriginalWindowHeight-LayoutHeight, 0)

  • Ah, cool, didn't notice that. Things really are all over the place. On the plus side I now know how to do one more thing without construct.