wc3edit.net https://forum.wc3edit.net/ |
|
help /w wmw trigger types http://forum.wc3edit.net/broken-fulfilled-f74/help-w-wmw-trigger-types-t906.html |
Page 1 of 2 |
Author: | Joshsta818 [ June 2nd, 2007, 4:48 pm ] |
Post subject: | help /w wmw trigger types |
im working on my maul, and if some one Masses a crap load of units, of course it lags and some times the units get stuck and sometimes attack incoming summons by yhe opposite team. i have no idea how to make this trigger btw..i would like to have a menu pop up at the start of game for player 1, where he chooses the max amount of creeps avalible on the map at one time. like... and this check, checks for Each side, EX: Each side can have 50, 40, 30, or 20 creeps on the map at one time... 50 creeps 40 creeps 30 creeps 20 creeps after this is enabled, when the max amount of creeps is on the map for a side, the shrines go to player 12 untill you've killed 10 or more of the max amount of creeps. than they go back to there normal player. some of this might have been confusing, but i honestly have no idea how to do a "Unit check" or what ever..thanks if any one does this. im sure it would take a while.. |
Author: | Xantan [ June 2nd, 2007, 4:50 pm ] |
Post subject: | |
integer > count units in rect owned by player or addition and do all 4... need help with the dialog too? |
Author: | Joshsta818 [ June 2nd, 2007, 6:02 pm ] |
Post subject: | |
that would be nice, lol thnx btw heres the only condiction i could find that looks like what u said. (Number of units in (Units in (Playable map area))) Equal to 0 and then iwent ahead and did an action just to see whait t would look like Unit - Change ownership of Shrine Level 1 0001 <gen> to Player 11 (Dark Green) and Change color |
Author: | Thunder_Dragon- [ June 2nd, 2007, 11:00 pm ] |
Post subject: | |
ok here comes the trigger variables needed: CreepMax - Dialog CreepBurron - Dialoa button array 5 MaxCreep - Integer array 2 Code: dialog
Events Time - Elapsed game time is 2.00 seconds Conditions Actions Dialog - Create a dialog button for CreepMax labelled Max creeps 10 Set CreepButton[1] = (Last created dialog Button) Dialog - Create a dialog button for CreepMax labelled Max creeps 20 Set CreepButton[2] = (Last created dialog Button) Dialog - Create a dialog button for CreepMax labelled Max creeps 30 Set CreepButton[3] = (Last created dialog Button) Dialog - Create a dialog button for CreepMax labelled Max creeps 40 Set CreepButton[4] = (Last created dialog Button) Dialog - Create a dialog button for CreepMax labelled Max creeps 50 Set CreepButton[5] = (Last created dialog Button) Dialog - Change the title of CreepMax to Max Creeps Dialog - Show CreepMax for Player 1 (Red) -------------------------------- Button Events Dialog - A dialog button is clicked for CreepMax Conditions Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions CreepButton[1] Equal to (Clicked dialog button) Then - Actions Set MaxCreeps[2] = 10 Game - Display to (All players) the text: Max creeps is set t... Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions CreepButton[2] Equal to (Clicked dialog button) Then - Actions Set MaxCreeps[2] = 20 Game - Display to (All players) the text: Max creeps is set t... Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions CreepButton[3] Equal to (Clicked dialog button) Then - Actions Set MaxCreeps[2] = 30 Game - Display to (All players) the text: Max creeps is set t... Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions CreepButton[4] Equal to (Clicked dialog button) Then - Actions Set MaxCreeps[2] = 40 Game - Display to (All players) the text: Max creeps is set t... Else - Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions CreepButton[5] Equal to (Clicked dialog button) Then - Actions Set MaxCreeps[2] = 50 Game - Display to (All players) the text: Max creeps is set t... Else - Actions -------------------------------- creep spawn Events Unit - A unit enters CreepCount <gen> Conditions Actions Set MaxCreeps[1] = (MaxCreeps[1] + 1) --------------------------------- Creeps Events Time - Every 0.20 seconds of game time Conditions Actions If (All Conditions are True) then do (Then Actions) else do (Else Actions) If - Conditions MaxCreeps[1] Greater than MaxCreeps[2] Then - Actions Unit - Change ownership of RedShrine 0000 <gen> to Player 12 (Brown) and Change color Else - Actions Unit - Change ownership of RedShrine 0000 <gen> to Player 1 (Red) and Change color :p hope u like it |
Author: | Joshsta818 [ June 3rd, 2007, 2:18 am ] |
Post subject: | |
Thanks!, how long did it take you to make that aprox? Lol looks like a lot of work lol, im making the trigger now, im Very happy and if you want i can include your name in the credits :\ lol Also i dont have the creep count variable..may i ask how you make that one to? thnx Also for the Set MaxCreep[1] = MaxCreep[1] +1 ...idk how to get that but.. would this work? Dialog - A dialog button is clicked for CreepMax ..its the same thing i spose |
Author: | Xantan [ June 3rd, 2007, 2:50 am ] |
Post subject: | |
Two actions only =/ GUI: Code: Set integer = (Number of units in (Units in No rect((((Matching unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True)))) If (integer Greater than or equal to 50) then do (Unit Group - Pick every unit in (Units in (Entire map)((((Triggering unit) is alive) Equal to True) and (((Matching unit) belongs to an enemy of Player 1 (Red)) Equal to True))) and do (Unit - Change ownership of (Picked unit) to Neutral Hostile and Change c else do (Do nothing) Jass: Code: function Trig_xantan_Func001002001002001 takes nothing returns boolean
return ( IsUnitAliveBJ(GetFilterUnit()) == true ) endfunction function Trig_xantan_Func001002001002002 takes nothing returns boolean return ( IsUnitEnemy(GetFilterUnit(), Player(0)) == true ) endfunction function Trig_xantan_Func001002001002 takes nothing returns boolean return GetBooleanAnd( Trig_xantan_Func001002001002001(), Trig_xantan_Func001002001002002() ) endfunction function Trig_xantan_Func002001 takes nothing returns boolean return ( udg_integer >= 50 ) endfunction function Trig_xantan_Func002002001002001 takes nothing returns boolean return ( IsUnitAliveBJ(GetTriggerUnit()) == true ) endfunction function Trig_xantan_Func002002001002002 takes nothing returns boolean return ( IsUnitEnemy(GetFilterUnit(), Player(0)) == true ) endfunction function Trig_xantan_Func002002001002 takes nothing returns boolean return GetBooleanAnd( Trig_xantan_Func002002001002001(), Trig_xantan_Func002002001002002() ) endfunction function Trig_xantan_Func002002002 takes nothing returns nothing call SetUnitOwner( GetEnumUnit(), Player(PLAYER_NEUTRAL_AGGRESSIVE), true ) endfunction function Trig_xantan_Actions takes nothing returns nothing set udg_integer = CountUnitsInGroup(GetUnitsInRectMatching(null, Condition(function Trig_xantan_Func001002001002))) if ( Trig_xantan_Func002001() ) then call ForGroupBJ( GetUnitsInRectMatching(GetEntireMapRect(), Condition(function Trig_xantan_Func002002001002)), function Trig_xantan_Func002002002 ) else call DoNothing( ) endif endfunction //=========================================================================== function InitTrig_xantan takes nothing returns nothing set gg_trg_xantan = CreateTrigger( ) call TriggerAddAction( gg_trg_xantan, function Trig_xantan_Actions ) endfunction you'll of course want to change no rect to the rect, and enemy of player should work fine, alive is good, all boalean (and) etc... you can do that yaya? =p integer = a integer variable of course. rest I think you can know -- ie the trigger name was xantan. oh, I just did the creep shit which he already did Edit: His variables are just arrays... name it that + array it should be an integer. |
Author: | Joshsta818 [ June 3rd, 2007, 3:10 am ] |
Post subject: | |
i really appreciate what both of you have done, seriously i would have never figured this one out lolz. Edit: would i have to make the "Shrine" trigger for ALL Colors and all 1-3 shrines? and i cant get the creepcount variable to work, so u think this would work? Unit - A unit enters (Entire map) (Edit): i just got done testing, every thing is correct/works except for the part where u summon over 10-50 creeps and it takes control of your shrine..., nothing happend so assume the "Entire MAP" Thing isnt correct Lol. same for creepcount and [1] +1 thing |
Author: | Thunder_Dragon- [ June 3rd, 2007, 8:40 am ] |
Post subject: | |
well since i dont know ur map i cant exactly make a good trigger to it but creepcount is a region where the monsters spawns btw it only took about 10 min to make those triggers |
Author: | Joshsta818 [ June 3rd, 2007, 5:33 pm ] |
Post subject: | |
(Edit) just got done testing, and still dosnt work. :[ k heres what ive got for Creep spawn, becuase theyre are 4 spawning points for creeps. but i still cant figure out the part that is in red, its not exacally like yours :p Events Unit - A unit enters Middle Center Bottom Left <gen> Unit - A unit enters Middle Center Bottom Right <gen> Unit - A unit enters Middle Center Top Left <gen> Unit - A unit enters Middle Center Top Right <gen> Actions Set MaxCreep[1] = MaxCreep[(1 + 1)] |
Author: | Xantan [ June 3rd, 2007, 5:51 pm ] |
Post subject: | |
but that wont even work... you'll need to minus some for when they die.. i'd just use my way honestly, lol |
Page 1 of 2 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |