Triggering Changes Using Image Points?

This forum is currently in read-only mode.
From the Asset Store
With this template you will learn how to use the GooglePlay Games native plugin
  • Is it possible, and how, can I change image point usage during game play for upgrades? My ship has three image points. One is the default weapon. I want to grab an item that will allow me to change from using image point 1 to using points 2 and 3 (shutting off 1) to use a different weapon. I can grab the item (doing same method to grab a health pack) but not sure how to enable and disable image points, if possible.

    Maybe the idea would be to make a copy of the object (the ship) using the two points, and a trigger to switch the object instead?

    Thank you.

  • no need to make a new ship

    just make a private variable 'gunmode' or something

    and either set it 0 or 1 for different modes

    or set it to "front", "sides"

    and make all your gun placement events work testing the variables first

    if 'gunmode' == "front"

    -------set gun position to ship.imagepoint(1)

    else

    -------set gun positions to ship.imagepoint(2)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Could you tell me what action I would use? I can make it take the item and change the value, but not sure which action to use the commands to set image points.

    As of now...

    + Hero: On collision between Hero and poweruplevel2

    + Hero: Value 'Weapons' Equal to 1

    • > poweruplevel2: Destroy

    Thank you.

  • Ah, I was able to figure it out.

    The ship grabs the power up and change weapon state from 0 to 1:

    + Hero: On collision between Hero and poweruplevel2

    -> Hero: Set 'Weapons' to 1

    -> poweruplevel2: Destroy

    Then I changed my SPACE PRESS from:

    + MouseKeyboard: On key Space pressed

    -> System: Create object Bullet on layer 1 at (0, 0) from Hero 's image point 1

    -> XAudio2: Autoplay resource "imphenzia_soundtrack_laser36.wav" (No loop)

    to:

    + MouseKeyboard: On key Space pressed

    + Hero: Value 'Weapons' Equal to 0

    -> System: Create object Bullet on layer 1 at (0, 0) from Hero 's image point 1

    -> XAudio2: Autoplay resource "imphenzia_soundtrack_laser36.wav" (No loop)

    + Hero: Value 'Weapons' Equal to 1

    -> System: Create object Bullet2 on layer 1 at (0, 0) from Hero 's image point 2

    -> System: Create object Bullet2 on layer 1 at (0, 0) from Hero 's image point 3

    -> XAudio2: Autoplay resource "imphenzia_soundtrack_laser36.wav" (No loop)

    This was assuming point numbers (1, 2, 3) are assigned in order of creation, and not in the image point list in the picture editor (because in my list, the point 1 is at the bottom of the three points in the list).

    Now I have a basic understanding. Thanks for leading me the way.

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