Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blender action actuator "Frame Property" not working #297

Open
GoogleCodeExporter opened this issue Mar 27, 2015 · 3 comments
Open

Blender action actuator "Frame Property" not working #297

GoogleCodeExporter opened this issue Mar 27, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. load the attached file in Blender and run gamekit addon
2.
3.

What is the expected output? What do you see instead?
Game should quit after 50 frames of animation but it doesn't. I tried BGE and 
it quits as expected. So I guess gamekit can't handle Frame Property in action 
actuator properly. Just thought I should point out this in case it's a bug that 
is easy to fix. 

What version of the product are you using? On what operating system?
OSX 10.8
Blender 2.63
GameKit 1186

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 16 Jan 2013 at 1:32

Attachments:

@GoogleCodeExporter
Copy link
Author

The attached file should be here ...

Original comment by [email protected] on 16 Jan 2013 at 6:47

  • Added labels: ****
  • Removed labels: ****

Attachments:

@GoogleCodeExporter
Copy link
Author

Yes you are right. This is not working...

Original comment by [email protected] on 16 Jan 2013 at 7:09

  • Changed state: Accepted
  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

This can easily fixed changing the file gkActionActuator.cpp like this

void gkActionActuator::update(void)
{   
    if (!m_isPlaying) return;

    if (m_state != m_link->getState())
    {
        stateChanged();
        return;
    }

    gkScalar t = getElapsedTime() + m_start;
    bool end = t >= m_end;
    bool off = isPulseOff();

// ----- Fix
    if (gkVariable *var = m_object->getVariable(m_startProp))
        var->setValue(t*m_animFps);
// -----

    if (off)
        m_ignorePulseOn = false;

    if (m_mode == AA_LOOP_END)
    {
        if (end)
        {
            stopAction();
            if (!off)
                playAction();
        }
    }
    else if (m_mode == AA_LOOP_STOP)
    {
        if (off)
            stopAction();
        else if (end)
            resetAction(false);
    }
    else //if (m_mode == AA_PLAY)
    {
        if (end)
            stopAction();
    }
}

Original comment by [email protected] on 2 Dec 2014 at 4:57

  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant