• 🏆 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!

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

Status
Not open for further replies.
Level 19
Joined
Oct 12, 2007
Messages
1,821
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.
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
first one requires sharing full control...
second one was already done for you by blizzard. Check the 1.22 changelog.

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?
 
Level 14
Joined
Nov 18, 2007
Messages
816
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.
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
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.

@ 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.
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
okay, you could also remove sharing full control while youre viewing another players hero.

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
 
Level 6
Joined
Mar 20, 2008
Messages
208
screw it, you are not able to do this without sacrifices. You can add and remove Full shared control whenever you want to.

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.
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
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.


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.
 
Level 12
Joined
Mar 16, 2006
Messages
992
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.
 
Level 6
Joined
Mar 20, 2008
Messages
208
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.

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
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
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.

Well how would you do the first thing then?:p Because I need some hints.
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
#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.
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
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.


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?
 
Level 21
Joined
Aug 21, 2005
Messages
3,699
Hmm, that's a better solution...

But to give an answer anyway:

  • Events
    • Unit - a unit is issued an order targeting an object
  • Conditions
    • Targeted unit equal to (your dummy)
  • Actions
    • Unit - issue (issued order) on (the actual unit)
You can use arrays to map dummy units on actual units.
 
Level 19
Joined
Oct 12, 2007
Messages
1,821
Hmm, that's a better solution...

But to give an answer anyway:

  • Events
    • Unit - a unit is issued an order targeting an object
  • Conditions
    • Targeted unit equal to (your dummy)
  • Actions
    • Unit - issue (issued order) on (the actual unit)
You can use arrays to map dummy units on actual units.

I made this:

  • sdsd
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Target unit of issued order) Equal to Mountain King 0001 <gen>
    • Actions
      • Set z_order = (Issued order)
      • Unit - Order (Triggering unit) to z_order Archmage 0002 <gen>
But the action is a WEU action, isn't it bad to use those actions?
 
Status
Not open for further replies.
Top