[Solved] Help with functions please

Here the previous project you have shared with function working. Catch the differences in functions green and pink and parameters.

game.json

The project I shared had both boost functions + an external event sheet. Functions were “toggled disabled” and the external event link wasn’t when I zipped up the files.

Of course differences between the green and pink will be found there and they should be different; one is supposed to change max speed, the other should change jump speed and gravity. What you see as the boosts working would be coming from the external event sheet, not a function.

The pink boost function/event no longer exists Gruk’s JSON, but again, it’s not a big deal. :slight_smile:

I know, i wish just say, i’ve disabled external events and enabled your functions, and rewrote functions, now functions work :wink:

Believe me, I wish I could say that too lol

I’ve got it! :open_mouth:

The effect function seems to be working with the external events sheet disabled. :dancer:

Bouh, our wish has come true, I think we can consider this officially solved now. :+1:

What I did:

  • Switched to using a scene variable instead of the object variable
  • Separated the conditions “scene variable jump = 1” and the timer…

Condition:
scene variable jump = 1
Actions:
unpause timer “JumpTime”
Do 400 to the gravity applied on Object
Do 800 to the jump speed applied on Object

The rest is the same as previously posted except, I had to remove the animation settings from the function events and do them elsewhere because…

objectanimation

…that part wasn’t working, maybe because “Object” does not have animations, even though the player object to which it is applied does. But that’s strange because it works fine like this in Gruk’s JSON. I can work around it for now though and maybe tinker with it some more another time.

I’m still not sure why Gruk’s fix wouldn’t work in my project, other than the possibility of conflicts with other events that were not included in the test package. Still, thanks again both of you for taking the time to help me work it out.

2 Likes