Jay K's Forum Posts

  • 2 posts
  • Hello Nabu, thank you for your advice I really appreciate it.

    I think I understand what you mean.

    Now at the moment I don't have acccess to my computer since I am at work but as soon as I'll get home I will try to pass the UID to the following functions via function parameter and return value. I have to admit I didn't try that one.

    Thank you again for your help, I will let you know whether I was successfull or not.

    Edit:

    Thanks to your input Nabu I found 2 ways of making this work, the first and simpliest was to add a wait event right after calling my "spawn_ship"-function.

    I followed your suggestion though to work with the UID as a retrun value which also works just fine and is in my oppnion the more elegant way of solving this:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, I am desperate, I tried for some days to figure out how to address an individuall sprite and alter its instance variable 'angle' but nothing works.

    Here is what I have done so far to create my game:

    What it is supposed to do is:

    When I press the 'F'-Button i want to spawn a sprite and then call further functions to set some instance variables of the just create sprite.

    I want for example to set the angle of the the red team's sprites to 180 degree.

    Now, when I press 'F' the sprite is created but its angle is not changed:

    It changes only the moment I create a second sprite by pressing 'F' again:

    What did I do wrong?

    How can I change the angle of the first sprite without having to press F again and spawn a second one?

    I already tried to use several pick conditions for the functions 'setFactionRed' and 'set_Tri-Fighter' like for example "pick highest instance variable PilotIDNumber" or pick via "comparing PilotIDNumber to global variable latestSHIPID" but both didn't work.

    Thank you very much for your time invested.

  • 2 posts