• 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] Why this Easy trigger didn t works?

Status
Not open for further replies.
Level 6
Joined
Aug 10, 2010
Messages
77
:ogre_rage:
whyfp.jpg
After Tech upgrade my unit should be got by ABILITY Extra cannon but it doesn t work why? :)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
Maybe you should try putting in the conditions inside the And- Conditions
The "And - Conditions" is useless in the trigger seen above: conditions always apply "And" by default.

still do not works :)... hmmm my ability is Cannon which attack automaticaly can be mistake here? :) created from Phenix fire ...
You did check my map, correct?
Because the cannon-ability there is also based on phoenix fire, and it starts shooting once the upgrade has been researched (meaning that it works :p).
If you cannot figure it out, perhaps upload your map?
 
Level 6
Joined
Aug 10, 2010
Messages
77
I have Battleship on map and i have moved ship to Crab(Enemy) and after Ugrade Ship did not start attack
I thought that i will can send you a map, but file can be attached only at forum och :) ...

Ok here is map :) ... Check it why it is not working ...I know that map is horrible now :D i have started make it couple hours ago

Trigger is at EXTRA CANNONS
 

Attachments

  • Pearl-Storm.V1.01.w3x
    51.8 KB · Views: 46
Level 28
Joined
Jan 26, 2007
Messages
4,789
Aha! The battleship isn't the one doing the upgrade :p.
"Triggering Unit" refers to whoever is doing the event.
In this case: it will add the ability "Extra Cannons 1" to "Cannon Shop". You need to add it to the battleship.

To solve this, create a unit-array variable (I'll call it "PlayerShip").
This variable will store the ship for each player (PlayerShip[1] will contain the ship of Player 1, PlayerShip[4] will contain the ship of Player 4).
When the game starts, you need to set these variables to the correct unit.

Then you can do this:
  • Unit - Add Extra Cannon1 to PlayerShip[(Player number of (Triggering player))]
Uploaded 2 maps:
- Your map (fixed),
- "FinishResearch": sample-map.

Edit: I hope you understand how it works, because it won't magically work for all players: you need to set PlayerShip[X] correctly. You should also keep this in mind when a player is switching between ships.

Edit 2: oops, wrong attachment :D (fixed).
 

Attachments

  • Pearl-Storm.V1.01.w3x
    51.6 KB · Views: 44
  • FinishResearch.w3x
    18.8 KB · Views: 52
Level 6
Joined
Aug 10, 2010
Messages
77
Och understand now :) .... But How to set To my BattleShip I want this ability only for Battleship If I am right This Trigger will add extra cannon to all ships of current Player or? :)

Ok i Try to do it(set variables), Just a minute :) ... I will put here what i created

EDIT:
turtt.jpg

This is First trigger and Yours is seconds :) so it means that Battleship will obtain Extra Cannon :) but only for players who go to region with ship(Of course region is at Shipyard so player buy ship and ship will be in region immediately).. yep?
So this is working :) is it good enough or?
 
Last edited:
Ok i will check it,thanks :).But why triggering :) with entering unit it works too

triggering unit is faster than entering unit. triggering unit is also considered a local variable so it doesnt get overwritten when using waits. if u look at the code that entering unit gets turned into it actually returns
JASS:
GetTriggerUnit()
 
Status
Not open for further replies.
Top