Hello, I want some clonks to be unable to jump, climb, dig, etc.
What I did was make a function that removes the specified entries from a clonks ActMap.
This works fine for climb, scale, dig etc.
But it gets weird when removing the jump action.
I guess that is because falling down is also done in with the jump action, if i understood the code correctly.
So when removing the jump action from the ActMap the clonk can just walk over the cliff and floats around in the air.
Is there a way to just prevent the user from initiating the jump?
And is there a way to lower the height of a jump?
Oh, and what is the difference between the -> and ->~ operators?
Thank you and regard
Joel
What I did was make a function that removes the specified entries from a clonks ActMap.
This works fine for climb, scale, dig etc.
But it gets weird when removing the jump action.
I guess that is because falling down is also done in with the jump action, if i understood the code correctly.
So when removing the jump action from the ActMap the clonk can just walk over the cliff and floats around in the air.
Is there a way to just prevent the user from initiating the jump?
And is there a way to lower the height of a jump?
Oh, and what is the difference between the -> and ->~ operators?
Thank you and regard
Joel
I think you could write an appendto script for the Clonk and redefine ControlJump there:
#appendto Clonk
func ControlJump()
{
return false;
}
->~ is the failsafe variant of ->. It won't cause an error when the function to be called is not actually known to the target object.
#appendto Clonk
func ControlJump()
{
return false;
}
->~ is the failsafe variant of ->. It won't cause an error when the function to be called is not actually known to the target object.
Actually, you just try and disable the unwanted functions by using the technique (or similar) Mortimer mentioned.
Deleted any action from the ActMap might have very unforeseen consequences to the overall behaviour of the clonk.
Deleted any action from the ActMap might have very unforeseen consequences to the overall behaviour of the clonk.
I tried that, but i didn't find any usefull function to override. There is for example StartScale() but this is only for animation.
Is there anything I don't see?
Is there anything I don't see?
What you don't see is the engine internal code, which if I am correct controls at least hangling and scaling.
On the other hand throwing and jumping (the start of it) are controlled by script. There is also a difference between these actions, jumping and throwing are initiated on pressing a key or button. Scaling and hangling on the other hand are more like events which happen if you "attach" to a wall or ceiling.
You need to have a look at the engine code to see what precisely happens... but I think disabling via the ActMap is the most straightforward solution, maybe not the cleanest one.
On the other hand throwing and jumping (the start of it) are controlled by script. There is also a difference between these actions, jumping and throwing are initiated on pressing a key or button. Scaling and hangling on the other hand are more like events which happen if you "attach" to a wall or ceiling.
You need to have a look at the engine code to see what precisely happens... but I think disabling via the ActMap is the most straightforward solution, maybe not the cleanest one.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill