oosyrag's Recent Forum Activity

  • you can simply use replace(src," "," ") to turn double spaces into single spaces.

    (The forum auto corrects the double spaces between the first set of quotations, so make sure you have two there, or however many you want.)

  • Subscribe to Construct videos now

    Is a gold mine of information regarding camera logic.

    Basically, you do not want to use scrollto on your player object. You'll be using an invisible helper sprite, lets call it "camera" and scrollto that. You will be moving the camera object around with constraints (min(), max(), and clamp()) based on player position and your preferred logic.

    But from the video you can see how much consideration goes into having excellent viewport camera logic.

  • Break up the http://www and the rest of the link to post long URLs without rep.

  • As far as I know, you'll need to write a bit of code or use a plugin to encrypt/decrypt your json when you save/load it. One of the simplest ways is a character shift/replacement. It can be cracked, but if you have the luxury of worrying about the tiny population that would go through the effort, you probably have a wildly successful game already anyways (And then you can just change the method if you REALLY care that much. Which you probably won't.)

    Loading the files from a server is indeed the most secure method. At the very least, a user would not be able to change the file.

    If you think any offline game can be safe from hacking, that is simply not true. Effort and time is best spent improving your game rather than worrying about hackers, or you will never get to the point where you make a game worth hacking to begin with.

  • Here is an example to get you started. https://www.dropbox.com/s/0ru37dkgyhqvi ... .capx?dl=0

    It will take some rather advanced artistic skill to make it actually look like water though.

  • It works exactly as described and expected. You should post a capx.

    Sprite 0 moves downwards ever tick until it passes 786, then gets destroyed. Then myvariable increments every tick, and will run the last action every tick after it gets past 50. So what is in your last event in the [do something] part?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have no idea what you want it to look like.

    Generally if you want it to look good, as in traditional animation, the entire swing should be drawn out frame by frame and collision boxes applied per frame as an animation, rather than moving and rotating a static sprite.

  • The exact way to achieve what you asked is to store the mouse x/y values in a variable every tick, and compare the current location of the mouse vs the stored value as a condition before updating the variables with the new values.

    This won't be much different than every tick though.

    A more efficient method would be to have an update event run with the mouse button is down and every x seconds conditions.

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

    A rough draft. You'll have a lot of tweaking to do with the angle of motion to get it to how you like. You may want to try using an imagepoint on the sword rather than the player origin to base your angle off of. Also the speed and acceleration (deceleration in this case) can be tweaked as well to get the type of motion you want. A more complicated formula will get you the rapid decay or "eased out" motion as used in Zelda.

    Tebbo - Angle=Angle+180 would be inverted angle, variable=constant-variable gives you invertable values. Unless you had something else in mind for inverse()?

  • You may be overthinking it - try this https://www.dropbox.com/s/urj0lhkonwuix ... .capx?dl=0

    Cooldown system can be added separately, but in the example the sword sprite simply cannot be spawned if one already exists.

  • It works fine if you change it to On touched Sprite.

    Your project has a few other problems though:

    Your hammer position is set to touch.x, touch.y, which is always the first touch's position. You'll want that to be Touch.XAt(Touch.TouchCount-1) and Touch.YAt(Touch.TouchCount-1) to set it to the position of the LAST touched position.

    Also you are using Trigger once improperly. It should not be in a subevent. This can cause your event to break in certain cases, where the health can keep going below 0 and the sprite can never get destroyed again as the event will never run again.

  • loopindex*4

    instead of loopindex...

oosyrag's avatar

oosyrag

Member since 20 Feb, 2013

Twitter
oosyrag has 38 followers

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

21/44
How to earn trophies