Chaos Footman Frenzy!

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
See how I feel! I have had esxams and homework and work coming out of my ass. I haven't been able to get out of the hero/unit stage for a long time.
 

Draygonia

BattleForums Junior Member
Joined
May 17, 2005
Messages
101
Reaction score
0
Can someone help me with triggers? Because massive man quit on me...

Draygonia :shoot massive-man
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
What triggers you need help with?
 

Draygonia

BattleForums Junior Member
Joined
May 17, 2005
Messages
101
Reaction score
0
Spawn triggers for all tiers, random hero trigger, when a hero is picked in the tavern, its teleported to the base, players hall is destroyed, so the players units are as well and the trigger repeats just in case the players hero has res........... those are the main ones.
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
Spawn triggers you can use an array for. Which stores the unit, and every second or so, it creates 1 of that unit base on player number - 1.
 

Draygonia

BattleForums Junior Member
Joined
May 17, 2005
Messages
101
Reaction score
0
Well, thats the problem, I need some steps, I dont understand the point of arrays, sure they store values and stuff, but I dont know how to get the values to link the triggers... its like a rope with a broken segment... im just confused :/
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
Well, arrays are basically variables that can store more than one value in sections called "Elements". These are useful because you can cut down on variable declarations and changing values, as long as you reference the element correctly. They start at 0 and go up to the maximum amount of values you have declared.

Why are they useful? In a footman frenzy, you can store a unit inside an element of a variable for that player (player number - 1). Then using a simple trigger that runs every 3 seconds or so. Create arrayname[(player number - 1)] for Player 1 at the location of the barracks or whatever, repeat this for all cycles.

I dont like opening trigger editor and show the exact code, I just like to give an idea that will help the creator do something. Just some people are lazy and don't "get thier hands dirty".
 

Draygonia

BattleForums Junior Member
Joined
May 17, 2005
Messages
101
Reaction score
0
Yes, I can understand that now, but how do you tell the editor to link the variable value to the player number, im sure you dont just go to the variables, create an array with player 1 and than make the trigger using the variable, rite?
 

ChrisH36

Guy with Most Posts on Quiet Board.
Joined
May 20, 2003
Messages
15,042
Reaction score
4
Location
Temple Prime, Sarajevo
Well wherever you call a Create Unit, you can create x number of units using whatever unit is stored at an element of the array.

If you do this, then you wont have to check and see what building they have in the same trigger, all you do is change it depending on what structure they have on them at the time.

Example, if they start the game off. You can store the footman in all elements. And in a trigger that creates the units for you, it will create 12 footmen, one for each player by accessing different elements of the array for different people.
 
Top