Moderator
M
Moderator
02:20, 22nd Jul 2012
Magtheridon96: Approved.
Despite the code size, this is a pretty cool resource.
Magtheridon96: Approved.
Despite the code size, this is a pretty cool resource.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
(2 ratings)
Approved
Ini

Events


Map initialization

Conditions

Actions


Set Wall_Fake = Wall FAKE (with diagonals)


Set Wall_Fake2 = Wall FAKE


Set Wall_True = Wall TRUE


-------- Set ANGLE of BASE MODEL: Vertical = 0 / Horizontal = 90 / Diagonal = 45 OR 225 --------


Set Wall_Angle = 90.00
Finishes Construction

Events


Unit - A unit Finishes construction

Conditions

Actions


Set Unit_A = (Triggering unit)


Set Real_A = (Life of Unit_A)


Set Player_A = (Owner of Unit_A)


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Unit-type of Unit_A) Equal to Wall_Fake



Then - Actions




Set Point_A = (Position of Unit_A)




Unit - Remove Unit_A from the game




Set Group_A = (Units within 150.00 of Point_A matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Wall_True)))




Unit Group - Pick every unit in Group_A and do (Actions)





Loop - Actions






Set Unit_A = (Picked unit)






Set Point_B = (Position of Unit_A)






Set Real_B = (Life of Unit_A)






Unit - Remove Unit_A from the game






Unit - Create 1 Wall_True for Player_A at Point_B facing ((Angle from Point_A to Point_B) + Wall_Angle) degrees






Unit - Set life of (Last created unit) to Real_B






Custom script: call RemoveLocation(udg_Point_B)




Set Point_B = (Position of Unit_A)




Unit - Create 1 Wall_True for Player_A at Point_A facing ((Angle from Point_A to Point_B) + Wall_Angle) degrees




Unit - Set life of (Last created unit) to Real_A




Custom script: call RemoveLocation(udg_Point_A)




Custom script: call RemoveLocation(udg_Point_B)




Custom script: call DestroyGroup(udg_Group_A)



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Unit-type of Unit_A) Equal to Wall_Fake2



Then - Actions




Set Point_A = (Position of Unit_A)




Unit - Remove Unit_A from the game




Set Group_A = (Units within 150.00 of Point_A matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Wall_True)))




Unit Group - Pick every unit in Group_A and do (Actions)





Loop - Actions






Set Unit_A = (Picked unit)






Set Point_B = (Position of Unit_A)






Set Real_B = (Life of Unit_A)






Unit - Remove Unit_A from the game






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








Or - Any (Conditions) are true









Conditions










(Angle from Point_A to Point_B) Equal to 0.00










(Angle from Point_B to Point_A) Equal to 0.00










(Angle from Point_A to Point_B) Equal to 180.00










(Angle from Point_B to Point_A) Equal to 180.00







Then - Actions








Set Wall_Angle2 = Wall_Angle







Else - Actions






If (All Conditions are True) then do (Then Actions) else do (Else Actions)







If - Conditions








Or - Any (Conditions) are true









Conditions










(Angle from Point_A to Point_B) Equal to 90.00










(Angle from Point_B to Point_A) Equal to 90.00










(Angle from Point_A to Point_B) Equal to 270.00










(Angle from Point_B to Point_A) Equal to 270.00







Then - Actions








Set Wall_Angle2 = (Wall_Angle + 90.00)







Else - Actions






Unit - Create 1 Wall_True for Player_A at Point_B facing Wall_Angle2 degrees






Unit - Set life of (Last created unit) to Real_B






Custom script: call RemoveLocation(udg_Point_B)




Unit - Create 1 Wall_True for Player_A at Point_A facing Wall_Angle2 degrees




Unit - Set life of (Last created unit) to Real_A




Custom script: call RemoveLocation(udg_Point_A)




Custom script: call RemoveLocation(udg_Point_B)




Custom script: call DestroyGroup(udg_Group_A)



Else - Actions
Here is the one trigger lols:
![]()
If you downloaded Version 1 walls that are damaged while construction will always have full HP once constructed, to avoid that uglyness download V 2...
Lol did you screencap your triggers? You can just right click the little white part at the top and hit "copy as text" and it'll get the whole thing for you. Just hit the trigger tag on the top of the post editor and paste the trigger. It'll make life soooo much easier.
Wait no. Okay this system is a useful one, but not in this case. I just wondering how you calculate the angle of the wall? When my builder has an angle of 0, then I want a vertical wall with angle 0 too, but I get the weired things.
What about adding abilities to a wall to rotate it?
Set Group_A = (Units within 150.00 of Point_A matching ((((Matching unit) is alive) Equal to True) and ((Unit-type of (Matching unit)) Equal to Wall_Real)))
how to have people listen to you (mortars' sexy pic?) ;o...
Thx btw!
Aren't useful and handy the same thing ;o?
