sparkfeather's Recent Forum Activity

  • Thank you very very much for responding ^^;

    -

    Why does reality hate me so =_=

    Today, with 0 changes, it's just decided 'oh hey, he has asked for help, now that we have screwed with him lets start working k?'

    =_=;

    Though, it doesn't seem to always want to work still, sometimes it'll

    act like it did yesterday where I'll have to be clicking it for more

    than a minute before it decides it wants to pop-up (about 1 in 20).

    Here's the file

    http://ifile.it/dvy560i/ajaxtesting.rar

    edit:

    I should also note that, as you mentioned about it only acting once

    it's been able to receive the requested information, it may be considered

    as just a delay, but I have clicked it multiple times today with it

    not working, then waiting 5 minutes and still nothing, then clicking

    a few more times and it eventually displaying the text right after

    that.

  • I've been using this tutorial -

    scirra.com/tutorials/61/ajax-example-with-construct-2/page-1

    • to try and get an understanding of ajax/php calling to create

    a high-score table for a game, however I haven't even been able to

    get past the understanding of Ajax due to some, confusing issues?

    The tutorial is that you press a button, and hey-presto, the text

    is suppose to pop-up.

    I've been using the supplied files at the end of that tutorial,

    (obviously changing the .php file path).

    For some, unknown reason, it simply isn't functioning for me like it should.

    I've clicked the button, and nothing happens, so I have kept clicking

    it, and clicking it, and clicking it a lot and then the text randomly

    pops up for I have no idea what reason.

    I've tried multiple times, and it's eventually popped up at different

    times, sometimes when I'm sure I wasn't clicking on the image.

    Also I have clicked the image a single time and waited 10+ minutes,

    the text never changed.

    Does anyone know what might cause this, has anyone had the same problem

    and found a solution, please I'd really appreciate whatever help or

    experiences can be shared.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks so very much for your incredibly deep response and example!!

    Sorry this reply is so late, had a lot of things come up recently,

    and this took forever to workout.

    Eventually though, thanks to your demo :D, I did manage to workout

    a solution. Your example certainly gave me the headstart I needed,

    but still I found whenever I wanted to control the motion myself,

    it would effect it's the location independently of objectA.

    However finally, finally @ *collapses* /knows I fail,

    I managed to get it down to a very simple solution :D....

    Based on your offsetting the location from ObjectA,

    I have a Sprite object with 8direction behavior, that stores it's

    original location in a private variable on layer start.

    Then it adds any change from that location, to the variable

    that ObjectB is offset from ObjectA.

    Here's the .cap - http://ifile.it/9op16gx/movewithrelative.cap

    Again, thank you so very much, I know this end solution feels blindly

    simple for an experienced user, but I couldn't have gotten here without

    your help, thanks :D!

    Also I never knew about lerp, definitely something that should come

    in handy in the future from what I read about it after some searching :).

    Thanks for sharing your experience :3!

  • What I mean is,

    is it possible to move objectA with objectB, however you can also move

    objectB around as it's movement still stays relative to objectA.

    So for random example, say I had an airplane that was moving along

    the screen, but I wanted a bird to stick with the airplane as it moved,

    however I also wanted to move this bird around that location.

    Could anyone please let me know of a possible solution to this?

    I'd greatly appreciate any advice :)!

  • Ahh yeah heh, hadn't thought of it like that, thanks :)

    Hopefully it does come in handy for someone ^^

  • Thanks very much for your time in responding Steven.

    It seems for some reason I'm incapable of finding a solution to the problems

    I have that can actually be solved in construct, without posting a topic

    on the forums 5 minutes before hand and embarrassing myself =_=;;;

    It ended up being a needlessly silly wrong event setup, because of some

    overlooked confusion.

    I had the resume/play actions under the 'is jumping' event, and I only

    just now discovered/realized/found the problem. I remembered somewhere

    somehow finding out about how even though the events are written as

    'resume current animation' and 'play current animation', if an animation

    is already playing, it will cause that to pause.

    And so because there wasn't a 'trigger once' condition, it was looping

    the resume/pause of the animation and never made any progress until

    it was falling.

    Fixing it with a 'trigger once' has got it working cleanly now.

  • Just a quick question,

    With the 'Platform Behavior' behavior, is there something hard-coded

    in that which stops an animation being played while the character is

    'jumping'.

    Because no matter what I can't seem to get it to play the animation

    while the character is leaping upwards, however when it's considered

    to be in the 'falling' state per the platform behavior variables,

    the animation will play.

    I have no pause action anywhere, I've tried both resume and play

    actions when the character has jumped, however none of them work,

    even though the character's animation will start playing when falling

    back to the ground.

    Is there some way to fix this so that the animation doesn't stop?

    Or am I the only one getting this problem?

  • Thanks alot!, I never expected the code to be wrong cause I didn't see it different elsewhere and it worked perfectly on the original (though I did use '-' instead of '+' for the set x/y cos/sin area because for some reason the '+' didn't work but '-' did).

    After fiddling with it for awhile I did get it working with that code

    with the new objects, thank you so much!! I really needed this.

  • I want to be able to rotate my object around a certain point,

    however it doesn't seem to be functional, as in an actual

    program error?

    To explain myself I need to start from the start of my search for a solution-

    While looking for solutions, I started with finding this topic-

    http://www.scirra.com/forum/plugin-ik-solver-2_topic37671.html

    I opened this, but it wasn't quite what I was looking for, however

    I was still using the scene for experimentation.

    I then found-

    http://www.scirra.com/forum/rotate-around-point_topic37367.html

    And I used this on one of the objects in the IK solvers example scene.

    Not wanting to loose what I had, I saved, and it gave the message

    about being from an earlier version and am I sure I wish to save

    as I won't be able to use it in an earlier version, I said yes.

    The solution above I liked, so I tried to use it in my project scene,

    it wasn't working. it spins madly as if it's out of control when

    rotating, instead of the original experimental scene.

    I tried to also use this solution-

    http://www.scirra.com/tutorials/44/using-a-pivot-point-for-rotating-objects

    And that didn't work either.

    Now, I have created a new project, with the same object name and

    variables as the original scene and copy-pasted the code over,

    and that still span wildly.

    I then created a new object in the original experimental scene,

    applied the same code, and found it does the same thing.

    If you slow it down by using 'every 1000 miliseconds' you can

    see that it seems to rotate by 45 degrees, while in the new

    scene I created and tested it, it rotates by 90 degrees (an extra detail,

    the scene where it rotates 90 degrees, the distance between the

    objects location and the rotation point is about half).

    Here's a .cap of the experimental scene with the old object working,

    and the newly created object not functioning the same way.

    (use left click for functional object, right click for non-functional)

    http://ifile.it/634isr5/rotationdemo.cap

    Basically my question is.....

    What are we meant to use, if this isn't functional?

    Is it still possible at all?

  • I am no friend of the wait object, because it makes event sheets harder to maintain. That's why I never use it. I just proposed it, because quite a few people here swear on it, and I didn't want to hide it ;)

    Ahhh no worries, well thank you for pointing out all the options

    without limitation :)

    I'm not quite sure if I understand. PVs are unique to every instance, it is just a case of picking right. If I pick one instance and set 'timestamp' to timer, only 'timestamp' of that one instance is set. So, if you want to pick an instance at times, when it is not created, you can do so by picking based on oid or uid, or set an 'pid'-pv on creation.

    For a situation, where one object would have to spawn a few instances delayed, there are objects like array or hash table, where you could store the timestamps, test against timer and clear/remove the cells, when creating the corresponding instance. Straightforward and easy to control :)

    OID?

    I know UID is uniqueID, however that includes all objects in the scene,

    and it would be impossible to know which instance of the object you

    wanted as well.

    I like to use a private variable 'states' to differentiate them somewhat,

    so when a creature enters the 'attacking' state it would change to the

    attack animation, and spawn a weapon/ranged attack/effects on frame 3,

    it would know to check for frame 3 of an enemy instance in the attacking

    state, however how would I get the weapon/ranged attack/effect to spawn

    at that enemy specifically. Because it wouldn't know which of the enemys

    positions to spawn at.

    I've tried with the enemy damage text, when an object is overlapping it

    I have the text spawn at the enemy once by using 'trigger once',

    however if there are multiple enemies, it will cause it to only create

    a text at one of the enemies you are overlapping.

    I've tried using the 'for each' event condition, but it causes one enemy

    to have the text created once like it should, but the other enemies that

    are overlapped continuously spawn the object while they are overlapped.

    No matter what I do I can't seem to have events run while considering

    only the individual object they are running at and it's parameters/location, etc.

    I can't agree here. I use the 'timestamp' method in every project, sometimes on hundreds of sprites and instances. If you carefully prepare your project, you won't get into trouble. Instead, while using something like the wait object would really be a problem under such conditions, it is relatively easy to follow the logic behind the 'timestamp'-events.

    What happens when you need to know that one area of an object you need

    a timestamp for won't overlap another area. You just make multiple timestamps?

    I see. Well, this is a situation, where you have to decide, which one is more important to be time-based.

    You could, for example, constantly check the framerate (e.g. through getting the mean of 1/TimeDelta) while timescale = 1. Then, when reducing timescale, you'd calculate the proper timing for the text boxes based on that framerate, and alter them tick-based until timescale = 1 again.

    Or you could leave timescale untouched and slow the world down by changing all the timebased values, including animation speed, etc. But that would mean a huge effort to make.

    While reading over that, thanks to it I was inspired to another possible

    solution.

    I could have a global variable that's set to 1, and have every event

    where I use multiply by that global variable, and then with the events

    where I cause the timescale to for example be set to 0.2, I could set

    that variable to 5, automatically causing the time for those events

    to balance out. Would that be a good solution?

    I recommend to download Verve!, an example game that is completely time-based. There are a lot of the things realized that you are thinking of (For example, there's a commented volume fade over time, although timescale=0 at that time). I commented every single event, so it should be a good source of information.

    Thanks for that recommendation, I've looked over it a bit and it's a

    great example, I'll be sure to delve into it deeper before responding

    again, and once again thanks so much for taking your time to help me like

    this, I appreciate it so much! ^^

  • Arima

    So, from that example Arima as I now understand it thanks to your

    fantastically layed out and simplified written view of how it works,

    because at 1fps timedelta in that expression will result with 100,

    and 10fps it will result with 10, the time passes as:

    1 x 100 = 100,

    and

    10 x 10 = 100,

    in other words it will end up traveling the same amount.

    Thank you so much for that example, it really allowed it to make sense

    for me, I greatly appreciate it!

    ------------------------------------------------------------------

    ------------------------------------------------------------------

    tulamide

    I'm not using this for movement, however I understand what you mean

    by only using one method as it would easily unsynch the gameplay

    if you were to use different methods in the same game.

    Thanks a lot for that information, I hadn't recognized or thought

    about that but that certainly makes sense how you put it. An event

    can't run every 1ms if it can't register that amount of time passing,

    and would make the event occur basically whenever it could, cause

    at 60fps every frame that is registered would have passed a millisecond,

    and it wouldn't know a millisecond had occurred between those frames

    because it wouldn't have been there to find out.

    wait

    That I've found is next to useless, it constantly caused errors in

    the event hierarchy because it would re-check the above variables

    after the time had passed instead of only causing a delay before the

    next action occurred.

    For example, if you had it check if a private variable were equal to 0

    before running some events, one of which would need to change that variable

    to 1, when it reached the next action after waiting maybe 200 milliseconds,

    the events condition wouldn't be valid anymore and it won't occur.

    timer

    that's what I've had to use for objects so far, but it becomes an issue

    very easily.

    #1 if there is more than one object on the screen (if it's an enemy in which multiple enemies would be created, you couldn't get a timer to

    start on individual enemies without it occurring on others. For some objects that I have destroy after a certain amount of time, even if there are multiple you can use that timer by only setting the timer

    when a condition that a variable is equal to 0 is met, then change that

    to 1 after the timer is set in the same event. But that only works because you only need to use the timer once and it's an event based off the objects creation.

    #2 if you want multiple areas of an object to be based off time, it'd very easily become a large hassle and difficult to manage if you kept having to create private variables and setting them to time and checking them.

    Both of these issues are the reasons causing me to currently use ticks

    for some events, but now I recognize that's certainly no safe option,

    however you can't run events after 'x' timedelta or anything like that.

    Even with a global variable if multiple objects/events used it it wouldn't help to set a single global variable to 'Time' and keep

    setting and then checking after time has passed with that.

    The timeline object would in a way share the problems described above

    for the timestamp solution.

    The reason I want some events to not be affected by timescale, is I want

    to slow down the world by using timescale (all events/objects/etc), however

    some things I don't want to slow down, for example how long a text object

    spawned off an enemy displaying the damage they have taken would last

    before being destroyed.

  • Thank you very much for all your additional replies with further help.

    It's just a shame it has to be so complicated to run games successfully

    across different computers with different framerates/refresh rates,

    and that timedelta confuses the hell out of me.

    It makes it more 'programmer-skill-memory-independent',

    and I've read the wiki link about it multiple times and I still don't

    really understand how it's used/where it's used.

    If timedelta is FPS independent, how do I do something simple like I would

    with ticks, where I want to make an object after 100 ticks,

    an amount of time that would be consistent across varying framerates?

    Also in this example,

    "Note that at 100 FPS, TimeDelta = 0.01 and 200 * 0.01 is 2: that's the 2 pixels per tick we needed. And at 50 FPS, TimeDelta = 0.02 and 200 * 0.02 is 4. In general, to move an object at a rate of pixels per second, simply use:

    Set X to .X + (r * TimeDelta) "

    What is the "r" in "(r * TimeDelta)"?

    Also from what I understand, if TimeDelta becomes necessary to swap with

    all my events currently using ticks, what would be the best way to have

    things consistent in their time when I'm using timescale? Have seperate

    trees with different times set based on the timescale at the time?

sparkfeather's avatar

sparkfeather

Member since 23 Aug, 2011

None one is following sparkfeather yet!

Trophy Case

  • 13-Year Club

Progress

13/44
How to earn trophies