Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
There is a question for you awesome modders in this thread.
#1
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.
Reply

#2
(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
[Image: b_560_95_1.png]
Reply

#3
Cool, I'll test it tomorrow, I hope it works

Nice function name Troll
Reply

#4
self thread trololololol(); killed me

x_x
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
Reply

#5
Script Compile error:
function 'trololololol()' wants to be 'main()'
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Reply

#6
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).

Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Question Help Mw2 weapon skin question FroxIVx4 1 2,951 10-13-2013, 16:54
Last Post: hmann
  Thread removed [HARD] Tony. 4 3,866 10-01-2013, 17:53
Last Post: DidUknowiPwn
  Help Thread removed [HARD] Tony. 5 3,986 09-26-2013, 20:26
Last Post: Casper
Rainbow please help me = question's clacki 1 2,374 09-24-2013, 15:22
Last Post: OzonE
  Thread removed [HARD] Tony. 3 2,973 09-22-2013, 16:23
Last Post: d0h!
  Thread removed [HARD] Tony. 2 2,597 09-20-2013, 18:03
Last Post: [HARD] Tony.
  Thread removed [HARD] Tony. 3 3,078 09-20-2013, 16:00
Last Post: Nekochan
  Help Official Teckno Gods Thread [Stickied] aceed 3 3,285 08-27-2013, 16:55
Last Post: SuperNovaAO
  [Request] Might be a silly question... regarding SetPlayerData camxxcore 4 3,899 08-10-2013, 21:50
Last Post: camxxcore
Thumbs Up Awesome music Nekochan 2 3,179 07-26-2013, 21:49
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
4 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.