• 🏆 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!

Removing Ques

Status
Not open for further replies.
Level 4
Joined
Aug 14, 2007
Messages
66
I have 2 computers and 5 players per team.

Computer A - Controls all the buildings, units, heroes, workers etc.
Computer B - Controls the buildings containing upgrades. Shares full control with the players
Players 1-5

At all times.....
Players 1-5 have gold and lumber = Computer A's gold and lumber / 5
Computer B has gold and lumber = Computer A's gold and lumber

When a player uses the upgrade buildings controlled by computer B to purchase an upgrade, Computer A's gold and lumber are then set to = Computer B. Which effectively subtracts the full cost of the upgrade from Computer A's gold and lumber. Which then in turn subtracts 1/5 of the upgrade cost from each player.


Now the problem is here:

  • Research Cost
    • Events
      • Unit - A unit Begins research
      • Unit - A unit Cancels research
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Researching unit)) Equal to Computer B (Team 1)
        • Then - Actions
          • Player - Set Computer A (Team 1) Current gold to (Computer B (Team 1) Current gold)
          • Player - Set Computer A (Team 1) Current lumber to (Computer B (Team 1) Current lumber)
        • Else - Actions
          • Do nothing
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Owner of (Researching unit)) Equal to Neutral Victim
        • Then - Actions
          • Player - Set Computer A (Team 2) Current gold to (Computer B (Team 2) Current gold)
          • Player - Set Computer A (Team 2) Current lumber to (Computer B (Team 2) Current lumber)
        • Else - Actions
          • Do nothing

The upgrade que scrambles this up because the trigger can only fire when an upgrade begins. So a player will spend Computer B's resources which will then be immediately reimbursed because Computer B's resources become set to Computer A's before the amount can be subtracted from Computer A's resources.

So if there is some way to disable the que feature, to cancel an upgrade added to a que, or make the above trigger fire when an upgrade is purchased and placed into the que, then my troubles are over.

Any thoughts/ideas/suggestions?

P.s. The upgrade que is the thing that acts as a waiting list for purchased upgrades. A building will only research 1 upgrade at a time but if you purchase simaltaneous upgrades they are added to the que which will start research for upgrades after research is completed.

That thing is what i mean by the upgrade que.
 
Last edited:
Level 4
Joined
Aug 14, 2007
Messages
66
its not the trigger im asking about. It works fine, im trying to do something so that it will work with upgrades in que for being researched because the game caulculates the cost of it when the button is pressed rather then when it starts researching.
 
Status
Not open for further replies.
Top