1. 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
  2. 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 haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Rubbed the right way, the genie is out of its lamp! The 12th Concept Art Contest Results have been announced.
    Dismiss Notice
  4. Race against the odds and Reforge, Don't Refund. The 14th Techtree Contest has begun!
    Dismiss Notice
  5. 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.

[JASS] Map idea's. Is this possible?

Discussion in 'Triggers & Scripts' started by Sephalo, Feb 21, 2009.

  1. Sephalo

    Sephalo

    Joined:
    Oct 12, 2007
    Messages:
    1,791
    Resources:
    0
    Resources:
    0
    Hey there.

    I had some idea's for my map. I thought about it for a long time already, but I don't think it's possible to create my idea's.
    Are there people here that can tell me if it is or not? And if it's possible.. How?!

    #1 Party System (in the RPG, every player has 1 hero)

    You can see the hp/mana info about allied players under your own hero's hp/mana bar in the upper left corner. Like they are your own heroes.

    I could create a dummy hero for each hero your allies have, but when you cast a spell and target the icon of the hero then. It wont cast the spell on the hero, but on the dummy, which ofc will give the error: "out of range".
    I could change the player allied settings, that the players have advanced share units and remove this everytime you select your allied hero. But whenever I remove it, it will also remove the hp/mana bar from your interface. So now I'm kinda stuck.

    #2 Hit Point bars.

    Is it possible to lock a button whenever a player presses it. I mean. When a player holds ALT, it will show hp bars of all nearby units. But when he releases alt, the effect stops. Is it possible to lock this event when you press Alt, and when you press alt again it stops it? Like "V" in WoW.
     
  2. monoflauta

    monoflauta

    Joined:
    Feb 17, 2009
    Messages:
    27
    Resources:
    0
    Resources:
    0
    i am sure that the first one you can, the second, i dont know -.-
     
  3. Deaod

    Deaod

    Joined:
    Nov 18, 2007
    Messages:
    805
    Resources:
    12
    Maps:
    1
    Spells:
    11
    Resources:
    12
    first one requires sharing full control...
    second one was already done for you by blizzard. Check the 1.22 changelog.
     
  4. Sephalo

    Sephalo

    Joined:
    Oct 12, 2007
    Messages:
    1,791
    Resources:
    0
    Resources:
    0
    For the 1st one.

    Well I can add full shared control, but how can I make players unable to use eachothers hero then?

    For the 2nd one.

    Can I activate this for a player with a trigger?
     
  5. Deaod

    Deaod

    Joined:
    Nov 18, 2007
    Messages:
    805
    Resources:
    12
    Maps:
    1
    Spells:
    11
    Resources:
    12
    1.) Some pseudocode:
    Event: a player selects a unit
    Condition: owner of selected unit is ally of selecting player, and owner of selected user != selecting player.
    Actions: unselect selected unit for selecting player, reselect selecting players hero.

    2.) I dont think so. You could code your own bars, of course, but those look shitty compared to blizzard ones, and you might interfere with blizzards.
     
  6. Sephalo

    Sephalo

    Joined:
    Oct 12, 2007
    Messages:
    1,791
    Resources:
    0
    Resources:
    0
    @ 1.
    I know this, but I want players to still be able to inspect eachothers gear and stuff. So this isn't an option.

    @ 2.
    Yep I know. I can create floating text bars, but I don't want it. Also costs too much lag.
     
  7. Deaod

    Deaod

    Joined:
    Nov 18, 2007
    Messages:
    805
    Resources:
    12
    Maps:
    1
    Spells:
    11
    Resources:
    12
    okay, you could also remove sharing full control while youre viewing another players hero.
     
  8. Sephalo

    Sephalo

    Joined:
    Oct 12, 2007
    Messages:
    1,791
    Resources:
    0
    Resources:
    0
    I know that, but when I do that. The hp bar of the selected hero will go away. I mean the hp bar in my left corner.
    Hehe I know I'm good at asking hard things:p
     
  9. Deaod

    Deaod

    Joined:
    Nov 18, 2007
    Messages:
    805
    Resources:
    12
    Maps:
    1
    Spells:
    11
    Resources:
    12
    screw it, you are not able to do this without sacrifices. You can add and remove Full shared control whenever you want to.
     
  10. Super-Sheep

    Super-Sheep

    Joined:
    Oct 21, 2006
    Messages:
    2,823
    Resources:
    1
    Maps:
    1
    Resources:
    1
    You can do the HP thing with multiboard, but its JASS.
     
  11. Shyhalu

    Shyhalu

    Joined:
    Mar 20, 2008
    Messages:
    207
    Resources:
    0
    Resources:
    0
    He would be able to do it with the first method he suggested. Using an array and some on damage and etc triggers. Considering the unit amount, it shouldn't lag at all.

    Setup several arrays, one for each hero type.

    Make array 0 the actual hero controlled by the player and the rest of the slots corresponding the other heros on the other layer's screen

    And for the damage triggers, simply run a loop through the array, adjusting the values.

    I also suggest setting the dummy units tranparency to 0, as well as add some triggers to force the player to move to the right unit (when he clicks on the friendly unit icon)

    IE: f6 twice will take you to the dummy hero, need to force it to relocate to the correct hero
    I'm not to sure on the details of how it would work out or even be done.
     
  12. Sephalo

    Sephalo

    Joined:
    Oct 12, 2007
    Messages:
    1,791
    Resources:
    0
    Resources:
    0

    Yeah.

    I could make dummy units. However I dunno if this would be possible but if so, I could make a trigger that everytime my hero get's an order that involves a dmmy unit, it does the same command but then against the right unit. Per example when I try to cast holy light on the 2nd unit, it just casts holy light on the right person instead of the dummy.
     
  13. Vegavak

    Vegavak

    Joined:
    Mar 16, 2006
    Messages:
    1,010
    Resources:
    0
    Resources:
    0
    Both are possible.

    The first is much simpler than the second, but requires a lot of work. The second can be done with a 4-6 custom models and JASS. At least, that's how I'm doing it.
     
  14. Shyhalu

    Shyhalu

    Joined:
    Mar 20, 2008
    Messages:
    207
    Resources:
    0
    Resources:
    0
    check if the spell target is the dummy, then redirect

    Put the dummies far away so the caster wont hit them and gives ou time to run the trigger

    chop off the dummys Line of sight while your at it to not screw up the minimap
     
  15. Sephalo

    Sephalo

    Joined:
    Oct 12, 2007
    Messages:
    1,791
    Resources:
    0
    Resources:
    0
    Well how would you do the first thing then?:p Because I need some hints.
     
  16. Eleandor

    Eleandor

    Joined:
    Aug 21, 2005
    Messages:
    3,681
    Resources:
    2
    Models:
    1
    Tutorials:
    1
    Resources:
    2
    #1: for each player in the party, create units of the type of all other partymembers. Make those units invulnerable and place them at an unreachable place. You will now have icons of your own hero as well as all heroes in your party.

    Make another trigger that every 0,2 seconds, the HP and Mana of your 'dummy' heroes are set equal to the HP and mana of the actual heroes controlled by your party members. Don't forget to set max HP and mana too (with a jass system, I know someone has made one) so they remain the same at all time.

    Make a 3rd trigger that whenever you select the icon of a 'dummy' hero, you auto-select the correct hero owned by another player.

    Make a 4th trigger that whenever your hero issues an order on one of the 'dummy' units, you stop doing that order and instead re-issue that order on the correct hero. For instance: if I use "Holy Light" on the 2nd icon at the top left of my screen, I'm issuing the "holylight" order at the dummy unit. With this trigger, you'll automatically cast holy light on the actual hero you wanted to cast it on.

    With a 5th trigger you could also create permanent floating texts near the icons displaying the player name of that hero.

    #2: not possible. With RTC you probably can jass this, but it won't work on battle.net or "normal" LAN.
     
  17. Sephalo

    Sephalo

    Joined:
    Oct 12, 2007
    Messages:
    1,791
    Resources:
    0
    Resources:
    0

    I understood all other triggers and know how to make them, but I don't know how I should do this. I don't know much about order triggers, so could you make this trigger for me if it isn't much work?
     
  18. Saishy

    Saishy

    Joined:
    Mar 23, 2008
    Messages:
    947
    Resources:
    0
    Resources:
    0
    Instead of using both actual and max hp/mana, use % instead...
    Less work, same effect. (Give the units 10000 hp and mana)
     
  19. Lord_BoNes

    Lord_BoNes

    Joined:
    Sep 5, 2007
    Messages:
    264
    Resources:
    0
    Resources:
    0
    This sounds like what you're after. I posted it a couple of weeks back. :thumbs_up:
     
  20. Sephalo

    Sephalo

    Joined:
    Oct 12, 2007
    Messages:
    1,791
    Resources:
    0
    Resources:
    0
    Ah yeah this is very nice. When I have the time I go work on it, but currently I'm pretty busy.