Spawn trigger for every 10 kills

ballzdeep85

New Member
Reaction score
0
i would like to create a unit at a certain spot when i hit 10, 20, 30, 40, etc kills.

how do i do this?

if you could show me where and how to find what i need.

thankyou,
ballzdeep85.
 

tommerbob

Minecraft. :D
Reaction score
110
I assume you know about variables?

Use an Integer variable to track how many kills you have. Example:

Trigger:
  • Events
    • Unit - A unit is killed
    • Conditions
      • (Killing unit) equal to (your unit)
    • Actions
      • Set KillCount = KillCount + 1


Then, you would check to see how many kills you have:

Trigger:
  • Events
    • Unit - A unit is killed
    • Conditions
      • (Killing unit) equal to (your unit)
    • Actions
      • Set KillCount = KillCount + 1
      • If/Then/Else Multiple Functions
        • If (conditions)
          • (KillCount mod 10) Equal to 0
        • Then do (actions)
          • Set TempPoint = (where you want to create the unit)
          • Create 1 (whatever unit you want to create) at (TempPoint) Facing default degrees
          • Custom Script: call RemoveLocation(udg_TempPoint)


Does that make sense?
 

ballzdeep85

New Member
Reaction score
0
i have this what can i do with this and what you just posted?
kills peice.jpg

can i combine any of this with what you have.

i have 8 players in my map so i need to do the spawn for all.
thankyou, let me know please what can be done.

thankyou,
ballzdeep85.
 

Bankde

Member
Reaction score
20
Here the solution:
1. leave no event in your trigger
2. put this trigger and set action what you want.
Finish
Trigger:
  • Trigger Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Player = (All players controlled by a User player)
      • Player Group - Pick every player in (All players) and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked player) slot status) Equal to Is playing
              • ((Picked player) slot status) Not equal to Has left the game
            • Then - Actions
              • Trigger - Add to Get Kills <gen> the event (Unit - A unit owned by (Picked player) Dies)
            • Else - Actions


So you can brief your event from using 8 event into only 1 event

Trigger:
  • Trigger - Add to Get Kills <gen> the event (Unit - A unit owned by (Picked player) Dies)
 

ballzdeep85

New Member
Reaction score
0
this will spawn a unit every 10 kills for every player exactly how you posted?

or do i have to do this for every player?

thankyou,
ballzdeep85.
 

tommerbob

Minecraft. :D
Reaction score
110
What Bankde did was simply turn your 8 trigger events into 1 event.

For creating the units: at the bottom of your trigger, you want to add an If/Then/Else action:

Trigger:
  • If (conditions)
    • (Kills[(player number of (owner of (killing unit)))] mod 10) Equal to 0
    • This condition checks if your number of kills is a multiple of 10, if it is, then you want to create your unit:
    • Then do (actions)
      • Create 1 (unit) at (point) facing default degrees
 

ballzdeep85

New Member
Reaction score
0
holy balls
im lost bad, ill see if i can make it.
and post tommorow afternoon.
im in cali.

thankyou,
ballzdeep85.
 

ballzdeep85

New Member
Reaction score
0
here is what i have.

trigss.jpg

-UPDATE-
Now what
trigss.jpg
-UPDATE-

i cant ger your:
-set player action.
-if then else pull down tree like you have.

thankyou,
ballzdeep85.
 

ballzdeep85

New Member
Reaction score
0
What Bankde did was simply turn your 8 trigger events into 1 event.

For creating the units: at the bottom of your trigger, you want to add an If/Then/Else action:

Trigger:
  • If (conditions)
    • (Kills[(player number of (owner of (killing unit)))] mod 10) Equal to 0
    • This condition checks if your number of kills is a multiple of 10, if it is, then you want to create your unit:
    • Then do (actions)
      • Create 1 (unit) at (point) facing default degrees

how do i get the MOD 10?

thankyou,
ballzdeep85
 

SineCosine

I'm still looking for my Tangent
Reaction score
77
Mathmatical function.
Modulo.

It's getting the remainder after a division.
Like, you want a unit every 10 kills.

So, if (Kills % 10) == 0.. Spawn a unit.

That means.
(No. of Kills) / 10 must leave a remainder of zero.
 

ballzdeep85

New Member
Reaction score
0
how do i get the mathimatical mod inserted after (Kills[(player number of (owner of (killing unit)))]

i cant find the right drop down menu

thankyou,
ballzdeep85
 

ballzdeep85

New Member
Reaction score
0
nevermid found it.

now i just have to test.

i will keep you all posted i have a feeling i screwed up.

i have a little more to add
how do i make this?
Set Player = (All players controlled by a User player)
thankyou,
ballzdeep85
 

ballzdeep85

New Member
Reaction score
0
dont know what i did wrong.
but...
when ever any player spawns an attacking unit they spawn my golem peice....
instead of\
waiting until the player gets 10 kills....

what did i do wrong

here is what i have so far

golems.jpg

i have settings set for pink and red.
let me know where i am wrong please.

-UPDATE
-i just found out the golem peices are not being spawned when i creat an attacking unit, the golem peice is getting spawned at the beginning of the game and that is the only golem peice that will spawn.
-what do i need to do im in deep, if i have to i can start the trigger over please review the post and please explain what i need to do.
-UPDATE

thankyou,
ballzdeep85
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top