|
Post by Admin on Jul 30, 2017 5:02:58 GMT
Next, I am trying to make a game of those things that go down and you control the character to get these things and thus make points. But I am having problems getting a value of OnCreatedScene, for a function used in OnSceneUpdate.
Here is the code for the callbacks of an object that falls on the OnCreatedScene
Void ETHConstructorCallback_boost (ETHEntity @ boost) { Boost.SetUInt ("boostActive", 0);
}
Void ETHCallback_boost (ETHEntity @ boost) { Float vBoost = UnitsPerSecond (400.0f); Boost.AddToPositionY (vBoost);
// If the collision is real it is deleted If (boost.GetUInt ("contact")! = 0) { DeleteEntity (boost);
// Activate the boost state; Boost.SetUInt ("boostActive", 1);
} Here is the code that "catches" the value of the boostActive and printa it in OnSceneUpdate
ETHEntity @boost = SeekEntity ("boost.ent"); Print (boost.GetUInt ("boostActive"));
And the error message I get.
Exception: Null pointer access Callstack: Void updateClassic () (Classic.angelscript, 436)
If someone could help me with urgency I would be very grateful!
|
|