• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

help with changing a units team etc...plz

Status
Not open for further replies.
Level 1
Joined
Jul 26, 2007
Messages
4
hey anyone im rly frustrated with this map cuz im pretty sure i triggered it rite, i need it to be wen u kill a control point it goes to ur teams side, but for some reason wen team 1 kills it it goes to team 2's side if anyone wants to help ill send u the map cuz ill prolly need help later anyways -.-, i have this rly good idea but summer ends soon and i can spend less time on the comp...:sad:

ps.i also need help with the control points giving income...>.<
 
Level 8
Joined
Oct 8, 2005
Messages
409
"ps.i also need help with the control points giving income"

make an integer array with an index of 12, we will call this variable playerControllPointsInt

whenever a controll point is killed, tell the map to add add 1 to the array at an index of the player number of the owner of the killing unit and subtract 1 from the array at an index of the player number of the owner of the killing unit

Then make a periodic time event. Use a for next loop to give resources to each player.
For x=1 to 12 step 1
Add 15*playerControllPointsInt(x) to player(x) gold
Next
 
Level 1
Joined
Jul 26, 2007
Messages
4
"ps.i also need help with the control points giving income"

make an integer array with an index of 12, we will call this variable playerControllPointsInt

whenever a controll point is killed, tell the map to add add 1 to the array at an index of the player number of the owner of the killing unit and subtract 1 from the array at an index of the player number of the owner of the killing unit

Then make a periodic time event. Use a for next loop to give resources to each player.
For x=1 to 12 step 1
Add 15*playerControllPointsInt(x) to player(x) gold
Next

o.o sry i dont get any of that 3rd paragraph about telling the map to add 1 to the array, sry i dont understand integers and stuff that much i read some guides but it makes no sense to me..
 
Level 2
Joined
Jul 24, 2007
Messages
199
o.o sry i dont get any of that 3rd paragraph about telling the map to add 1 to the array, sry i dont understand integers and stuff that much i read some guides but it makes no sense to me..

Err... I thought that programmer=mathematician+computer...
It's hard to explain this without arrays/integers/add/subtract etc., because the computer is made from 0s and 1s!
 
Level 1
Joined
Jul 26, 2007
Messages
4
o sry i meant the 2nd paragraph >.< the one about changing the teams with adding integers and everything, sry for all the trouble i feel like such a noob xD
 
Level 1
Joined
Jul 26, 2007
Messages
4
ok ty guys but now how do i make it so that when a control point is killed it changes teams, i forget exactly how i had it triggered b4 but everytime it died it went to team 2's control and i made sure that the triggers all didnt say go to team 2 or anything like that, but now i tried to make it again but it changes control wen its only attacked once -.-
(Event-Unit-controlpoint is attacked/ Unit-controlpoint life becomes less than 75. Condition-attacking unit belongs to an ally of player red equal to true. Action-Change ownership and color of controlpoint to red/ set life of controlpoint to 100%)
wat am i doing wrong or is there a better way to do it?
 
Status
Not open for further replies.
Top