child action causing parent event to malfunction?

This forum is currently in read-only mode.
From the Asset Store
Add emotion, innocence, joy and cuteness to your video game with these 15 songs and 9 SFX
  • I have a ridiculous issue that I've been trying to solve for 2 days now,

    and I've gotten close to the source of the problem, but each time I've

    gotten closer it's become more confusing and impossible.

    (I seem to be extremely good at running into impossible issues in

    programs, =_=; )

    Anyhow, a question I would like to ask, and sorry but I'm unable to

    upload the project file for you to take a look at the actual project,

    but I hope you could help me with this problem.

    Here's a screenshot of the code area though

    <img src="http://i.imgur.com/UsY9H.png" border="0" />

    For some reason, when I toggle off the actions

    [Player: Set 'state' to "attacking"]

    How on earth is this happening?

    How can turning off an action below an event....stop the event working?

    When it's enabled, the event does work (animation changes and plays).

    I just don't understand it?

    Is this a known bug/bug/or, what?

    Please I hope someone can answer me, the time I'm having to spend on

    this is absolutely killing me, I'd appreciate any help at all.

  • "For some reason, when I toggle off the actions

    [Player: Set 'state' to "attacking"]

    How on earth is this happening?"

    Um might explain whats going on better.

    All I could tell you now is that unless you have the animation paused, you dont need to resume, and setting the frame shouldn't matter either.

  • When changing the animation, it causes it to pause for me,

    and it also changes to the same frame it was originally.

    So if it was at frame 5 of the idle animation, when setting

    it to attack it would change it to the attack animation at frame 5,

    and pause it.

    So I have to set my animations to frame 1 and resume it for them

    to switch the way I want them to.

    I ended up finding a fix for this (there were scripts setting the

    animation back to idle because the state variable wasn't changed

    to attacking). But It didn't fix my original problem anyway so

    (the one I was testing whether if not changing the state would

    fix it) =_=; Darnit.

    Thanks for taking your time to reply though, it's appreciated,

    sorry about having wasted your time x.x;

    Back to trying to find another way to fix this ridiculous issue D:

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sounds like you have conflicting events or something.

    And yes there is a bug where setting an animation will not begin the animation at frame 1, but instead the same frame as the previous animation (more likely with animations that have the same amount of frames). I fix that by adding a trigger once sub-event that sets the frame to 1 and resumes the animation, as you've done.

    Since that fixes it..what's the problem? ^^;

  • Well the actual main problem I'm having, is for some incomprehensible

    reason, when I create a weapon during the player animation, it freezes/lags

    before the conditions are met to create it (it's set to be created when

    the player reaches frame 3 of an attack animation, however the lag/freeze

    starts at frame 1 of the player animation),

    and then the entire game seems to be sped up a ridiculous amount,

    as it almost seems to skip to the end of the player/weapon animation,

    an effect I have that's created at a frame of the weapon animation,

    nearly disappears to fast to see it (so you know that it isn't skipping

    frames, its' going through them all too fast), and if I hold left or

    right during the half a second or so it seems to be too fast,

    the player launches off the side of the screen because of the speed.

    However, for some reason I've discovered that if I set off all the

    destroy actions for the weapon so that it doesn't get removed,

    the second time I attack the animation plays through at the correct speed.

    I can't understand how the existence of the weapon causes it to function

    correctly.

    I've verified that it's the weapon, because when I delete the weapon

    from the project, the characters attack animation plays perfectly when

    running the game.

    Also when I set to buttons to just create the weapon, and destroy the

    weapon (so that I know no other actions are being made/changed when

    it is created), and when I create the weapon, then do the attack command,

    it plays through the animation perfectly fine without any freeze/lag

    or speeding. But when I press the button to destroy the weapons and

    try to use the attack command again, it does that lag/freeze>speed action.

    I can't understand how on earth the simple existence of the weapon is

    affecting this and it's absolutely killing me, and wasting SO much time.

    I don't suppose you have any experience with this happening?

    EDIT:

    I've made a workaround, created a weapon above the layout on startup

    and changed a private variable, so the destroy events will check

    that variable and only destroy the new weapons that are created...

    It's stupid to have to have such a workaround, but it works...however.

    The hell?

    I re-enable the effect creation event, that creates an effect object

    at frame 3 of the weapon animation....and now the character is resulting

    in the same manner, freeze/lag then speed through to the end frame,

    before the character even switches to the attack animation??!

    EDIT2:

    I should also note that, unlike the weapon, with the effect object,

    if I don't destroy that, the freeze/lag/speed still happens.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)