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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top