• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Tame Pet v1.0

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This spell was created for my future map being released. It was created for a hero that has not yet been revealed, not even to some of the map creations team members.

This spell/system has a Consume Corpse, which is an easy object editor spell.
A Release Pet spell, Which allows you to tame a new pet.
As well as a Tame Pet, which casts for 6 seconds, and if you die within said time, you won't gain the pet.

Upcoming version will have where the pet follows you.

ChangelogReason
December 22, 2011 2:18PM GMT-5Uploaded
December 22, 2011 3:21PM GMT-5Removed random if/then/else statement block.
December 22, 2011 8:58PM GMT-5Made MUI, Thanks to Magtheridon96 or so I thought....
January 1, 2012 7:26PM GMT-5Fixed the system thanks to InfinateAnswers



  • TP Change Control
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Tame Pet
    • Actions
      • -------- --------------------------------------------- --------
      • -------- Sets Variables --------
      • -------- --------------------------------------------- --------
      • Set CasterInt = (Player number of (Owner of (Triggering unit)))
      • Set TempUnit[CasterInt] = (Triggering unit)
      • Set TempUnit2[CasterInt] = (Target unit of ability being cast)
      • -------- --------------------------------------------- --------
      • -------- Check Whether it's a Player Unit, And if they have a Pet --------
      • -------- --------------------------------------------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • PetLimit[CasterInt] Equal to 1
        • Then - Actions
          • Unit - Order TempUnit[CasterInt] to Stop
          • Game - Display to (Player group((Player(CasterInt)))) for 10.00 seconds the text: You may not control...
        • Else - Actions
          • Set PetLimit[CasterInt] = 1
          • -------- --------------------------------------------- --------
          • -------- Changes Ownership --------
          • -------- --------------------------------------------- --------
          • Unit - Change ownership of TempUnit2[CasterInt] to (Player(CasterInt)) and Change color
          • -------- --------------------------------------------- --------
          • -------- Adds Consume Corpse Ability and Release Pet Ability --------
          • -------- --------------------------------------------- --------
          • Unit - Add Release Pet to TempUnit2[CasterInt]
          • Unit - Add Consume Corpse to TempUnit2[CasterInt]
          • -------- --------------------------------------------- --------
          • Game - Display to (Player group((Player(CasterInt)))) for 10.00 seconds the text: ((Name of TempUnit2[CasterInt]) + is now your pet.)
          • -------- --------------------------------------------- --------
          • -------- Moves Creep --------
          • -------- --------------------------------------------- --------
          • Set Temp_Point = (Position of TempUnit[CasterInt])
          • Unit - Move TempUnit2[CasterInt] instantly to Temp_Point
          • -------- --------------------------------------------- --------
          • Custom script: call RemoveLocation(udg_Temp_Point)
  • Release Pet
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Release Pet
      • PetLimit[CasterInt] Equal to 1
    • Actions
      • -------- --------------------------------------------- --------
      • -------- Removes Consume Corpse Ability and Release Pet Ability --------
      • -------- --------------------------------------------- --------
      • Unit - Remove Release Pet from (Triggering unit)
      • Unit - Remove Consume Corpse from (Triggering unit)
      • -------- --------------------------------------------- --------
      • -------- Changes ownership to neutral hostile --------
      • -------- --------------------------------------------- --------
      • Unit - Change ownership of (Triggering unit) to Neutral Hostile and Change color
      • -------- --------------------------------------------- --------
      • -------- Sets the unit count to zero --------
      • -------- --------------------------------------------- --------
      • Set PetLimit[CasterInt] = 0
      • -------- --------------------------------------------- --------
      • Set TempUnit2[CasterInt] = No unit
      • Game - Display to (Player group((Player(CasterInt)))) for 10.00 seconds the text: You have released y...
Contents

Tame Pet (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. Maker, Tame Pet v1.0, 3rd Jan Your display to player group actions leak player groups (forces) Add importing instructions into the map file Pet Dies trigger should not be on all the...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

Maker, Tame Pet v1.0, 3rd Jan

  • Your display to player group actions leak player groups (forces)
  • Add importing instructions into the map file
  • Pet Dies trigger should not be on all the time
  • Neutral hostile units can't be targeted with the spell
  • Abilities must support leveling up
 
Tips:
- Use (Triggering unit) instead of (Casting unit) cause (Triggering unit) is faster.

-
  • Game - Display to (Player group((Owner of (Casting unit)))) for 10.00 seconds the text: (Game_Time_String + ((Name of (Target unit of ability being cast)) + is now under your control.))
This leaks a Player group (Set that Player group in a variable and destroy it with
the function DestroyForce. Or, since you're only referring to one player, you can
use the global bj_FORCE_PLAYER which is a player group array that has one force
per player. You won't even need to destroy it :>

- (Triggering player) is faster than (Owner of (Triggering unit))

- Cache things so you don't have to repeat the functions over and over again
(Because caching is what makes the world go around)

Thus:
  • -------- --------------------------------------------- --------
  • -------- Sets Variables --------
  • -------- --------------------------------------------- --------
  • Set Beast_Type[(Player number of (Owner of (Casting unit)))] = (Unit-type of (Target unit of ability being cast))
  • Set Beast[(Player number of (Owner of (Casting unit)))] = (Target unit of ability being cast)
  • Set Unit_Count = 1
  • Unit - Change ownership of (Target unit of ability being cast) to (Owner of (Casting unit)) and Change color
  • -------- --------------------------------------------- --------
  • -------- Adds Consume Corpse Ability and Release Pet Ability --------
  • -------- --------------------------------------------- --------
  • Unit - Add Release Pet to (Target unit of ability being cast)
  • Unit - Add Consume Corpse to (Target unit of ability being cast)
  • -------- --------------------------------------------- --------
  • Game - Display to (Player group((Owner of (Casting unit)))) for 10.00 seconds the text: (Game_Time_String + ((Name of (Target unit of ability being cast)) + is now under your control.))
  • -------- --------------------------------------------- --------
  • Unit - Remove BT_Dummy_1[(Player number of (Owner of (Casting unit)))] from the game
  • Unit - Remove BT_Dummy_2[(Player number of (Owner of (Casting unit)))] from the game
->

  • Set TempUnit = (Triggering unit)
  • Set TempUnit2 = (Target unit of ability being cast)
  • Set TempPlayer = (Triggering player)
  • Set TempInt = (Player number of TempPlayer)
  • -------- --------------------------------------------- --------
  • -------- Sets Variables --------
  • -------- --------------------------------------------- --------
  • Set Beast_Type[TempInt] = (Unit-type of TempUnit2)
  • Set Beast[TempInt] = TempUnit2
  • Set Unit_Count = 1
  • Unit - Change ownership of TempUnit2 to TempPlayer and Change color
  • -------- --------------------------------------------- --------
  • -------- Adds Consume Corpse Ability and Release Pet Ability --------
  • -------- --------------------------------------------- --------
  • Unit - Add Release Pet to TempUnit2
  • Unit - Add Consume Corpse to TempUnit2
  • -------- --------------------------------------------- --------
  • Custom script: set udg_TempForce = bj_FORCE_PLAYER[udg_TempInt - 1]
  • Game - Display to TempForce for 10.00 seconds the text: (Game_Time_String + ((Name of TempUnit2) + is now under your control.))
  • -------- --------------------------------------------- --------
  • Unit - Remove BT_Dummy_1[TempInt] from the game
  • Unit - Remove BT_Dummy_2[TempInt] from the game
That should be way more efficient :3

edit

Same thing goes for the second trigger:

- (Casting unit) -> (Triggering unit)
- Fix the player group leaks
- Cache all those functions like (Triggering unit), (Player number of (Triggering unit)), etc..
- (Owner of (Casting unit)) -> (Triggering player)
 
Level 7
Joined
Sep 2, 2011
Messages
350
Hello there. I would like to rate this spell of yours. First of all, it is not that unique. It might be a good idea, to have chances in taming the beast. Because you can tame any unit. I could have used the "Charm" spell and increase its casting time to get the same effect. So, for what I see.. It is so simple.

Rating: 2/5
Not that unique
Lacks creativity
Lacks configurables
Easy and Simple spell
Not MUI and Leaks
 
Level 7
Joined
Sep 2, 2011
Messages
350
I have fixed the leaks and MUI, and in the upcoming updates, I am going to add more to it, such as chances of taming, the levels of monsters you can tame at specific levels, and the like.

Good to see that you are making an effort and giving it time to make the spell better. +Rep
 
Level 7
Joined
Sep 2, 2011
Messages
350
Wow, that would be very interesting and nice at the same time. I would love to see that because pet systems are quite rare. Good luck.
 
Top