How to spawn per 10 kills HELP

ballzdeep85

New Member
Reaction score
0
i have another thread like this open but its cluttered and no results.

how do i spawn a unit per every 10 kills example 10,20,30,40 etc....
for just one player.

i have a variable made for my score board name kills.

please help
what do i need to do.

thankyou,
ballzdeep85
 

Moridin

Snow Leopard
Reaction score
144
Here:

Trigger:
  • Unit Dies
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • Set KillCount[Player number of (Owner of (Killing unit))] = Killcount[Player number of (Owner of (Killing unit))] + 1
      • If (All conditions are true) then do (Then actions) else do (Else actions)
        • If - Conditions
          • KillCount[Player number of (Owner of (Killing unit))] = 10
        • Then - Actions
          • Set KillCount[Player number of (Owner of (Killing unit))] = 0
          • Unit - Create 1 <your unit> for (Owner of (Killing unit)) at (point) facing (angle)


KillCount[] is an integer Array with a size of 13.
 

tommerbob

Minecraft. :D
Reaction score
110
Moridin's trigger will work, but don't start a new thread on the same topic as your last one. You need to be patient and wait for replies from people. You started this thread even before anyone had a chance to reply to your other one. :thdown:
 

ballzdeep85

New Member
Reaction score
0
no one was dumbing it down for me like i asked nicely.
but yes i will not do that again.
thankyou for the trigger and i will test and c how it ends up.

thankyou,
ballzdeep85
 

tommerbob

Minecraft. :D
Reaction score
110
That's why I said you need to be patient. I was about to respond with a solution in your other thread, but you already created this one, barely 12 hours later.
 

ballzdeep85

New Member
Reaction score
0
right now the way i have it my kill count is set to a amount of 10.

-UPDATE-
with this set up, exactly like urs posted to this thread dose not spawn any peices.
gnospwn.jpg
i test the map as red and sent units to pink, pinks tower killed 10 units and no spawn now.

what is causing this instead of 1 spawn per 10 kills?

thankyou for everything and i will be more patient from now on.

thankyou,
ballzdeep85.
 

Attachments

  • gspawn.jpg
    gspawn.jpg
    27.3 KB · Views: 134

Tyman2007

Ya Rly >.
Reaction score
74
Hate to hijack this thread, but I never really understood the point of array size.. what's the use.. if any.. I'm pretty sure an array size of just 1 would still work.

But I see your problem. This line:

Set KillCount[PN of killer] should = KillCount[Player number yada yada] + 1 instead of [Player Number whatever] + 1

The way it is now, it's not adding 1 to the killcount, it's adding 1 to the player number of the owner of the killing unit. so red will always have a value of 2 seeing as how he's player 1 in GUI. player 9 will get a piece EVERY time because 9 + 1 = 10.
 

ballzdeep85

New Member
Reaction score
0
actually all other players spawn a unit also every time they kill some other player's unit.

any ideas still?

thankyou,
ballzdeep85.
 

Tyman2007

Ya Rly >.
Reaction score
74
I'm sorry if I didn't quite understand you there.

So you're saying if you kill another player's unit, they can spawn more pieces?

If so just add a condition. It's a boolean comparison.

Look under unit, and is unit ally. Make sure that it's set to is equal to false, or not equal to true.
 

ballzdeep85

New Member
Reaction score
0
please read thread.

i am trying to get a unit to spawn every time i get 10 kills.

right now if i set the value in my condition from 10 to 0 ill spawn 1 unit every time i kill 1 unit.

get it now or not?

thankyou,
ballzdeep85
 

Tyman2007

Ya Rly >.
Reaction score
74
I understand what you're trying to do, but it's just this line I don't quite understand.. I'm sorry for my inabilities T.T

right now if i set the value in my condition from 10 to 0 ill spawn 1 unit every time i kill 1 unit.

So if you set it to check for 0 kills rather than 10 it will spawn a unit every time, but if you change it back to 10 it will never spawn a unit?
 

ballzdeep85

New Member
Reaction score
0
yes that is correct.

let me know what you can figure out.
i dont understand the line either someone else made them for me.

going to get pizza be back in like lil be ill keep updated if i can figure stuff out.

thankyou,
ballzdeep85
 

Tyman2007

Ya Rly >.
Reaction score
74
Well if you follow what I said earlier it should work :p

The problem lies in this line right here.
Trigger:
  • Set KillCount[[Player number of (Owner of (Killing unit)))] = ((Player number of (Owner of (Killing unit))) + 1)


Allow me to highlight the part that's wrong which is causing this to not work.

Trigger:
  • Set KillCount[[Player number of (Owner of (Killing unit)))] = ---> ((Player number of (Owner of (Killing unit))) + 1)


Ok, so what's so wrong about that?

Each player is given a number from 1 to 12 depending on the player slot they have chosen.
E.G. Player red is given a 1, because he's player 1. Player blue is given a 2, because he's player 2, and so on and so forth.

The highlighted part, ((Player number of (Owner of (Killing unit))) + 1) takes the number that player is given, then adds a 1 to it.
So, player 1 will always get a kill count of 2.
player 2 will always get a kill count of 3
player 9 will always get a kill count of 10 (Thus always spawning a unit every kill)

You are setting the killcount to a constant value, rather than adding onto it.

I believe you're familiar with the traditional add 1 to value line, going as follows

Trigger:
  • set integer = integer + 1


Because we're using arrays, we add in an index value

Trigger:
  • set integer[1] = integer[1] + 1


you did something like this

Trigger:
  • set integer[1] = [1] + 1


thus always coming out to a 2.

Simply change what it sets the killcount to to the variable + 1.

You forgot the variable in the line :p

Hope this helps!
 

ballzdeep85

New Member
Reaction score
0
can you set show me in what i have here and tell me whats wrong.
can you rewrite for me?

show me where stuff needs to go please.
help.jpg

when you are talking about the integer line equation do i have to make a new integer like i had to do for the variable?

you kinda lost me.

thankyouk,
ballzdeep85
 

Tyman2007

Ya Rly >.
Reaction score
74
Hmm, your trigger seems just fine.. but there's one thing in particular that I've noticed about it..

It's not enabled :p Right click on the trigger under the category view and check the "Enable Trigger" line.

I'm not quite sure if you've done that on purpose, but a trigger will never work if it's disabled.
 

ballzdeep85

New Member
Reaction score
0
i know. i disableed it so i t wouldnt load while i was working on trying different combos.


please show me where to put the integer thing in i dont know how to get a spawn to happen every ten kills.

im lost right now.

thankyou,
ballzdeep85.
 

ballzdeep85

New Member
Reaction score
0
Is the hilighted part in blue right?
And is it in the right spot?
Or do i need to inject it somewhere?

unigol.jpg

Please SHow me where it goes if im wrong.

because where its at is wrong.(dosen't work)

oh and killcount has a array value of 13.//// if that helps?

thankyou,
ballzdeep85.
 

ballzdeep85

New Member
Reaction score
0
ok got it to work / not work.
this is what i have
almost.jpg

im playing as red, pink is killing my units, leader board is telling me im getting the kills... and PINK getting granted a golem for every ten kills.
- what do i need to do to get the player who is killing the units credit for the kills and spawn the units ?

let me know if i need to move anything around.

thankyou,
ballzdeep85.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      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