hrisnz's Forum Posts

  • Heello Treshimek,

    you have to check your events than. Like said it should work as lions_ said.

    Here is an example file:

    drive.google.com/file/d/1Zq69THetcN6uXTa41837GbPji_-q4R8Z/view

    You gotta see how your "code" varies.

    You don't have a "for each loop" or a wrong "every tick event" or something like it in there I guess?

    Best,

    Chris

  • Hi Domino99

    for none player objects you can get some really cool bounce behavior using tween and randomized time and positions.

    Created a little example scene:

    drive.google.com/file/d/1OIe2IMaupu1hWMdfme63kiykXzLAIrAz/view

    This example is not top-down (but you could also apply it to scale to get an up and down bounce effect from top-view. But you asked specifically for players. So I guess you are aiming for something pinball-like? "where players bounce off walls [...] top view."

    So for players and interactive elements, I don't see any other solution than doing it physics-based and playing around with elasticity.

    I hope you have a great weekend!

    Best,

    Chris

  • Hello Treshimek,

    what said should work!

    If you need further control, you can also give your orb object an instance variable / boolean and only turn this true if more complex events should reliably destroy only this orb.

    Example:

    Event 1

    IF

    on collision with "ship",

    time > 10 seconds,

    orb's health < 10

    THEN

    set orb's instance boolean (variable called "destroyable") to true

    Event 2

    IF orb destroyable = true

    THEN orb -> destroy

    Bottom line: Do as lions_ said and it should work perfectly for your example. But maybe for more complex ideas, you might want to give "instance variables" a closer look in the future to further influence when and which individual objects get picked.

    Hope this was somewhat helpful.

    Have a great day!

    Best,

    Chris

  • dop2000 thank you soo much for putting that together! I very much appreciate this commitment to help =O

    I will post a quick summarizing report of my findings as soon as I can.

    But so far, thank you :)

  • uuuh dop2000, very outside the box thinking :) I like that. First I thought this will never work for "android only" / still work for IOS but I think its worth a try!

    I'll let you know of the outcome.

    Have a great day!

  • Not much of an actual update but a follow-up post on the same project but a different problem :D

    construct.net/en/forum/construct-3/how-do-i-8/stop-androids-on-screen-153087

    But here is a WIP video, since I promised to keep you posted on progress :)

    (Too bad IOS does not show visual touch feedback when screen recording, scoozäy)

    hinz.design/testserver/ScirraForum/Vid1.mp4

    Preview

  • Hello guys,

    I only found very spare results when looking for fellows with the same problem :(

    The Android On-Screen Keyboard does not like my "scale outer" full-screen mode. Used when focusing a Text Input Field.

    How it should look (scale):

    IOS

    How Android scales to fit the whole height of the game, which I don't want:

    ANDROID

    when the native back button is used, the Android phone does this:

    Anybody else who runs into that kind of issue?

    Any help or advice is greatly appreciated!!!

    Have a great week everyone!

    Best,

    Chris

  • Thanks Fib and bartalluyn for your help and quick reply!

    The math forum website was a great start.

    The function looks very promising and sums up what the math forum explained very well :)

    I saw the beta feature for time and day; it really seems to be a good time saver. Going to look further into the beta version and hope the stable one will come shortly.

    In case nobody has further tips, I will just keep you posted on progress guys :)

    Thanks again so far!

    Chris

  • Hello Community :) I want to create a "simple" ... :D Hell yeah - how all projects start...

    I want to create a rudimental calendar app using Construct. All functionality is to save two texts per day to e.g. local storage. It would be totally ok if the calendar "only" starts in 2020 and ends in like 5 years.

    First thought, I could create each day, each month, each day as Construct groups with variables, triggering events (e.g. only show 31 days when the month currently selected has 31 days)

    if year = 2020 activate group "2020"

    if month = "Jan" activate group "Jan2020)

    and than have each day

    and each day has two variables holding the strings...

    This of course means I need to f***ing "code" every day I want to include in my calendar :D with all correct weekdays, leap years etc... of course this is nonsense.

    Do you have any suggestion? Arrays probably are not suited, right?

    What about XML? Is this my only option? Any other way to base my events on large "sheets" and be able to save the text to the individual entries?? I have not found any plugins, former forum posts etc. Sounds almost impossible for me.

    Any help would be greatly appreciated.

    Best,

    Chris

    Tagged:

  • Thanks dop2000 for your reply :)

    "System Pick by overlapping point" is completely new to me; never heard of it. Can't wait to check it out, since it sounds like it is exactly doing what I need!

    This will save be the whole "is between values"-checking.

    But it wont save me from "OldTouchX" etc. because "Is touching object" does not work with "on touch end" because the touch already ended when the "is touching object" is checking for Touch.x and Touch.y.

    I run and check out the "System Pick by overlapping point" now now :P

    Thank a lot!!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • AllanR

    Uuh Thanks Allan! I downloaded your file already and will have a look after work :)

    Thanks for your reply!

    Best,

    Chris

  • Hello!

    I tried my best to search the forum and internet but could not find an answer to this. So maybe you can help or have any advice :)

    Is there a way to use variables to use as input for a "ray-cast" to detect hitboxes?

    Let me elaborate on this one. I think its quickest to give a pseudo-code example.

    Global Variables:

    OldTouchX

    OldTouchY

    On any touch > set OldTouchX = TouchX

    > set OldTouchY = TouchY

    // This will save the "old touch position" after you are not in touch anymore. This way I can do the following:

    On any touch release && OldTouchX is between Button.X-(Button.Width/2) and Button.X+(Button.Width/2) && OldTouchY is between Button.Y-(Button.Height/2) and Button.Y+(Button.Height/2)

    // This way I can use a touches "end" rather than "tap" or "is touching" object to trigger events. This is a great behavior I couldn't find another way to accomplish.

    The Problem

    This works perfectly for rectangular elements! But is there a way to use variables to see if e.g. OldTouchX and OldTouchY are hitting an elements hitbox, rather than using "between two values"??

    This way you could use this "detect if object has been touched on touch end" to detect circular or even free defined hitboxes.

    Maybe also check out this other entry where we actually came up with this solution to solve the original problem of how to detect if an "object had been touched on touch end"

    MISSION IMPOSSIBLE: HOW TO (FINE) TUNE "TOUCH > ON TAP":

    construct.net/en/forum/construct-3/how-do-i-8/mission-impossible-fine-tune-150292

    Any thoughts or help on this one?

    Thank you <3 :)

  • Hello and thanks to everyone who replied!

    I tried a couple of things now, including AllanR's way. But none of them seemed like what I was looking for. Sorry, AllanR, your way seemed promising but I couldn't utilize it to its full effect since I was lacking further info on how you actually do implement or rather use it. The setup is quite clear - I tried creating an element on each touch and have it save stuff etc. but the crucial logic for "on tap end" (or "Touch > On Tap") was sort of missing.

    Anyway...

    I tried this approach, and it works pretty nicely:

    EDIT: I opened and took a screenshot of "between two values" since its visualization in screenshot_2 is quiet confusing and this one easily explains it:

    I save each old touches position by simply tracking it to global variables when in touch and not delete it when touch ends, so the old touch stays remembered.

    And then I detect if this old touch is overlapping e.g. my button using ranges.

    What do you guys think of this; any thoughts and improvements?

    I hope this helps someone in the future.

    Have a great week!

    Chris

  • Thank you! Really great input - not touch ... :)

    What I don't like about using the "on touch start method" is that if the user's finger is in long contact with the screen and the finger comes across a trigger (as if you would draw on the screen and touch a button) it feels very unnatural to trigger the action for the user.

    I was thinking a nice behavior would be "on touch release" so a behavior that saves/remembers "has touched" and it's X.Y and deleting it after a buffer.

    AllanR's solution sounds also interesting. I'm gonna give it a go.

    Until than.

    Have a great week!

  • Hello folks :)

    Once upon a time, till this day, the documentation was praising the following:

    TOUCH

    On tap

    On tap object

    Triggered when a tap gesture is performed, which is defined as a touch and release in quick succession in the same location. The On tap object variant triggers when this gesture is performed over an object.

    (https://www.scirra.com/manual/119/touch)

    PROBLEM

    In every project I used the on tap event, I experience the same frustration: it seems like the "tap" has to be performed quite perfectly (same location) very quick touch and release.

    QUESTION

    Is there any way, now or in the future, to fine-tune the On-Taps parameters?

    I think having the option to increase the duration between touch start and touch release to return true could make a lot of games be more accessible and user-friendly.

    Does anybody have any opinion, thoughts or ideas on this topic?

    Have a great week guys!