Run and Jump Energy Drain
by Daniel Neilsen · in Torque Game Engine · 10/08/2001 (2:40 pm) · 6 replies
Has anyone actually managed to get the run and jump energy drain to work? I certainly cant seem to.
The problem, it would seem, is in this piece of code in player.cc at line 1665
if (mEnergy >= mDataBlock->minRunEnergy) {
mEnergy -= mDataBlock->runEnergyDrain;
pv = moveVec;
}
for some reason, the pointer of
mDataBlock->runEnergyDrain
always resolves to 0, irrespective of what value has been assigned to it in the datablock in both player.cc and player.cs.
This is the same for the jumpEnergyDrain as well.
Does anyone have any ideas in relation to this?
The problem, it would seem, is in this piece of code in player.cc at line 1665
if (mEnergy >= mDataBlock->minRunEnergy) {
mEnergy -= mDataBlock->runEnergyDrain;
pv = moveVec;
}
for some reason, the pointer of
mDataBlock->runEnergyDrain
always resolves to 0, irrespective of what value has been assigned to it in the datablock in both player.cc and player.cs.
This is the same for the jumpEnergyDrain as well.
Does anyone have any ideas in relation to this?
About the author
#2
:(
10/09/2001 (1:49 pm)
For me, even with the supplied v12test.exe, it dosnt want to work. For some reason the pointers always return 0.:(
#3
Dark
10/10/2001 (12:13 pm)
Did you look at the engine code? I might have tweaked something to get it to work.Dark
#4
I got it working.
I had a rogue script messing things up...heh :)
10/10/2001 (2:03 pm)
No problemsI got it working.
I had a rogue script messing things up...heh :)
#6
01/14/2004 (9:19 pm)
Solved, the script player.cs overrides the code player.cc
Torque Owner Chris "Dark" Evans
It should be an easy fix though. I'm avoiding adding anything else to the engine until the new version is finished.
Dark