Pokemon Catching Trigger

darkmik07

New Member
Reaction score
2
how will i make a trigger that when a hero targets a pokemon ( he have the skill "Catch Pokemon") the pokemon will go to a selected region and a pokeball will appear in the inventory of the hero. When the hero clicks the pokeball the pokemon will come out in his front or anywhere near the hero. How do i create the skill "Catch Pokemon" ?
____________________________________________________

Another Triggering Question:

How will i make a trigger that makes the pokemon evolve when he is in level 5.
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Ok i will try make them give me a while. Wait change that give me a while need to go eat
 

Essolesso

New Member
Reaction score
0
This is how i did it but its not very good nd i dont know if it will work properly.
Trigger:
  • Move
    • Events
      • Unit - A unit owned by Player 1 (Red) Begins casting an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Catch Pokemon
          • (Triggering unit) Equal to Poketrainer 0042 <gen>
    • Actions
      • Set Number_Pokemon = (Number_Pokemon + 1)
      • Set Catch[(Number_Pokemon + 1)] = (Target unit of ability being cast)
      • Unit - Create 1 (Unit-type of (Target unit of ability being cast)) for Player 1 (Red) at (Random point in Region 000 <gen>) facing Default building facing degrees
      • Wait 1.00 seconds
      • Unit - Remove Catch[(Number_Pokemon + 1)] from the game
 

Essolesso

New Member
Reaction score
0
And for leveling you can use this.
Trigger:
  • Level
    • Events
      • Unit - A unit Gains a level
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Pidgey
      • (Level of (Triggering unit)) Equal to 5
    • Actions
      • Unit - Replace (Triggering unit) with a Pidgeot using The new unit's max life and mana


But you have to use one for each pokemon
 

Essolesso

New Member
Reaction score
0
Catch is a unit vaiable. And a array of 100 so u can catch 100 different pokemons.

Number_pokemon is a integer.

Pokemons is a unit group. And a array of 4. But u can change it to how many players there are.

This trigger gives a pokeball to the one that catches the pokemon.
But i cant get the game to spawn the right pokemon for the specific pokeball.
Trigger:
  • Move
    • Events
      • Unit - A unit owned by Player 1 (Red) Begins casting an ability
    • Conditions
      • And - All (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Trow pokeball
          • (Triggering unit) Equal to Poketrainer 0042 <gen>
    • Actions
      • Set Number_Pokemon = (Number_Pokemon + 1)
      • Set Catch[(Number_Pokemon + 1)] = (Target unit of ability being cast)
      • Unit - Create 1 (Unit-type of (Target unit of ability being cast)) for Player 1 (Red) at (Random point in Region 000 <gen>) facing Default building facing degrees
      • Unit Group - Add (Last created unit) to Pokemons[(Player number of (Triggering player))]
      • Wait 1.00 seconds
      • Unit - Remove Catch[(Number_Pokemon + 1)] from the game
      • Set Catch[(Number_Pokemon + 1)] = (Last created unit)
      • -------- Give Pokeball --------
      • Hero - Create Pokeball and give it to (Triggering unit)
      • Set Pokemons_Pokeball[Number_Pokemon] = (Item carried by (Triggering unit) of type )
 

HellCraft

Member
Reaction score
19
This is what I would do:

First an initialization trigger which initializes all the pokemon, their respective evolutions etc.
Trigger:
  • Pokemon Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Setting Pokemon --------
      • Set Pokemon[1] = Bulbasaur //Pokemon is a unit-type array
      • Set Pokemon[2] = Ivysaur
      • Set Pokemon[3] = Venosaur
      • Set Pokemon[4] = Onix
      • Set Pokemon[5] = Sleelix
      • -------- Setting Pokemon Evolutions --------
      • Set PokemonEvolution[1] = Ivysaur //PokemonEvolution is a unit-type array
      • Set PokemonEvolution[2] = Venosaur
      • Set PokemonEvolution[3] = Venosaur //Set it to the same unit since even if the evolution trigger happens for this unit, nothing will happen since the replaced unit is the same as the original one
      • Set PokemonEvolution[4] = Sleelix
      • Set PokemonEvolution[5] = Sleelix
      • -------- Setting the level required for evolution --------
      • Set PokemonEvolveLevel[1] = 5 //PokemonEvolveLevel is an integer array
      • Set PokemonEvolveLevel[2] = 10 //for second grade evolution
      • Set PokemonEvolveLevel[3] = 1000 //basically, set it to a level not reachable so that the pokemon never evolves
      • Set PokemonEvolveLevel[4] = 8
      • Set PokemonEvolveLevel[5] = 1000
      • -------- Max number of pokemon --------
      • Set MaxPokemon = 5 //MaxPokemon is an integer


For the evolution trigger:
Trigger:
  • Evolution
    • Events
      • Unit - A unit Gains a level
    • Conditions
    • Actions
      • For each (Integer A) from 1 to MaxPokemon, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Triggering unit)) Equal to Pokemon[(Integer A)]
              • (Level of (Triggering unit)) Equal to PokemonEvolveLevel[(Integer A)]
            • Then - Actions
              • Set tmploc = (Position of (Triggering unit)) //tmploc is a point
              • Set tmpint = (Level of (Triggering unit)) //tmpint is an integer
              • Unit - Remove (Triggering unit) from the game
              • Unit - Create 1 PokemonEvolution[(Integer A)] for (Owner of (Triggering unit)) at tmploc facing Default building facing degrees
              • Hero - Set (Last created unit) Hero-level to tmpint, Hide level-up graphics
              • Custom script: call RemoveLocation(udg_tmploc)
            • Else - Actions

If you are making items for the pokemon, you need to make an item array variable that stores the items in every item slot and later give those items to last created unit.

And for the catching:
Trigger:
  • Catch Pokemon
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Catch Pokemon
    • Actions
      • For each (Integer A) from 1 to MaxPokemon, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Target unit of ability being cast)) Equal to Pokemon[(Integer A)]
            • Then - Actions
              • Unit - Rescue (Target unit of ability being cast) for (Owner of (Casting unit)) and Change color
              • Unit - Move (Target unit of ability being cast) instantly to (Center of <rect name>)
              • Game - Display to (All players) the text: ((Name of (Owner of (Casting unit))) + ( has captured a + (Name of (Target unit of ability being cast))))
            • Else - Actions


EDIT: Forgot that you need to summon the pokemon too.
For that you could do something similar to this:
Set the captured pokemon in a array variable when it's captured. Set the item(the pokeball) that is needed for summoning the in another variable. For this you also need an integer variable.
Since I closed the world editor, and I am too lazy to open it again, ill just type the extra actions freehand.
Trigger:
  • Catch Pokemon
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Catch Pokemon
    • Actions
      • For each (Integer A) from 1 to MaxPokemon, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Unit-type of (Target unit of ability being cast)) Equal to Pokemon[(Integer A)]
            • Then - Actions
              • Set PokemonNumber = PokemonNumber + 1 //This is an integer
              • Set PokemonCaptured[PokemonNumber] = (Target unit of ability being cast) //This is a unit array
              • Create an item of type (Pokeball) and give it to (Casting Unit)
              • Set Pokeball[PokemonNumber] = (Last Created Item) //This is an item array
              • Unit - Rescue (Target unit of ability being cast) for (Owner of (Casting unit)) and Change color
              • Set tmploc = (Center of region <rect name>)
              • Unit - Move (Target unit of ability being cast) instantly to tmploc
              • Game - Display to (All players) the text: ((Name of (Owner of (Casting unit))) + ( has captured a + (Name of (Target unit of ability being cast))))
              • Custom Script: call RemoveLocation(udg_tmploc)
            • Else - Actions


And for the call pokemon trigger:
Trigger:
  • Call Pokemon
    • Events
      • Unit - A unit uses an item
    • Conditions
      • (Item being manipulated) Equal to Pokeball
    • Actions
      • For each (Integer A) from 1 to PokemonNumber, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Item being manipulated) Equal to Pokeball[(Integer A)]
              • AlreadyCalled[(Integer A)] = false
            • Then - Actions
              • Set tmploc = (Position of (Triggering unit))
              • Unit - Move PokemonCaptured[(Integer A)] instantly to tmploc
              • Set AlreadyCalled[(Integer A)] = true
              • Custom Script: call RemoveLocation(udg_tmploc)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • AlreadyCalled[(Integer A)] = true
                • Then - Actions
                  • Set tmploc = (Center of <rect name>)
                  • Unit - Move PokemonCaptured[(Integer A)] to tmploc
                  • Custom Script: call RemoveLocation(udg_tmploc)
                • Else - Actions
 

mylemonblue

You can change this now in User CP.
Reaction score
7
Oh my... I tried this myself before, but never did I think it would be anything like this!
So technically this helped two users at once! :)

(Needless to say, mine didn't work at all :eek: )
 

darkmik07

New Member
Reaction score
2
Oh my... I tried this myself before, but never did I think it would be anything like this!
So technically this helped two users at once! :)

(Needless to say, mine didn't work at all :eek: )

its ok, atleast you tried. Thanks.

-----------------------------

TO: HellCraft

Thanks. ima try that trigger later.


EDIT: please tell me what variables, items, units and etc i need to create
 

darkmik07

New Member
Reaction score
2
but how do i create the trigger that the targeted unit by catch pokemon needs to be low life. 10% of his life.

EDIT: i tried the last trigger the "Call Pokemon". I cant make it work because the condition "(Item being manipulated) Equal to Pokeball" is Pokeball a variable or an item? cause i cant browse the item i can only browse the variable. Also in the "AlreadyCalled" Variable. what type of variable is that?
 

mylemonblue

You can change this now in User CP.
Reaction score
7
IT should be an item. If it's a variable, it would have to be an Item-Type variable.
AlreadyCalled, from first glance, sounds like an Integer variable.

(0 = false, 1 = true)
 

HellCraft

Member
Reaction score
19
It's the pokeball item which you will be using that the player needs to click to call the pokemon.
AlreadyCalled is a array boolean type variable.
 

darkmik07

New Member
Reaction score
2
still i cant make "(Item being manipulated) Equal to Pokeball" work. cause only variables shows up when i tried making that trigger. No items were shown
 

darkmik07

New Member
Reaction score
2
look at this picture:

only three options are available in the item-type

Untitled-20.png
 

HeX.16

Isn't Trollin You Right Now
Reaction score
131
Its by the 1st part the "Item Type of(Last Created Item)"
Change "last created item" to "item being manipulated"

With such long triggers rather make a test map ffs. Some people.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top