ItsMods

Full Version: There is a question for you awesome modders in this thread.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This can be an easy question but i need the shortest code possible.

Every human in the mod will have a flag that they can plant. After planting humans near the flag will gain extra damage. And after getting away from the flag you will lose the damage boost. Also multiple flags can be planted and the extra damage humans get should stack. Damage boost should wear off when the flag is picked up.

I have coded the flag plant and pick up but the stacking damage the way the effecy should wear of doesnt work quite well.

I hope one of you can help me because this is very important for me, my mod and hundreds of players playing it.

The first one to solve my problem will get an awesome free gif for his signature.
(08-23-2011, 02:08)Lemon Wrote: [ -> ]This can be an easy question but i need the shortest code possible.

Every human in the mod will have a flag that they can plant. After planting humans near the flag will gain extra damage. And after getting away from the flag you will lose the damage boost. Also multiple flags can be planted and the extra damage humans get should stack. Damage boost should wear off when the flag is picked up.

I have coded the flag plant and pick up but the stacking damage the way the effecy should wear of doesnt work quite well.

I hope one of you can help me because this is very important for me, my mod and hundreds of players playing it.

The first one to solve my problem will get an awesome free gif for his signature.

EDIT: fixed part of the code
http://pastebin.com/NQbKWuza
Cool, I'll test it tomorrow, I hope it works

Nice function name Troll
self thread trololololol(); killed me

x_x
Script Compile error:
function 'trololololol()' wants to be 'main()'
Should be fairly easy..just add each trigger to an array when you plant the flag/delete from the array when you pick it up.

Then in the damage callback function, firstly define damageX (damage multiplier) to be 1. Now run a loop on every trigger in the array. If the person is touching the trigger or within certain distance, then damageX++. After that loop has finished, iDamage = iDamage x damageX.

The code really should be simple, talk to me on steam (F |Madness| U) if you need help (or look at spoiler- untested but should have the idea).