1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  5. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  6. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  7. The results are out! Check them out.
    Dismiss Notice
  8. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  9. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  10. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

PetSystem v0.2 [GUI] Multiplayer

Submitted by Mainy
This bundle is marked as substandard. It may contain bugs, not perform optimally or otherwise be in violation of the submission rules.
Pet System v0.2 [Mult-Player][GUI]
by Mainy


-- General Information --
Adopte an pet.

Code

  • Adopt
  • Unit - A unit Acquires an item
  • (item-type of (item being manipulated)) Equal to Grizzle
  • Set PETOwner = (Triggering unit)
  • Set PETOwnerLoc = (Position of PETOwner)
  • Item - Remove (Item being manipulated)
  • Trigger - Turn on PetSurge <gen>
  • Trigger - Run PetSurge <gen> (checking conditions)
  • Custom script: call RemoveLocation (udg_PETOwnerLoc)


  • PetSurge
  • Unit - Remove PETDummy[(Player number of (Owner of PETOwner))] from the game
  • Game - Display to (All players controlled by a ((Owner of PETOwner) controller) player) the text: You have adopted a Grizzle.
  • Unit - Create 1 Grizzle for (Owner of PETOwner) at PETOwnerLoc Facing Default building facing degrees
  • Set PETDummy[(Player number of (Owner of PETOwner))] = (Last created unit)
  • Unit - Order PETDummy[(Player number of (Owner of PETOwner))] to Right-Click PETOwner
  • Unit Group - Pick every unit in (Units within 200.00 of PETOwnerLoc matching (((PETDummy[(Player number of (Owner of PETOwner))] is alive) Equal to True) and (((Owner of PETDummy[(Player number of (Owner of PETOwner))]) Equal to (Owner of PETOwner)) and ((Picked unit) Not equal to PETOwner) and do (Actions)
    • Loop - Actions
      • Set PETGroup = (Last created unit group)
  • Custom script: call DestroyGroup (udg_PETGroup)


  • PetDie
  • Unit - A unit Dies
  • (Dying unit) Equal to PETOwner
  • Unit - Kill PETDummy[(Player number of (Owner of PETOwner))]
  • Game - Display to (All players controlled by a ((Owner of PETOwner) controller) player) the text: Your Grizzle is dead.



It uses the Game - Value Of Real Variable event as its method of activating other triggers, and passes the event responses through a few globals.

-- How To Implement --
Be sure "Automatically create unknown variables while pasting trigger data" is enabled in the World Editor general preferences.
Copy the trigger category from the demo map and paste it into your map. (Alternately: create the variables listed below.) Copy ability, item.


Keywords:
Pet, System, Servant, Adopt, Master, Beast, Lord, Friend, Follower.
Contents

Pet System [GUI] (Map)

Reviews
Moderator
14:44, 16th Jun 2010 Hanky: Your system got some leaks and it's just to simple to be a real system. Add more stuff to your system otherwise I can't approve it.
  1. 14:44, 16th Jun 2010
    Hanky:
    Your system got some leaks and it's just to simple to be a real system. Add more stuff to your system otherwise I can't approve it.
     
  2. Mainy

    Mainy

    Joined:
    Oct 19, 2008
    Messages:
    269
    Resources:
    3
    Models:
    1
    Icons:
    1
    Spells:
    1
    Resources:
    3
    =D newest
     
  3. Axarion

    Axarion

    Joined:
    Sep 30, 2009
    Messages:
    675
    Resources:
    1
    Spells:
    1
    Resources:
    1
    Don't post only =D newest^^

    @topic
    maybe add the trigger and describe what it does.
     
  4. Shdow89

    Shdow89

    Joined:
    Jun 18, 2007
    Messages:
    215
    Resources:
    4
    Spells:
    4
    Resources:
    4
    Ok, this is one very bad system, badly scripted (if you can call that a script), leaks a lot, and pets can not be 'adopted', but purchased. No commands for the pets, you can't control it in any way, you can't revive it or heal it.

    Leaks:

    • Set PETOwnerLoc = (Position of PETOwner)
    not removed:
    • call RemoveLocation(udg_PETOwnerLoc)


    • Unit - Create 1 Grizzle for (Owner of PETOwner) at PETOwnerLoc facing Default building facing degrees
    - leaks a location. Again.

    • Unit Group - Pick every unit in (Units within 200.00 of PETOwnerLoc matching (((PETDummy[(Player number of (Owner of PETOwner))] is alive) Equal to True) and (((Owner of PETDummy[(Player number of (Owner of PETOwner))]) Equal to (Owner of PETOwner)) and ((Picked unit) Not equal to PETOwner) and do (Actions)
      • Loop - Actions
        • Set PETGroup = (Last created unit group)
    - leaks a group and a location.


    This system has no advance usage at all, it most certainly is not easy to use, and it is highly primitive.

    My suggestion:

    - Develop an AI for the pet, get rid of the Locust ability. Add some documentation, more features (right now, I'm not even sure you have a feature). Remove leaks and improve your scripting a lot.

    My rating for this 'system' would be 1/5. I'm sorry, but this is very bad and primitive.
     
  5. Mainy

    Mainy

    Joined:
    Oct 19, 2008
    Messages:
    269
    Resources:
    3
    Models:
    1
    Icons:
    1
    Spells:
    1
    Resources:
    3
    First read before complaining, put the information from the description
     
  6. Mainy

    Mainy

    Joined:
    Oct 19, 2008
    Messages:
    269
    Resources:
    3
    Models:
    1
    Icons:
    1
    Spells:
    1
    Resources:
    3
    I will make improvements, it is only a test version to see what's necessary to improve
     
  7. pippo

    pippo

    Joined:
    Mar 6, 2008
    Messages:
    476
    Resources:
    4
    Icons:
    1
    Skins:
    1
    Spells:
    2
    Resources:
    4
    Well...
    I don't like the locust ability for such thing...
    Make the grizzle uncontrollable but selectionable...
    Make it MUI and MPI man...

    First of all fix this, the idea is great anyway...

    EDIT: I think you can use hastables (unit key ID) (to make it mui and mpi), then make that when the owner of the pet attacks, the pet attacks too... and then make that the pet follow the owner...
     
  8. jim7777

    jim7777

    Joined:
    May 27, 2009
    Messages:
    481
    Resources:
    7
    Maps:
    2
    Spells:
    5
    Resources:
    7
    I also want to use this system for my map..... Could you please post the changelogs of this system so I can know which things are changed so we can not ask for another which you have already fixed.

    Btw. I like pippo's recommendation about how the pet is controlled or move. Like how the pet attacks.....

    Hope you improve this more....

    2/5
     
  9. Shendoo2

    Shendoo2

    Joined:
    Aug 1, 2008
    Messages:
    464
    Resources:
    0
    Resources:
    0
    Yea This system is not "Mult-Player" like you state because of you don't use arrays for Pet Owner when your setting the pet so if another player was to buy a pet yours wouldn't work.
     
  10. supertoinkz

    supertoinkz

    Joined:
    Dec 29, 2008
    Messages:
    2,813
    Resources:
    25
    Models:
    15
    Icons:
    7
    Maps:
    1
    Tutorials:
    2
    Resources:
    25
    your.....
    CRUSHER FROM THEHELPER?

    Hai :D
    I waz gwafu
     
  11. Mainy

    Mainy

    Joined:
    Oct 19, 2008
    Messages:
    269
    Resources:
    3
    Models:
    1
    Icons:
    1
    Spells:
    1
    Resources:
    3
    PETDummy[(Player number of (Owner of PETOwner))]
    p1 = PETDummy [1]
    p2 = PETDummy [2]
    ...
    allright multplayer
     
  12. manstie

    manstie

    Joined:
    Mar 10, 2008
    Messages:
    847
    Resources:
    1
    Maps:
    1
    Resources:
    1
    I made my own pet system for my RPG that allows you to controll the pet, but whenever it goes more than 200 range from the owner its ordered to move back to the owner, and over 400, it is teleported to the owner.
    Wouldn't that just be better?

    Plus it's MPI (I didn't make it MUI because its supposed to be 1 hero only)

    The purchasing mechanism can be greatly simplified.
    Try something like mine:
    • BuyPet
      • Events
        • Unit - A unit Sells a unit
      • Conditions
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • Or - Any (Conditions) are true
              • Conditions
                • (Unit-type of (Sold unit)) Equal to Pet (Cat)
                • (Unit-type of (Sold unit)) Equal to Pet (Dog)
            • PlayerBag[(Player number of (Owner of (Buying unit)))] Equal to No unit
          • Then - Actions
            • Set PlayerBag[(Player number of (Owner of (Buying unit)))] = (Sold unit)
            • Unit Group - Add (Sold unit) to CameraGroup
          • Else - Actions
            • Unit - Remove (Sold unit) from the game
            • Custom script: call DisplayTextToPlayer((GetOwningPlayer(GetSoldUnit())), 0, 0, "You already have a pet!")
            • Player - Add 100 to (Triggering player) Current gold
     
  13. DarthDeath

    DarthDeath

    Joined:
    Dec 9, 2009
    Messages:
    12
    Resources:
    0
    Resources:
    0
    Can you mount him to his pet?
     
  14. xorkatoss

    xorkatoss

    Joined:
    Jul 12, 2010
    Messages:
    1,527
    Resources:
    7
    Models:
    5
    Maps:
    1
    Spells:
    1
    Resources:
    7
    the system is very good and could proove useful !! 4/5 :thumbs_up:
    i gave 4/5 because i found a leak
    the below action leaks

    • Unit - Create 1 Grizzle for (Owner of PETOwner) at PETOwnerLoc Facing Default building facing degrees


    so you should create another custom script like the one below to clean it

    • Custom script : call RemoveLocation(udg_PETOwnerLoc)


    im not an expert GUIer but i couldn't miss that lol
    if i find any other leaks i will inform you asap ;p