Author Topic: Playertype crouching abilities 2  (Read 1586 times)

I want to do the crouching to be limited after two seconds.
After 2 seconds of crouching, the player will stand/ return to compliance.
Does it possible and how? sorry for my bad Englsh

You can detect when you crouch, and you can disable crouching on a playertype, although its tough, and hacky. I think it needs a client sided mod to be done correctly, else you have problems with faces/decals not being visible because of ifl files being missing or something.

So yeah, its possible. Its just stupidly hard and buggy.

You can detect when you crouch, and you can disable crouching on a playertype, although its tough, and hacky. I think it needs a client sided mod to be done correctly, else you have problems with faces/decals not being visible because of ifl files being missing or something.

So yeah, its possible. Its just stupidly hard and buggy.
All you have to do to "disable" crouching is change the crouch bounding box on the playertype. The animation will just still play though.

Does it possible for make it stop when he loses all his energy ?
I mean he will have energy bar, and he will lose energy while pressing 'shift'. can someone give me a code for that?
Sorry but I'm very suck at scripting.

Does it possible for make it stop when he loses all his energy ?
I mean he will have energy bar, and he will lose energy while pressing 'shift'. can someone give me a code for that?
Sorry but I'm very suck at scripting.
The only problem is. You have to change the player's datablock to make it so they can't crouch.

Ok so here is the problem now, I used the code which $trinick gave me

Code: [Select]
package noShootCrouch {
    function Armor::onTrigger(%db, %this, %slot, %pos) {
        if(%slot == 3 && isObject(%this.getMountedImage(%pos?1:0))) {
            %this.mountImage(%this.getMountedImage(%pos?1:0), %pos?0:1);
            %this.unMountImage(%pos?1:0);
        }
        parent::onTrigger(%db, %this, %slot, %pos);
    }
};
activatePackage(noShootCrouch);

So when I crouch it suppose to not let me shoot and when I'm standing it could shoot, but it happened the exact opposite. please help