• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Upgrading and teleport point system??

Status
Not open for further replies.
Level 3
Joined
Sep 6, 2007
Messages
42
Hi I am trying to make a battle tanks map that has a clickable upgrading system so that a hero when they click on the item it takes away x amount of gold from the hero and upgrades the item to a better version or different one all together.

A teleport system that when a unit is near factories or the control points (control points are points players capture) and allow them to teleport to the point on their side.

how to make the control points rescue able. If someone could help me with this it would be great.
Thank you in advance
 
Level 9
Joined
Oct 17, 2007
Messages
547
1) Just make a shop selling that item for the amount of money you want the upgrade cost and trigger the game so that whenever that item is used replace the casting unit with the upgraded version.

2)Trigger the game so that whenever the unit is within X range of the control point, move them to a point in home base depending on which team the player is on. (Use array)

3) To make it simple, make a dummy skill that targets building or whichever type of unit the control point is. Whenever that skill is cast, check the team that the casting unit owner belongs to and change the ownership of that unit to that team.
 
Level 3
Joined
Sep 6, 2007
Messages
42
So i would do i have to do a array for the items too somehow so item[1]=1item then item[2] equals another and if so how would that be setup.

Exactly what array would i have to use for the teleporting one??
I have used some arrays before but i was going off of something already made so i dont know the difference very well between different number arrays.

So make a dummy skill off the spell like firebolt and when it casts do something like. If casting player uses dummyspell do then actions then actions:if spell caster player is a ally of player 11(dark green) change spell casting building to player11 (dark green) or something along those lines?
 
Level 4
Joined
Sep 9, 2004
Messages
112
1) Use the "Unit aquires item" event, then check the item-type of the item just aquired and then just check using the If, Then, Else action and see if they have the items required, then remove the required items and add the item that it creates. I can make a trigger for this as an example if need be but I'm kinda too lazy to do it right now.

2) You could use a circle of power and place them as a neatural (rescuable) team, but if the points are stealable then you could maybe use rects.. Its kinda not the most efficent way but it would work. Just place a unit in the center of the rect as a dummy unit (probably circles as they are walkable) to mark who owns it then whenever a unit enters the rect, change the ownership to the owner of entering unit.

3)For teleporting..I use rects still.. unit enters rect, move unit instantly to another unit, rect, point.. whatever..

If u need actaul trigger examples just say something..
 
Level 4
Joined
Sep 9, 2004
Messages
112
Yes a way gate could work but the simple fact is that a waygate is useable by anyone isn't it? Well I do believe he only wants it to work by the owning player..

will update in a bit with some examples tho..
 
Level 4
Joined
Sep 9, 2004
Messages
112
Anyway..heres a transport system (uses a dialog as well) and change owner system if you want to use them or not is up to you! :p

  • Change Owner
    • Events
      • Unit - A unit enters Blue Rect <gen>
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in (Units in Blue Rect <gen> owned by (Owner of Circle of Power (large) 0000 <gen>))) Equal to 0
        • Then - Actions
          • Unit - Change ownership of Circle of Power (large) 0000 <gen> to (Owner of (Entering unit)) and Change color
        • Else - Actions
          • Do nothing
This trigger requires a few simple things, a circle of power and a Rect centered on the circle of power. Now you can make the rect as big as you would like but remember it will count for the range of the change so a bigger rect= a bigger range and vice versa. Also the rect plays a part in my transport system. I mean it doesn't have to but I made it that way. You can use a completly different rect for the transport of the units that is equal to the size of the circle of power used..

There are 3 triggers for the transport system below and they use variables as well so you will need to make those variables yourself but I will list them here for you and the type of variable they are.

Variables:
CurrentDialogRect (Variable Type: Rect)
DialogNoTransport (Variable Type: Dialog Button)
DialogYesTransport (Variable Type: Dialog Button)
DialogTransportToBase (Variable Type: Dialog)
PlayerBase (Variable Type: Unit-Array {click the array box [] and set the array number to your total number of players})

And the triggers...
  • Unit Transport
    • Events
      • Unit - A unit enters Blue Rect <gen>
    • Conditions
      • (Owner of (Entering unit)) Equal to (Owner of Circle of Power (large) 0000 <gen>)
    • Actions
      • Set CurrentDialogRect = Blue Rect <gen>
      • Dialog - Change the title of DialogTransportToBase to Teleport to Base?
      • Dialog - Create a dialog button for DialogTransportToBase labelled Yes
      • Set DialogYesTransport = (Last created dialog Button)
      • Dialog - Create a dialog button for DialogTransportToBase labelled No
      • Set DialogNoTransport = (Last created dialog Button)
      • Dialog - Show DialogTransportToBase for (Owner of (Entering unit))
This is the base of the dialog. Now I made this one transport all units in the rect because doing them one at a time would be bad because it would generate a ton of lag..
  • Yes Transport
    • Events
      • Dialog - A dialog button is clicked for DialogTransportToBase
    • Conditions
      • (Clicked dialog button) Equal to DialogYesTransport
    • Actions
      • Unit Group - Pick every unit in (Units in CurrentDialogRect owned by (Owner of Circle of Power (large) 0000 <gen>)) and do (Actions)
        • Loop - Actions
          • Unit - Move (Picked unit) instantly to (Position of PlayerBase[(Player number of (Triggering player))])
          • Camera - Pan camera for (Triggering player) to (Position of PlayerBase[(Player number of (Triggering player))]) over 0.05 seconds
      • Dialog - Hide DialogTransportToBase for (Triggering player)
      • Dialog - Clear DialogTransportToBase
This trigger is for if they click "yes"
  • No Transport
    • Events
      • Dialog - A dialog button is clicked for DialogTransportToBase
    • Conditions
      • (Clicked dialog button) Equal to DialogNoTransport
    • Actions
      • Dialog - Hide DialogTransportToBase for (Triggering player)
      • Dialog - Clear DialogTransportToBase
This trigger is for if they click "no"

I think that should cover you, if you need anything else just ask. Sorry it took so long to get them up..had a bunch of stuff I was trying to do. If you use then please throw some rep my way! Good luck :p
 
Level 4
Joined
Sep 9, 2004
Messages
112
It can be any building, just chage the building in the trigger. I just used circles of power simply because they are walkable! :p
 
Status
Not open for further replies.
Top