Create object at Image Point not working (Android)

0 favourites
  • 6 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hi! I tested my game on PC, iOS 6, iOS 7 and Android 4.4 and I noticed a problem on the android tablet. When a object is created at an image point it sometimes appears half off screen or outside the image and not at the image points. Did anyone else notice something like this? It did not happen on PC or the iOS devices so far.

    Here is the code I used:

    <img src="http://img5.fotos-hochladen.net/uploads/spawnbugandroidyv2fnpqs86.jpg" border="0" />

  • You shouldn't expect the function return value to be the same out side the on function event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • But it works fine on PC and iOS. I thought the ReturnValue will be accessible outside (got a sample from someone where this worked) and the manual says:

    ReturnValue

    Return the value set using the Set return value action from the last function call. If Set return value is not used in a function, it returns 0.

    So it should be at least always "0" and return the Imagepoint X and Y of point 0 if it is not working properly, and not spawn anywhere on screen where no Image Point is placed at all?

  • You have every random 4 seconds, which is not ideal(should be if random(something) = something else, then do stuff), setting it to -1 all the time.

    Also do you see the expression to get the return value for a specific named function?

  • But whats the difference when using "if int(random(x)) = y". It only spawns when the random x is y. Can you explain why this method would be better, please?

    Do you mean "call" (Call a function directly from an expression.)?

    scirra.com/manual/149/function

    btw:

    the collapsed function code:

    <img src="http://img5.fotos-hochladen.net/uploads/arrayfunction5zjk4f2rmq.jpg" border="0" />

  • Every random() seconds doesn't make sense logically since the event is run every tick. So if random = 4 in one tick, and 2 in the next, 2 will come first, out of order.

    There is no expression to get a named function's return value, that's the point.

    The function object is global, so the return value can be changed by any function call.

    Hopefully you can see where that could be an issue down the line.

    Also pretty sure that While wont play nice in an event that's only triggered once

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