Author Topic: I need help with my mod.  (Read 3741 times)

Just put it in your already existing package.

You're missing a bracket to close the if() statement there, other then that, that /should/ work.
HUGE BUMP (i am sorry for this)
I don't understand, could you post full code with all the things i need. So i could just simply copy paste it into my code?

So i could just simply copy paste it into my code?
This is exactly what we don't do in Modification Help.

We try to make you think and get you to learn. Spoon-feeding doesn't help anyone.




Notice how many open brackets you have (I've also color coded the arrows to show you which one you're missing). You are missing closing bracket #3 (the green arrow)

If you have 3 open brackets, you need 3 closing brackets, it should always work like that.

Inb4curlybracesinsteadofbrack ets.... lol


Right after Parent::

You need to close that block of code.

Nope, the bot stands up.
It seems that a crouching playertype or something like that is needed.
Or maybe i did something wrong. I added the third bracket, no syntax errors.
But the bot stands up when he thinks of crouching.

Try changing it to if(!%bool && !%obj.disLFoot && !%obj.disRFoot)

Try changing it to if(!%bool && !%obj.disLFoot && !%obj.disRFoot)
Still not working.
It seems that when the bot is crouching, the AI doesnt know about it.
So it tries crouch again, that causes the bot to stand for some reason.


Where do i put the third closing bracket though?

Just a quick thing - when you only have one line of code following a conditional (if, else if, else, etc), you don't have to use curly braces / brackets.

if(%foo) doBlah();

or

if(%foo)
    doBlah();

will work fine.

The problem isn't with the third bracket placement or syntax errors.
The bots can simply stand up, i want them to stay crouched forever.

If setCrouching is an engine method, chances are you can't package it. Put an echo("blah"); in there to see if it's even getting called

If setCrouching is an engine method, chances are you can't package it. Put an echo("blah"); in there to see if it's even getting called
I've successfully packaged it for a mod for this same purpose and it's worked.

I've successfully packaged it for a mod for this same purpose and it's worked.
Can the bot stand up after being shot in the leg?
If not, then how did you do it?