Weapon Upgrade System and in game camera

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Weapon Upgrade System and in game camera

Post by Arabidnun »

No problem, don't hesiatate to ask with anymore questions.
Darkness568
Member
Posts: 97
Joined: June 18th, 2007, 12:45 am

Re: Weapon Upgrade System and in game camera

Post by Darkness568 »

Ok i have one more question the unit uses an item part of the trigger is there a way to make it more specific because i copied the trigger and made it work for another item, but when i click on just one of them they both upgrade. So is there a way to make it specific.
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Weapon Upgrade System and in game camera

Post by Arabidnun »

You have to make an Individual trigger for each Item because there are two items, and those individual items need to check for their own triggers

[blinking]Ex 1:[/blinking]
Arcane Upgrade
Events
Unit - A unit Uses an item
Conditions
((Triggering player) Current gold) Greater than or equal to 500
Actions
Set Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] = (Hero manipulating item)
Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] has an item of type Arcane) Equal to True
((Triggering player) Current gold) Greater than or equal to 500
Then - Actions
Player - Add -500 to (Triggering player) Current gold
Else - Actions
Do nothing
Wait 5.00 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] has an item of type Arcane) Equal to True
Then - Actions
Item - Remove (Item carried by Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] of type Arcane)
Hero - Create Staff of Sanctuary and give it to Temp_Unit[(Player number of (Owner of (Hero manipulating item)))]
Else - Actions
Do nothing
Player - Add 500 to (Owner of Temp_Unit[(Player number of (Owner of (Hero manipulating item)))]) Current gold

[blinking]Ex 2:[/blinking]
Secret Upgrade
Events
Unit - A unit Uses an item
Conditions
((Triggering player) Current gold) Greater than or equal to 500
Actions
Set Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] = (Hero manipulating item)
Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] has an item of type Secret Level Powerup) Equal to True
((Triggering player) Current gold) Greater than or equal to 500
Then - Actions
Player - Add -500 to (Triggering player) Current gold
Else - Actions
Do nothing
Wait 5.00 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] has an item of type Secret Level Powerup) Equal to True
Then - Actions
Item - Remove (Item carried by Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] of type Secret Level Powerup)
Hero - Create Phat Lewt and give it to Temp_Unit[(Player number of (Owner of (Hero manipulating item)))]
Else - Actions
Do nothing
Player - Add 500 to (Owner of Temp_Unit[(Player number of (Owner of (Hero manipulating item)))]) Current gold


The difference is the highlighted areas, all you really need to do is copy the trigger as many times as u want and change the items that are Located above in RED for the item that must be in their inventory for them to start the upgrade, and items located in BLUE are the item that is created for the hero when all conditions are true. Plus, for greater upgrades u can change the GREEN which tells you how much gold that the triggering player of triggering unit must have to accomplish this type of upgrade. Hope this helps, gl and have fun mate.
Darkness568
Member
Posts: 97
Joined: June 18th, 2007, 12:45 am

Re: Weapon Upgrade System and in game camera

Post by Darkness568 »

Looks like the triggers u already gave me, but i did copy it and changed everything accordingly, but in the game when i have 1 item in the separate triggers they both trigger instead of one or is that just unavoidable.
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Weapon Upgrade System and in game camera

Post by Arabidnun »

Post your map for me, I can see what I can do.

Edit: Do you mean you have an item that is located in two triggers that are identical, well of couse they are gonna both go off at the same time.

Edit 2: I have modified the GUI trigger and you can now have multiple items of that type in your inventory and only 1 will upgrade at a time.

Edit 3: I have recently found that this new trigger works great, but when 2 people upgrade at the same time, that they cancel eachother out....I am currently working to fix this problem....


[blinking]
Before
[/blinking]
Spoiler:
Arcane Upgrade Original
Events
Unit - A unit Uses an item
Conditions
((Triggering player) Current gold) Greater than or equal to 500
Actions
Set Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] = (Hero manipulating item)
Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] has an item of type Arcane) Equal to True
((Triggering player) Current gold) Greater than or equal to 500
Then - Actions
Player - Add -500 to (Triggering player) Current gold
Else - Actions
Do nothing
Wait 5.00 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] has an item of type Arcane) Equal to True
Then - Actions
Item - Remove (Item carried by Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] of type Arcane)
Hero - Create Phat Lewt and give it to Temp_Unit[(Player number of (Owner of (Hero manipulating item)))]
Else - Actions
Do nothing
Player - Add 500 to (Owner of Temp_Unit[(Player number of (Owner of (Hero manipulating item)))]) Current gold

[blinking]
Modified Trigger
[/blinking]
Spoiler:
Arcane Upgrade Modified
Events
Unit - A unit Uses an item
Conditions
(Item being manipulated) Equal to (Item carried by (Hero manipulating item) of type Arcane)
((Triggering player) Current gold) Greater than or equal to 500
Actions
Set Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] = (Hero manipulating item)
Set Temp_Item = (Item being manipulated)
Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] has an item of type Arcane) Equal to True
((Triggering player) Current gold) Greater than or equal to 500
Then - Actions
Player - Add -500 to (Triggering player) Current gold
Else - Actions
Do nothing
Wait 5.00 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] has Temp_Item) Equal to True
Then - Actions
Item - Remove (Item carried by Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] of type (Item-type of Temp_Item))
Hero - Create Staff of Sanctuary and give it to Temp_Unit[(Player number of (Owner of (Hero manipulating item)))]
Else - Actions
Do nothing
Player - Add 500 to (Owner of Temp_Unit[(Player number of (Owner of (Hero manipulating item)))]) Current gold

Ok, the RED SPOTS are the places I have modified. This means that the item you use now is set to a variable now, and instead of checking for that item again in the end of the trigger, it checks for the variable which is the originally used item, and will only upgrade that one. Check it out.

[blinking]
Upgrade System Map
[/blinking]
Spoiler:
Item Upgrade System.w3x
You do not have the required permissions to view the files attached to this post.
Darkness568
Member
Posts: 97
Joined: June 18th, 2007, 12:45 am

Re: Weapon Upgrade System and in game camera

Post by Darkness568 »

Alright i am trying them out now.

Edit: Alright it seems to work correctly and thanks for responding so fast to everything.

Edit 2: Ok and this may be really stupid, but how do you make it so that you cannot change team color or race? Ive seen almost every map have it, but idk how to do it.
Last edited by Darkness568 on July 8th, 2008, 1:01 am, edited 1 time in total.
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Weapon Upgrade System and in game camera

Post by Arabidnun »

I have currently found a glitch that I am working to correct as we speak, Will post edited triggers and new info once the problem has been resolved.

Edit:


[blinking]
Old Trigger
[/blinking]
Spoiler:
Arcane Upgrade Modified
Events
Unit - A unit Uses an item
Conditions
(Item being manipulated) Equal to (Item carried by (Hero manipulating item) of type Arcane)
((Triggering player) Current gold) Greater than or equal to 500
Actions
Set Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] = (Hero manipulating item)
Set Temp_Item = (Item being manipulated)
Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] has an item of type Arcane) Equal to True
((Triggering player) Current gold) Greater than or equal to 500
Then - Actions
Player - Add -500 to (Triggering player) Current gold
Else - Actions
Do nothing
Wait 5.00 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] has Temp_Item) Equal to True
Then - Actions
Item - Remove (Item carried by Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] of type (Item-type of Temp_Item))
Hero - Create Staff of Sanctuary and give it to Temp_Unit[(Player number of (Owner of (Hero manipulating item)))]
Else - Actions
Do nothing
Player - Add 500 to (Owner of Temp_Unit[(Player number of (Owner of (Hero manipulating item)))]) Current gold

[blinking]
New Trigger
[/blinking]
Spoiler:
Arcane Upgrade Modified
Events
Unit - A unit Uses an item
Conditions
(Item being manipulated) Equal to (Item carried by (Hero manipulating item) of type Arcane)
((Triggering player) Current gold) Greater than or equal to 500
Actions
Set Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] = (Hero manipulating item)
Unit Group - Pick every unit in (Units currently selected by (Triggering player)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] has an item of type Arcane) Equal to True
((Triggering player) Current gold) Greater than or equal to 500
Then - Actions
Player - Add -500 to (Triggering player) Current gold
Else - Actions
Do nothing
Wait 5.00 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] has an item of type Arcane) Equal to True
Then - Actions
Item - Remove (Item carried by Temp_Unit[(Player number of (Owner of (Hero manipulating item)))] of type Arcane)
Hero - Create Staff of Sanctuary and give it to Temp_Unit[(Player number of (Owner of (Hero manipulating item)))]
Else - Actions
Do nothing
Player - Add 500 to (Owner of Temp_Unit[(Player number of (Owner of (Hero manipulating item)))]) Current gold
As you see, I encounted a problem when More then one person would want to upgrade their item, it would counterlap my variable, thus creating a problem. So, I have tested my new method and it works, it looks like the original, but only is activated when a certain item is turned on

CAUTION: There is a small delay though between clicking on items to upgrade, if u click on 1 item right after another almost instantly, it will not trigger, so like a .5-1second between items upgraded is suffiecent. Not a big deal as because of my trigger set up gold is not taken away if this happens, you just have to wait for the cooldown on the item to come back =D.

[blinking]
New Map(hopefully final)
[/blinking]
Spoiler:
Item Upgrade System.w3x
You do not have the required permissions to view the files attached to this post.
Darkness568
Member
Posts: 97
Joined: June 18th, 2007, 12:45 am

Re: Weapon Upgrade System and in game camera

Post by Darkness568 »

Alright thanks for catching that i probably wouldnt have noticed lol.
Arabidnun
Forum Staff
Posts: 506
Joined: August 5th, 2007, 1:38 pm
Title: Gui Expert
Location: *Unknown*

Re: Weapon Upgrade System and in game camera

Post by Arabidnun »

No problem, Any other questions don't hesitate to ask.
Darkness568
Member
Posts: 97
Joined: June 18th, 2007, 12:45 am

Re: Weapon Upgrade System and in game camera

Post by Darkness568 »

Well the question i have above still needs to be answered but idk if you know lol here it is

Code: Select all

Edit 2: Ok and this may be really stupid, but how do you make it so that you cannot change team color or race? Ive seen almost every map have it, but idk how to do it.
And for the alliance changer i noticed that having two separate triggers that does the same thing, but on two different buildings for some reason the one would work, but the other would not here are the two codes.
Spoiler:
ML Cp
Events
Unit - A unit enters ML CP <gen>
Conditions
Or - Any (Conditions) are true
Conditions
(Tower is alive) Equal to False
(Owner of Tower) Equal to Neutral Passive
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is A Hero) Equal to True
(Number of units in (Units within 512.00 of (Center of ML CP <gen>) matching ((Owner of (Picked unit)) Equal to (Owner of Control Point 0061 <gen>)))) Equal to 0
Then - Actions
Wait 5.00 seconds
Unit - Change ownership of Control Point 0061 <gen> to (Owner of (Entering unit)) and Change color
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Tower is alive) Equal to False
Then - Actions
Unit - Create 1 Advanced Empire Tower for (Owner of (Entering unit)) at (Center of ML Tower <gen>) facing Default building facing degrees
Set Tower = (Last created unit)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Tower is alive) Equal to True
(Owner of Tower) Equal to Neutral Passive
Then - Actions
Unit - Change ownership of Tower to (Owner of (Entering unit)) and Change color
Else - Actions
Do nothing
Spoiler:
BM CP
Events
Unit - A unit enters BM CP <gen>
Conditions
Or - Any (Conditions) are true
Conditions
(Tower is alive) Equal to False
(Owner of Tower) Equal to Neutral Passive
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is A Hero) Equal to True
(Number of units in (Units within 512.00 of (Center of BM CP <gen>) matching ((Owner of (Picked unit)) Equal to (Owner of Control Point 0040 <gen>)))) Equal to 0
Then - Actions
Wait 5.00 seconds
Unit - Change ownership of Control Point 0040 <gen> to (Owner of (Entering unit)) and Change color
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Tower is alive) Equal to False
Then - Actions
Unit - Create 1 Advanced Empire Tower for (Owner of (Entering unit)) at (Center of BM Tower <gen>) facing Default building facing degrees
Set Tower = (Last created unit)
Else - Actions
Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Tower is alive) Equal to True
(Owner of Tower) Equal to Neutral Passive
Then - Actions
Unit - Change ownership of Tower to (Owner of (Entering unit)) and Change color
Else - Actions
Do nothing
They both seem the same to me, but yet it wouldn't work.
Also the teleport system is this the correct way of making it so that you can have them in one trigger or do they have to be seperate?
Spoiler:
Teleport
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Control Point Teleport
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of Control Point 0040 <gen>) Equal to (Triggering player)
Then - Actions
Environment - Create a 3.00 second Temporary crater deformation at (Position of (Casting unit)) with radius 200.00 and depth 64.00
Environment - Create a 3.00 second Normal ripple deformation at (Position of (Casting unit)) with starting radius 0.00, ending radius 200.00, and depth 64.00, using 0.25 second ripples spaced 10.00 apart
Unit - Pause (Casting unit)
Wait 3.00 seconds
Unit - Move (Casting unit) instantly to (Position of Control Point 0040 <gen>)
Unit - Unpause (Casting unit)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Owner of Control Point 0061 <gen>) Equal to (Triggering player)
Then - Actions
Environment - Create a 3.00 second Temporary crater deformation at (Position of (Casting unit)) with radius 200.00 and depth 64.00
Environment - Create a 3.00 second Normal ripple deformation at (Position of (Casting unit)) with starting radius 0.00, ending radius 200.00, and depth 64.00, using 0.25 second ripples spaced 10.00 apart
Unit - Pause (Casting unit)
Wait 3.00 seconds
Unit - Move (Casting unit) instantly to (Position of Control Point 0061 <gen>)
Unit - Unpause (Casting unit)
Else - Actions
Do nothing