How do I send a original variable to change in a function ?

0 favourites
  • 2 posts
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • Hi,

    This is a mock up event section to illustrate the example. Here, there are two variables, one that is damage and the other that is hitpoints. Both of them need to be send through a function to deal the damage.

    Any of the above global variables above need to be sent through it to apply it.

    The question however is that if it is possible to send a variable name to directly change them with just one line like,

    Function | On "DealDamage" | * System | Subtract Function.Param(0) from Function.Param(1)

    Where Parameters 0 and 1 would be the variable names to do it directly. Instead of using temporary local variables to do so. It's basically sending a variable itself to be modified using parameters instead of using other variables to do so.

    The ultimate question is how to and if it is possible to send a variable itself to modify it directly with the parameter itself.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This can't be done with variables.

    You can do this with dictionary keys.

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