0 Favourites

Create object at Image Point not working (Android)

  • 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.

  • 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:


    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?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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.)?



    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)
Similar Topics Posts Views Last Post
Unread sticky
4,517 857,341
Tinimations's avatar
Unread sticky
1,586 437,294
matriax's avatar
Unread sticky
763 305,658
asikanddestroy's avatar