Creating/destroying and view

This forum is currently in read-only mode.
From the Asset Store
Easily generate many levels from a set of pre-built scenes (Construct 3 template for top-down view games)
  • Hi,

    Trying to power parts of my game with python.

    Got a couple of questions:

    1) How can I create and destroy sprites using Python?

    I want to create some enemies at random places when the player enters a room.

    Would also be useful to know how to remove sprites when they are no longer needed.

    2) How do I control the view from Python? The way I'm doing it now is to save the desired view coordinates to some global vars and then reading them in later in non-python land. It's a bit ugly to do it this way and I would appreciate some help.

  • It's not possible, is it?

    Been looking through construct for a couple of days now and the closest thing I have found is SpawnObject, but it only creates new objects on a existing objects image points. As far as I understands it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can actually use the System object's actions from script, the Create one is (for example):

    System.Create("Sprite", 1, System.mousex, System.mousey)

    where 1 is the layer number, and it creates at the mouse. This isn't clear, I know - the next build will have proper intellisense incorporated for the system object, just like with normal objects.

  • There is a System? It didn't show up in that list to the right when I tried to use it so I figured it didn't exist.

    Thanks a lot for the help!

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