Shared Upgrades

Status
Not open for further replies.

Gaia

G

Gaia

there are 5 players all with their own upgrade center. i would like one of the upgrades in the upgrade center to effect another player's unit
how would i do this?

like an upgrade to increase hitpoints of your ally's hero for example
 
Trigger the upgrade for all ally players.

You can detect an upgrade event, then issue and upgrade order. It would be advisable to use a dummy unit for the upgrading so not to tie up the other allies queue (unless that's what you want).

It's relatively simple to do in GUI if you setup dummy units, but fair warning, you can't undo the upgrades, only apply a new upgrade to undo what was done.
 
Trigger the upgrade for all ally players.

You can detect an upgrade event, then issue and upgrade order. It would be advisable to use a dummy unit for the upgrading so not to tie up the other allies queue (unless that's what you want).

It's relatively simple to do in GUI if you setup dummy units, but fair warning, you can't undo the upgrades, only apply a new upgrade to undo what was done.

hi ty for replying
im sry but im pretty new to world editor. i can do basic triggers and such but its kind of hard for me at this point to turn a paragraph into a trigger

like im not sure how to "Trigger the upgrade for all ally players."

or most other stuff you said ^^
ur a beautiful angel
 
hi ty for replying
im sry but im pretty new to world editor. i can do basic triggers and such but its kind of hard for me at this point to turn a paragraph into a trigger

like im not sure how to "Trigger the upgrade for all ally players."

or most other stuff you said ^^
ur a beautiful angel

Hopefully GIANT_CRAB can help you with the actual logic of it all then, I don't have the World Editor handy to show you any actual coding, I can throw you some pseudo-code though:

  • Events -
    • Player Unit Event issues upgrade order
  • Conditions -
    • Upgrade being used == "My upgrade"
  • Actions -
    • For all players that are allied to owner of triggering unit
      • Issue Immediate Order to "My dummy unit" owned by Picked Player to purchase "My upgrade"
 
Hopefully GIANT_CRAB can help you with the actual logic of it all then, I don't have the World Editor handy to show you any actual coding, I can throw you some pseudo-code though:

  • Events -
    • Player Unit Event issues upgrade order
  • Conditions -
    • Upgrade being used == "My upgrade"
  • Actions -
    • For all players that are allied to owner of triggering unit
      • Issue Immediate Order to "My dummy unit" owned by Picked Player to purchase "My upgrade"

This trigger isn't effective at all.
 
Here I made one. Its in a test map. Basically it goes like this, when player 1 (Red) researches Berserker Upgrade, it creates a dummy unit for Player 2 (Blue) which researches Berserker Upgrade also. Heres the attachment. I tested it and it works.

  • Trigger 01
    • Events
      • Unit - A unit Begins research
    • Conditions
      • (Researched tech-type) Equal to Berserker Upgrade
    • Actions
      • Set upgradepoint = ((Position of Barracks 0000 <gen>) offset by 256.00 towards 0.00 degrees)
      • Set upgradegroup = (All allies of Player 1 (Red))
      • Player Group - Pick every player in upgradegroup and do (Actions)
        • Loop - Actions
          • Set upgradeplayer = (Picked player)
          • Unit - Create 1 dummy research unit for upgradeplayer at upgradepoint facing Default building facing degrees
          • Set dummyupgradeunit = (Last created unit)
          • Unit - Order dummyupgradeunit to research Berserker Upgrade
      • Custom script: call DestroyForce(udg_upgradegroup)
      • Custom script: call RemoveLocation(udg_upgradepoint)
  • Trigger 02
    • Events
      • Unit - A unit Finishes an upgrade
    • Conditions
      • (Researched tech-type) Equal to Berserker Upgrade
      • (Researching unit) Equal to dummyupgradeunit
    • Actions
      • Unit - Remove dummyupgradeunit from the game
 

Attachments

Status
Not open for further replies.
Back
Top