magicalblender's Forum Posts

  • 6 posts
  • Thanks for your response. I will add this information to the wiki.

  • I have a sprite with a Bullet behavior. I want to change its speed in python. What is the syntax (if any) to set the variables of a behavior?

  • 1. I have a Sprite with a Lens effect on it. I want to change the Lens Magnification factor inside a python script.

    1a. Is this possible?

    1b. If so, what is the syntax for accessing an effect's variables from within a python script?

    2. I have a Sprite with a Lens effect on it. I have a text box, whose text should be set every tick to the Sprite's Lens Magnification factor. So I want an "Always" Event with a "Text: set text to [Sprite Lens Magnification factor]" action.

    2a. Is this possible?

    2b. If so, what is the syntax for accessing an effect's variables from within an expression?

    Note that for all questions above, the Lens effect is just an example. I'm really interested in effect variables in general.

  • I would like to contribute.

    User name: magicalblender

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for your help. That is precisely what I was looking for.

  • What method, if any, is the correct way to get a reference to a newly instantiated object?

    I have an object called Widget, which I want to create many instantiations of using Python. After creating a new Widget, I want to access it so I can modify its properties. However, I don't know how to get a reference to the new Widget.

    I thought System.CreateObjectByName() would return a reference to the new Widget, but it doesn't.

    I thought that I could get the new Widget by accessing the last element of the Widget[] array, but it seems like the array doesn't add the new objects right away. (maybe it waits until the next frame?)

    Here is a .cap showing my failed attempts.

    Download

    (I'm using Construct version 0.99.96, if that's relevant)

  • 6 posts