R0J0hound's Recent Forum Activity

  • They said they are working on fixing all the links that were lost in the forum transition.

    It’s been a bit so we’ll see. I won’t be reposting any links otherwise.

  • So you’ll want to use + instead of & to add them together.

  • That’s because & is an “and” operator. If both numbers are non-zero then the result is 1.

    You probably want to add the numbers together or something.

  • You’d get pi from some place like this:

    geom.uiuc.edu/~huberty/math5337/groupe/digits.html

    And copy paste it, or a portion of it into a variable.

  • Numbers are stored in 64bit numbers so that gives only about 15 digits. That seems like that’s what you are seeing.

    If you want more digits of pi you’ll need find an algorithm to calculate digits of pi, and a way to do it without the limits of 64bit numbers.

    The simplest solution would be to just store pi to as many digits as you need in a text variable and use the mid function to get digits.

  • Speaking about links, is there any word on all the missing links in posts? Almost all my links to files on Dropbox and such are just gone, or the url is chopped.

    Anyways just curious. I probably won’t be fixing or re-adding the links in my posts myself.

  • Else will only run if the mouse isn’t over any buttons. If you move the mouse fast enough you can move it from one button to another without being on any resting space.

    Anyways it’s not a bug, but is an expected behavior when multiple instances are involved.

    There are a few ways you can do it differently so it does what you want. The first is to make a “for each button” event and put your two conditions as sub-events.

    Another idea is to just not use else and use an inverted “is over button” condition.

    Probably what I’d do is

    Every tick

    — button: set frame to 0

    Mouse is over button

    — button: set frame to 1

  • I don’t have time for a while to open construct.

    You can just throw that in a system compare condition. That expression for the first part and 1 in the second.

  • To use or in an expression you have to do it like this:

    Sprite.x=22 | sprite.x=33 | sprite.x=66

    So you’ll probably want to store the the long position expression in a variable first to simplify.

    If you do stuff like that a lot you could make a helper function to simplify things further.

  • The logic to do moving platforms would ideally be:

    1. Move player

    2. Find the platform the player is on, if any.

    3. Move the platform, and move the player by the same amount if they were on it.

    But because of when the behaviors run it can end up being:

    1. Move player

    2. Move platform

    Or

    1. Move platform

    2. Move player

    Depending on their order in the engine. It’s not something you can control. That’s what can cause them to not be synced.

    The platform behavior does have logic to move with the platform it’s on, but it depends on which is moved first I suppose.

    You probably don’t want to create a platform movement entirely with events but that would give the most fine control of stuff. On the other hand, it can be tricky sometimes to move stuff with events or other behaviors in a way to keep other behaviors happy.

    In this case you probably can get away with it. So instead of using a motion behavior on the platform you’ll want to move it with events so we can do that ideal method listed above.

    Here’s some simplish events to do that:

    Global number onPlat =0

    Global number dx=0

    Player: is overlapping platform at offset (0,1)

    —- set onPlat to 1

    Else

    —- set onPlat to 0

    Start of layout

    —- platform set speed to 200

    Platform.x >400

    — platform: set speed to -200

    Platform x < 100

    —- platform: set speed to 200

    Every tick

    —- set dx to platform.speed*dt

    —- platform: set x to self.x +dx

    If onPlat = 1

    —- player: set x to self.x+dx

    Now that assumes just one platform that just moves to the left and right from 100 to 400.

    Multiple platforms could be done by saving the uid of the plat the player is on and only move the player by the amount that play moves.

    Also you can make the platform motion as complex as you like. Just move the player by the same amount.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There are a fair amount of places where it can't work so I'd recommend testing every step of the way to verify it's working.

    Like when you do the ajax request, verify it works by setting some text in the "on complete" event. If it doesn't, then maybe look at the manual portion of ajax for ways to see what the error is. Maybe a bad request or something.

    If that works then you could set the text to the returned text to see if it indeed is the data you wanted.

    Next you can do the action to set the "data" variable. Open the browser console. Are there any errors? With the console open type "data" in the prompt. It should show a collapsible tree of the json.

    So the same for any other js you run with the browser object.

  • The website transition was unfortunate since urls where omitted or broken. Maybe they will fix that with further website updates. I'm not going to touch it though.

    A workaround idea could be to use the wayback machine to look at an archived version of the old forum with the link text still intact.

    archive.org/web

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 157 followers

Connect with R0J0hound