oosyrag's Forum Posts

  • Get the system time - https://www.scirra.com/tutorials/940/ho ... -a-project

    Convert to base units of seconds.

    Record via variable/localstorage/ect.

    Compare with last recorded system time on resume to calculate how much time has passed.

    This system is cheatable by modifying the system time. Otherwise, you will need a server side time check. Or, figure out how to request the current date/time from a timeserver.

  • As you said, your temp array is empty the second time you call shuffle... So before you shuffle, you need to rebuild your temp array. Either copy your current array to the temp array to shuffle the remaining cards, or populate it from scratch.

  • So basically you were taking advantage of the fact that buttons did not trigger the "on tap" condition, while sprites do. To solve this, add a condition to your ”on tap"event - an inverted "is touching" spriteButton.

  • Can you take a screenshot on phone/pc and upload?

  • Layer two images of your ship sprite on top of each other. One for the interior, one for the exterior on top.

    While Player is overlapping ship, set exterior visibility to 0.

  • Steps to try:

    Change the Add 1 to powerGlove action to activate the group directly. Does this work? If not, you have a problem with your conditions. If it does work, then something is wrong with your variable. Make sure it is an integer and not a string perhaps?

    To confirm, try enabling the powerglove push system group with a simple keypress or mouse input and see if that works properly (remembering to disable the powerGlove=1 condition).

    Edit: Sorry just read more carefully and noticed you did say that your variable never gets updated. So it is most likely the Pick instance by UID condition that is not triggering. Can you elaborate on this logic why you chose to do it this way?

    Just hazarding a guess that the UID number is incorrect. Wouldn't it make more sense to check the animation frame of the object to see if it is displaying the powerglove item?

  • Quick answer: Yes.

    Slightly longer answer: Online multiplayer netcode may be more difficult than you imagine, especially with projectiles and a large number of actors in a real-time game.

    As for tutorials, you'll want to start here. https://www.scirra.com/manual/174/multiplayer

    You'll want to read and actually follow all the tutorials there. If there is anything you don't understand after going through those, it will be a rough ride making your own multiplayer game.

  • Wow that is an incredibly elegant solution to my example, thank you very much oosyrag. Sorry to ask more of you, but I've clearly not had enough coffee today - how would you expand that system to include more barrels, 3 or 4 or 5 say.

    Use an incrementing variable. So after each shot, add one to that variable, and use that to chose imagepoint, animations, ect... After it reaches the number of turrets, reset it back to 1. Remember imagepoint 0 is reserved for the origin). Or, you can do variable+1 when spawning from imagepoints.

    A fancy way of doing this is with a conditional operator:

    Assuming you have one imagepoint per barrel, and are not using imagepoints for anything else on that object...

    Upon firing, set ActiveBarrel to "ActiveBarrel<Object.Imagepointcount?Object.ActiveBarrel+1:1"

    This says "If the ActiveBarrel variable is less than the total number of imagepoints, then add one to ActiveBarrel. Otherwise, set ActiveBarrel to 1."

    This will cover any number of imagepoints you decide to add, and cycle through them one at a time.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • https://www.dropbox.com/s/hz5ai8rr2cl5o ... .capx?dl=0

    Use image points and toggle states, or an incrementing counter.

  • Well what I meant was if you have a solution to handle the audio crashing when returning from calls, why not do so for everything?

  • This is actually a rather difficult problem...

    I have no idea how to go about it, but I have two ideas for approaches:

    1. Using the built in pathfinding system, create paths with blocks of the same resolution as one lane, and block and unblock specific lanes for each car as necessary. This is probably a Bad idea, as updating the obstacle grid often is costly, and you would probably need to do so individually for each car to have a decent simulation.

    2. Create a custom pathfinding system with nodes at intersections per lane and bullet behaviors. Much work needed.

  • I wanted to make a system where if the mouse hovered above a tower it will show a "upgrade" button. I got that working, but the button would stay there forever. is there any way to get the button to be destroyed once your cursor has passed it?

    https://www.dropbox.com/s/b49w59ct9uv87 ... .capx?dl=0

    Right click and invert the condition.

    To be more flexible, I recommend utilizing an invisible helper sprite to define the area where the the popup stays visible instead of using the objects themselves. This will allow for more flexibility in placement of the popup, as well as stave off issues when you have multiple or other objects creating and destroying the same popup.

  • FYI, to post dropbox images, you'll need to change the link suffix from "?dl=0" to "?raw=1".

    While I don't exactly know what you are attempting without the picture... https://www.scirra.com/tutorials/5005/m ... ing-lights should cover pretty much everything to do with the shadow caster behavior if you study and understand it.

  • Jump will only go up. You'll need to either apply a bullet behavior at angle, or physics impulse depending on how you have your physics set up.

    To get the angle from your cannon to your character, use the expression angle(cannon.x,cannon.y,character.x,character.y).

  • By placing the first instance of an object in the layout editor and setting its properties in the properties bar, you are setting the default values for whenever that object is created by the system create object action.