Aphrodite's Forum Posts

  • As far as I know, supplrt of sounds on mobile rely on the same formats, however, some actions do not work well depending on the targetted device.

  • For ghost cars, I would store the position and angle every 0.3 seconds or so, along with a timestamp, and the game would have a built in reader that would interpolate the values between two saved times to return the angle and position.

    A linear interpolation between them seems sufficient for a first test.

  • I cannot use C2 currently, but did you try forcing the texture of the layer? (Force own texture), it helped me with blend mode effects before.

  • I think event 95 is fine (C2 ensure picking is done by using the compare instance variable). And since you actually wanted the ones that have it to 3, it is not a problem.

    However, event 92 would not work well unless gunner1 and highlight were in the same container, which explain that everyone of the highlight actually increase their values.

    https://www.scirra.com/manual/150/containers

    Since the highlight I think is proper to each instance of the tower, using containers seems logic to do

    Unless you are using families, in that case, you would have to link them using instance variables to store and pick by uid

  • Hey, thanks for quick reply. So which condition I can use for that? I want to compare instance's variable.

    I would say pick by evaluate

  • No, you would have to compare (varX = "A" )|(varX = "B" )|(varX = "C") is equal to 1

    | is the logic operator OR.

  • I think in the mean time, you could achieve a similar effect with a careful use of blend modes, but this is a nice suggestion IMO

  • I tried that, but it was selecting all ships, not just the one in the same container. Thank you for confirming what I thought it was supposed to do, though. Maybe I'll set that up again and see if I can find something else in the code that is causing the problem.

    Would it make a difference that all the gun turrets are in a family and all the ships are in a family? So it actually has the gun turret family has a target, then the ship family bullet speed is set to ...

    Indeed, families and containers do not work well together, and it is a known issue that will not be fixed:

    In that case, you would have to do the correct picking yourself, I am not able to currently use C2 at the moment, so all I can do is suggesting either to do the conditions for each type of gun turret (easy but troublesome), or to store the UID of the ship inside a family variable of the gun when they are created together, and vice versa so you can add the condition "Ship: pick by unique id, the variable that contains it from the gun"

  • I think in your case, just have the condition Gun turret has target, and the action should be ship: set speed to...

    And have also Gun turret has NOT a target, ship: set speed to...

    Since you said they were in the same container, they are always picked together.

  • Ashley What's better: every n seconds or every dt*n seconds? Thanks

    Every n seconds is already frame rate independent (as the name suggest, it is time based and not framerate based, even though it cannot occur under dt itself), if you want something to happen every 2 or 3 ticks, you would be better with something similar to compare two values: tickcount%2 = 0 or tickcount%3=0.

    It all depends onnwhat you prefer to do

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just to be sure I understand clearly, NV are nerfing performances on some programs for reasons that are wrong, and WE should work around that?

    They did not do a good job, and they choose to do it that way, they are the ones that should do something about that since every workaround you could do would go currently against their decisions and so will be countered everytime until they change it themselves.

    I would say complain to them, but do not try to overwrite their choice, not worth it + not your job + you will be supporting a platform that does not try to support you anyway, since they are doing the exact opposite currently.

  • codah - that is a good workaround! ... I general I have tried to stray away from global constants as they can quickly bloat the editor with a lot of stuff. To keeps things organized I create holder objects for variables. I would probably create an object called Function strorage or something. I have alot of objects whose sole purpose is to aid in organization.

    example:

    Player_Physics (is the actual collision object with the physics behavior)

    Player_State (tracks the players states such as in air, on ground, etc)

    Player_Abilities (tracks the players upgrades and potential upgrades, like fireflower or star power in mario)

    Player_Constants (a storage for unchanging variables such as walk speed, run speed, etc

    Player_CurrentStats (a storage container for tracking variables such as current max speed, jump pwer etc)

    Player_IsSwimming_collider

    Player_inventory

    Player_expandedMath (such as old position, vector maths, and so on - provides a way of knowing projection vectors and velocities in a direction other than x,y)

    Global_PhysicsConstants

    Global_currentPhysics

    Global_GameManager

    Level_State

    ...and on and on the list goes. Storing all those things as an event variable would be cumbersome to deal with. Keeping them all in one object, like all the player stuff in player would be a hassle too. Plus the player as well as many other in game objects are much more than one collision box.

    You can have local constants and variables in groups for some particular use that will not be listed outside of their scope, that can help a lot in bigger projects.

    I also prefer to have my global variables inside their own event sheet(s), you do not even have to include the event sheet where your variables are declared for it to work, so you have a list of variable and constant you can simply read and edit.

  • Performance is not the main argument in that case, as usual I would recommand using the one that gives you the more readeable and maintainable code for your use in particular.

  • That is weird, did you placed the trigger once after the score > 5?

    Also, does the debbuger shows the variable changing or not?

  • System: trigger once while true should do the trick