0 Favourites

How do I RANDOMLY select image point to create object?

  • I have an event that says:

    system - every 3 seconds: create object from image point 1 of another object of both X & Y. Here is the command:

    Snowman1.ImagePointX(1)

    Snowman1.ImagePointY(1)

    (screenshot attached)

    I'd like the game to instead RANDOMLY select different image points to create the object from. Any idea how to do this?

    I was thinking maybe it is something like:

    Snowman1.ImagePointX(1,2) <-- telling it to pick 1 or 2 of the image points but that doesn't work.

    let me try and explain what I am attempting to do: I have a snowman. The snowman has two hands. The left hand is image point 1 and the right hand is image point 2. I would like to computer randomly pick either the left hand with the right hand and then throw the ball. The problem is, I seem to be required to pick only one of the image points. Any ideas?

    PS: When I try and add the attachment, I get the following error on this forum (just figured I'd mention it):

    General Error

    SQL ERROR [ mssqlnative ]

    SQLSTATE: 22003 code: 8115 message: [Microsoft][SQL Server Native Client 11.0][SQL Server]Arithmetic overflow error converting expression to data type int. SQLSTATE: 01000 code: 3621 message: [Microsoft][SQL Server Native Client 11.0][SQL Server]The statement has been terminated. [3621]

    An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • ...............................

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
217 18,572
humanescape's avatar
humanescape
Unread hot topic
99 10,159
karshinkoff's avatar
karshinkoff
Unread hot topic
167 14,518
DMT2005's avatar
DMT2005