how would i make a trigger that allows me to, give minerals very 50 kills
Post #2
Ahli
Jul 26 2011, 10:31 pm
Post #4
FatalException
Jul 26 2011, 10:37 pm
|
Make an integer array variable to hold the kill count of each player. When the event "Unit Killed" occurs, add 1 to the index of the array tracking Killing Player's kills. If the value of that index modulo 50 is equal to 0, modify the mineral player property accordingly. Here's some pseudocode:
Codeint[] kills = {0,0,0,0}; //should have a number of indices equal to the number of players you're tracking if(UnitKilled(Any)) //if a unit is killed { kills[UnitKilled(Any).KillingPlayer] += 1; //add 1 to the killer's kill count if((kills[UnitKilled(Any).KillingPlayer] % 50) = 0) //if the kill count is divisible by 50 with no remainder { ModifyPlayerProperty(UnitKilled(Any).KillingPlayer, minerals, add, amount); //add amount of minerals to the killing player's stockpile } } Edit: Crap, Ahli types faster apparently. Double edit: Screenshot of the generalized case here: http://i55.tinypic.com/29c486v.jpg This post was edited 1 time, last edit by FatalException: Jul 26 2011, 10:48 pm. ![]() ![]() ![]() ![]() ![]() ![]() |
Post #6
FatalException
Jul 26 2011, 10:51 pm
Post #10
Roy
Jul 27 2011, 11:01 pm
|
An artist's depiction of an Extended Unit Death
|
Please do not make "Thank you" posts if you haven't applied the advice given or otherwise solved the issue. Your posts should either contribute towards getting to the solution (i.e. saying what you tried and how it didn't work) or to confirm that the problem has been solved.
There's an action called "If / Then / Else" that you can put in actions. If you need am if condition for the whole trigger, it may be better to create a condition instead of an action for this. ![]() ![]() ![]() ![]() ![]() ![]() Learn how to make EUDs: [EUD] A Mapmaker's Guide for Creating EPDs
Don't like learning? EUDGen2 Other stuff: Farlap Bound Maker [EUD] EUPCalc SC1 Maps: Dash: 1 2 3 4 5 6 7 8 9 X Jog: Original Warp Other: Super Mario SC Fireball Guard Your Civilian Strength Contest Interceptor Arena |
0 members in this topic (italic members are currently writing a reply): None
+ guest(s)
+ guest(s)
[09:21 pm]
[09:21 pm]
[09:21 pm]
[09:21 pm]
[09:20 pm]
[09:20 pm]
[09:20 pm]







![[close]](/images/up.gif)