Hi, I am making a Pokemon map and want to incorporate catching, summoning, and unsummoning and so am trying to create triggers so that multiple players can do these things. So far it has been rather difficult and so I would appreciate any and all help.
I have made this trigger which I think is succesful in catching a pokemon and storing its values in a hashtable, but I am unsure of how to recall the values to later summon the pokemon and store it in a pokeball as well(to be summoned and unsummoned over and over again just like a pokeball). This would need to be able to be done by multiple players and for multiple pokemon and pokeball storage, so you see where it may get difficult...
Here is the trigger so far
I have made this trigger which I think is succesful in catching a pokemon and storing its values in a hashtable, but I am unsure of how to recall the values to later summon the pokemon and store it in a pokeball as well(to be summoned and unsummoned over and over again just like a pokeball). This would need to be able to be done by multiple players and for multiple pokemon and pokeball storage, so you see where it may get difficult...
Here is the trigger so far
-
pokeball test with player unit groups
-
Events
-
Unit - A unit Starts the effect of an ability
-
-
Conditions
-
(Ability being cast) Equal to Catch for Pokeball (Item)
-
(Percentage life of (Target unit of ability being cast)) Less than or equal to 25.00
-
(Unit-type of (Target unit of ability being cast)) Equal to Charmander
-
-
Actions
-
Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Triggering unit)) and Retain color
-
Set pokecustomvalue = (pokecustomvalue + 1)
-
Unit - Set the custom value of (Target unit of ability being cast) to pokecustomvalue
-
Hashtable - Save Handle Of(Target unit of ability being cast) as pokecustomvalue of (Player number of (Owner of (Triggering unit))) in CaughtPokemon
-
Set pokemonunit = (Load pokecustomvalue of (Player number of (Owner of (Triggering unit))) in CaughtPokemon)
-
Unit - Move (Target unit of ability being cast) instantly to (Center of caught region <gen>)
-
Hero - Create Pokeball - Charmander and give it to (Triggering unit)
-
Set pokeballcustomvalue = (pokeballcustomvalue + 1)
-
Hashtable - Save Handle Of(Last created item) as pokeballcustomvalue of (Player number of (Owner of (Triggering unit))) in CaughtPokeball
-
Set pokeballcaught = (Load pokeballcustomvalue of (Player number of (Owner of (Triggering unit))) in CaughtPokeball)
-
-