• 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] Need Help with Pokeball triggers

Status
Not open for further replies.
Level 2
Joined
Apr 18, 2007
Messages
12
Im making a new map based off of the current Pokemon World thats currently out in WC3. Im completly redoing it since the current Pokemon World had a lot of issues and I decided to fix it. Yes, there are a few other Pokemon World maps out there, but those are RPG style games and Im going to make mine into an arena style version.

And can someone help me with a Pokeball trigger where on your main hero(the Pokemon Trainer) can click on a skill- Pokeball, and it brings up a menu option where you can click on a Pokemon(unit) and summon it? I was thinking of using the spellbook for this, but i figure that a menu option would be better.

I was trying to make them into variables/arrays, but i couldnt figure out how to implement it that well.

player1[0] = gyrados
player1[1] = pikichu
player1[2] = magikarp
player1[3] = charmander
player1[4] = null
player1[5] = null

  • Pokeball
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Spell0
    • Actions
      • If (All Conditions are True)
        • Conditions
          • player1[0] != null
        • Then - Actions
          • Unit - Create 1 Unit of type Gyrados at Target Point of Ability being Cast facing Default Building Facing
        • Else - Actions
          • Game - Display Text to Owner of Unit (Triggering Unit) saying "No pokemon in that ball..."
 
Last edited by a moderator:
Level 6
Joined
Feb 2, 2005
Messages
205
For a Solution you will need at least 3 Triggers, one for the Spell, one for the Dialog and one for the Buttons. I will start off with the Spell.

PlayerSelected is a Boolean Array Variable
x is an Integer Variable

  • Spell
    • Events
      • Unit starts the effect of an Ability
    • Conditions
      • Ability equal to Spell0
    • Actions
      • Trigger - Run Trigger Dialog (Ignoring Conditions)
      • Wait until (PlayerSelected[Player Number of (Triggering Player)] equal True), checking every 1.00 seconds
      • If (All Conditions are True)
      • Conditions
        • player1[0] != null
      • Then - Actions
        • Unit - Create 1 Unit of type Player1[x] at Target Point of Ability being Cast facing Default Building Facing
      • Else - Actions
Okay now we will create a Dialog its just the First two, i'm lazy :emote_smile:

gyrados & pikachu are Dialog Buttons Variables
DialogX is a Dialog Variable

  • Dialog
    • Events
    • Conditions
    • Actions
      • Dialog - Change the title of DialogX to Choose your Pokemon
      • Dialog - Create a dialog button for Dialog labelled Gyrados
      • Set gyrados = (Last created dialog Button)
      • Dialog - Create a dialog button for Dialog labelled pikichu
      • Set pikichu = (Last created dialog Button)
      • Dialog - Show Dialog for (Triggering Player)

Get you Pokemon

  • Male
    • Events
      • Dialog - A dialog button is clicked for Dialog
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Clicked dialog button) Equal to Gyrados
      • Then - Actions
        • set x = 1
        • Set PlayerSelected[Player Number of (Triggering Player)] = True
      • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • (Clicked dialog button) Equal to pikachu
      • Then - Actions
        • set x = 2
        • Set PlayerSelected[Player Number of (Triggering Player)] = True
      • Else - Actions
On an new Round you will have to set the Player Selected to false again

Any Questions? :emote_smile:

This is not a perfect Trigger, you could create the Button Dynamicly and it leaks a Position, have a look into the tutorial section how to fix leaks, since leaks can make your map lag if enough occure.
 
Last edited by a moderator:
Status
Not open for further replies.
Top