• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • ✅ HD Level Design Contest #1 POLL is now OPEN! Check out the stunning visuals of the final entries. 🔗Click here to cast your vote!

[Trigger] Help with kills/resources

Status
Not open for further replies.
Level 1
Joined
Jun 25, 2009
Messages
4
How do I give resources per certain amount of kills?

NVM: I FOUND OUT HOW

How do I make a trigger so that you gain lumber after like 10 kills? Also, how do I make it so that after a certain number of kills, you get a certain unit?
Thanks :nw:

Edit: I tried on my own and am wondering if this will work. I'm a beginner so not sure if it'll work >.<;.

For gaining Lumber
Events: A unit dies
Condition: ((Dying Unit) belongs to an enemy of (Owner of (Killing Unit))) Equal to True
Action: If ((Playerkills[(Player number of (Owner of (Killing unit)))] + 1) Equal to 16) then do (Player - Add 1 to (Owner of (Killing unit)) Current lumber) else do (Do nothing)
PS: Playerkills is a variable made which I got from the leaderboard tutorial :D THanks to Archian - It is an integer array

For creation of unit
Events
Player - Player 1 (Red) types a chat message containing -create Veteran as An exact match
Player - Player 2 (Blue) types a chat message containing -create Veteran as An exact match
Player - Player 3 (Teal) types a chat message containing -create Veteran as An exact match
Player - Player 4 (Purple) types a chat message containing -create Veteran as An exact match
Player - Player 5 (Yellow) types a chat message containing -create Veteran as An exact match
Player - Player 6 (Orange) types a chat message containing -create Veteran as An exact match
Player - Player 7 (Green) types a chat message containing -create Veteran as An exact match
Player - Player 8 (Pink) types a chat message containing -create Veteran as An exact match
Player - Player 9 (Gray) types a chat message containing -create Veteran as An exact match
Player - Player 10 (Light Blue) types a chat message containing -create Veteran as An exact match
Player - Player 11 (Dark Green) types a chat message containing -create Veteran as An exact match
Player - Player 12 (Brown) types a chat message containing -create Veteran as An exact match
Conditions
((Triggering player) Current lumber) Greater than or equal to 1
Actions
Unit - Create 1 Hardened Soldier for (Triggering player) at ((Triggering player) start location) facing Default building facing degrees

Please help and once again, Thanks :D
Note: I tested my trigger and instead of giving lumber on intervals of 14, it constantly gives me 1 lumber (but no more than 1 lumber) once I get 15 kills. Help please? >_<
 
Last edited:
Status
Not open for further replies.
Top