The official site of Clan TMMM
 
HomeHomeSearchUsergroupsFAQRegisterLog in


Latest topics
» Gotta click fast - WC3 Mazing #mildlyinteresting
by hoffmann Wed Jun 21, 2017 10:28 pm

» Hey whats up
by Eat_bacon_daily Mon Oct 10, 2016 6:24 am

» I'm getting married and you guys are invited
by Achilles.42 Wed Sep 07, 2016 11:00 am

» Server Photo Album 1
by Pat1487 Sat Aug 06, 2016 5:28 pm

» Legacy of The Void Beta
by Achilles.42 Sun Oct 18, 2015 3:21 am

» Hey guys!!!
by Eat_bacon_daily Fri Oct 16, 2015 11:20 pm

» What everyone been up to
by The_Chosen_Oreo Sun Jun 14, 2015 11:55 am

SC2 Links
SC2 Challenge/Tourney Info

Official SC2 Forums

SC2 Curse

SC2Mapster

Team Liquid

SC2 Replayed

SC2 Strategy
WC3 Links
Clan_TMMM[Host] Info

WC3 Challenge/Tourny Rules

Epicwar
Poll
What game does everyone play now?
Starcraft 2
26%
 26% [ 8 ]
Warcraft 3
35%
 35% [ 11 ]
League of Legends
19%
 19% [ 6 ]
World of Warcraft
0%
 0% [ 0 ]
Diablo 2
0%
 0% [ 0 ]
No games at all
10%
 10% [ 3 ]
Other game not listed
10%
 10% [ 3 ]
Total Votes : 31
Transparency

Share | 
 

 Help Me Plox Sooner Than Later

Go down 
AuthorMessage
AmAzIn[G]
Commander
Commander
avatar


PostSubject: Help Me Plox Sooner Than Later   Wed Jul 13, 2011 10:21 pm

Ok you all know my maps bugged.

Here's the trigger, help me out lol.

I know it's massive, maybe help me simplify it?
Btw: There is 45 units that I have, the reason I made them all level 1 creeps is so that I could add more units with ease (lol I know right, this trigger makes things easier on you? What a joke amaz)

Trigger: Initialization



Trigger: New Round


Trigger: Restart Round


Variables:



Basically if you can help me with this trigger I can finish my map.
(Triggering is my weakest point, I'm really good at terraining tho Very Happy)
Back to top Go down
Pat1487
Moderator
Moderator
avatar


PostSubject: Re: Help Me Plox Sooner Than Later   Thu Jul 14, 2011 2:47 am

Im not going to make your trigger work because its terrible, honestly i cant even see how its able to make any random units at all
But i will give you a rough rundown of the basics on how to do it better

Make an array for the units
Lets call it playableunits[]
Make its size 45
At map init, set it to all the units they could get, 1 at a time
So set playableunits[1]=Demon Hunter, playableunits[2]=Blademaster, and so on down to 45 and all the units they can get have been added

Make a loop from 1 to 12 (or however many players can play, in your trigger you have it as 12, but then in another area you have it as 8, so im not sure if its 12 max players or 8 )
Inside the loop generate a random number between 1 and 45 and set it to a var, lets call that var randunit
Check if player((Integer A)) is playing
Unit -Create 1 playableunits[randunit] for player((Integer A))
Use this loop any time you need to give a unit to the player (like at a new round and the start of the game)
In fact you can just have a trigger that has this loop and call that trigger when you want to use it so that you dont need to make it more then once


And thats it
You dont need 20 different random variables to make 1 thing random
Back to top Go down
AmAzIn[G]
Commander
Commander
avatar


PostSubject: Re: Help Me Plox Sooner Than Later   Thu Jul 14, 2011 10:27 am

Pat1487 wrote:
Im not going to make your trigger work because its terrible, honestly i cant even see how its able to make any random units at all
But i will give you a rough rundown of the basics on how to do it better

Make an array for the units
Lets call it playableunits[]
Make its size 45
At map init, set it to all the units they could get, 1 at a time
So set playableunits[1]=Demon Hunter, playableunits[2]=Blademaster, and so on down to 45 and all the units they can get have been added

Make a loop from 1 to 12 (or however many players can play, in your trigger you have it as 12, but then in another area you have it as 8, so im not sure if its 12 max players or 8 )
Inside the loop generate a random number between 1 and 45 and set it to a var, lets call that var randunit
Check if player((Integer A)) is playing
Unit -Create 1 playableunits[randunit] for player((Integer A))
Use this loop any time you need to give a unit to the player (like at a new round and the start of the game)
In fact you can just have a trigger that has this loop and call that trigger when you want to use it so that you dont need to make it more then once


And thats it
You dont need 20 different random variables to make 1 thing random

Dark already helped me do this but for some reason the stupid trigger didn't work. (And when I say this dark, I don't mean your trigger is stupid, I mean the making a random unit trigger all together is stupid Smile!





Back to top Go down
Pat1487
Moderator
Moderator
avatar


PostSubject: Re: Help Me Plox Sooner Than Later   Thu Jul 14, 2011 11:17 am

If you already got help why didnt your delete your post, or at least say something
Not going to waste my time telling you what to do for your stuff that someone else has already done


Also, 12 calls to the same function in a row, learn to loop
Back to top Go down
Sponsored content




PostSubject: Re: Help Me Plox Sooner Than Later   

Back to top Go down
 
Help Me Plox Sooner Than Later
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Clan TMMM :: Warcraft 3 :: WC3 Tutorials and Help-
Jump to: