Food Limit.

Sui-cookie

You can change this now in User CP.
Reaction score
49
not really D:

what is this spawning region?, are there different units spawned for each player? if so, are the units counted for each player, or all together? ... i just dont really understand whats going on as far as what,where,and how much :(

edit: thats what she sied :rolleyes:
 

ballzdeep85

New Member
Reaction score
0
not really D:

what is this spawning region?, are there different units spawned for each player? if so, are the units counted for each player, or all together? ... i just dont really understand whats going on as far as what,where,and how much :(

edit: thats what she sied :rolleyes:

-i have 10 spawning reagions that can spawn 10 different units.
-only one triggering unit for each player.
-so only one region can spawn at a time as long as my triggering peice is in the region.
-each player has 150 food.
-so if every region is selected 1 at a time of course, and wait the time frame
each player will have 150 units spawned at my main building.
-all units spawning have a FOOD COST of 1, just to let you know.
thankyou,
ballzdeep85.
 

ballzdeep85

New Member
Reaction score
0
edit 2 : sorry, just reading over things again, and i realised how unclear i was with my approach D:
in the actions, right after you create your units, set an (integer variable) = (integer variable +1)
then use a condition that checks to see if that integer is however high you want it, and when it gets to a certain point... it stops spawning... though the trigger keeps running D: if that makes sense. so, as you kill one, if free's one space up...

can you explain this a little better or post a picture of it completed then i can let you know it it works.

thankyou,
ballzdeep85.
 

Gatreh

New Member
Reaction score
0
Ookay, I seem to be one that knows what your looking for.. and since you can't really understand it when put into words I decided I wanted to help you with this. Just remember that I'm not too good with triggers myself.

Ookay so first of all you want a working trigger. I'm going to use the 'variable approach' for this.

First of all I want to show you how to make a variable. Open up your trigger editor and then press Ctrl+B (I don't know how familiar you are with variables so I'll just take it from the top).

Now to make a variable that suits you.. When you open up the variable window you should see this.
m79hlz.jpg


Now, to make a variable you press the green +X another square will pop up.
Name it whatever you want (I'll name it Food_limit for the sake of understanding)
Variable type should be an 'Real' it should be an array at size 10 and have 0 as initial value.

After your done creating it it will look like this.
2jbr7rl.jpg


Get it? if you do, good keep reading. If not then tell me.

Anyways now that you have your integer variable you should put it to use. (note that you have to do this for every player)

You wanted 1 food cost for every 'max' right? so every time you spawn a max you want to add 1 to the variable. (Now I'm guessing that you don't have any 'max' at the start of a game)

This is how it looks, first off the condition.
2ec2qgk.jpg

I hope you see what I added :s
Its a real comparison then I changed the first value to a variable and the second to 150. notice that you WILL need to use 'less than' or it will be able to spawn 151 units.

Now onto the action that needs to be added in the trigger you already have.
262beo7.jpg

This adds a section were the real variable for player 1 (array 1) adds 1 to the variable. this goes on for every second until you reach 150 spawned units.
Thats how far we came, although its just halfway there.

Now we need to make a trigger to make the variable count DOWN when a unit dies.
This is how it looks (the whole trigger)
2luc1s3.jpg


Well well.. ended up almost to be a tutorial 'o_O
Anyways I hope you find this useful and good luck fixing your map up :D
 

ballzdeep85

New Member
Reaction score
0
so is this on one trigger?
is the first conditon a boolean comaparison or somthing else.

food limit.jpg

and is this on another trigger?

food it.jpg

do i need any map initilization or anything else for these to work?
or do i need any other parts?

because i guess this dosnt work.

UPDATE______i just saw i had something different then what you showed me, change it and it still dosnt work._____UPDATE


thankyou again sooo much for the time you took to help.

thankyou,
ballzdeep85.
 

Gatreh

New Member
Reaction score
0
Not a problem!

Helping someone is easier when you know things.. atleast a tiny bit better :D

Anyways good luck with the continued work on this map :d

Edit: The condition you had was better but I didn't find it so I used the closest I could get.
Although I'd get the 'variable less than 150' one wich is a REAL comparation.

Now for your questions..

the first pic your asking about is just an adding to your original trigger and the second picture is indeed another trigger.
I would say that if you need this to be player based AND unit based you would have to make more for every player and unit >.< each individually.
 

ballzdeep85

New Member
Reaction score
0
Is this how the first trigger should look for every unit and player spawn?
should i take out my condition or yours? or leave both.

unittriggs.jpg

and this trigger is it just for every player? or player and units?

unittriggsdie.jpg

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

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top