HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

2 Weird Problems, please help.

05-05-2008, 08:57 PM#1
redscores
Okay, i made a map with a hero selection system based on clicking on the hero and pressing escape to choose the hero, the problem is if i play in multiplayer games there are random deselects (the heroes get sometimes simply deselected without a reason).

And if you select a hero with escape he cant move, but i didnt pause him or something, if it is needed i will post the map, but the map is quite unfinished at the moment.
05-05-2008, 09:22 PM#2
Feroc1ty
Don't post the map, but posting of the triggers or JASS is required for any help whatsoever.
05-05-2008, 09:24 PM#3
redscores
Which triggers, there is alot of triggers, I dunno what you want. Tell me and I will post the trigger.

And i got a german WE so it would be partial german.
05-05-2008, 09:41 PM#4
Feroc1ty
well are there any triggers that cause people to select or deselect units? If so post those. And I have no clue why a hero wouldn't be able to move.
05-05-2008, 09:41 PM#5
redscores
No, no deselecting triggers.
05-05-2008, 09:44 PM#6
Feroc1ty
What about selecting?
05-05-2008, 09:47 PM#7
redscores
No, thats the problem. No possible source.
05-05-2008, 09:49 PM#8
Feroc1ty
Well just post the hero selection system.
05-05-2008, 09:55 PM#9
redscores
Trigger:
Hero Selection 1
Collapse Events
Player - Player 1 (Red) Selects a unit
Collapse Conditions
((Triggering unit) is in hero_HeroGroup) Gleich True
Collapse Actions
Trigger - Turn off (This trigger)
Set hero_hero[1] = (Triggering unit)
Unit Group - Remove hero_hero[1] from hero_HeroGroup
Unit - Make hero_hero[1] face (Center of Facer 1 <gen>) over 0.00 seconds
Game - Display to (All players matching ((Matching player) Equal Player 1 (Red))) for 10.00 seconds the text: hero_description[(Custom value of hero_hero[1])]
Wait until ((hero_hero[1] is in (Units currently selected by Player 1 (Red))) Gleich False), checking every 0.10 seconds
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse 'IF'-Condition
(Owner of hero_hero[1]) Equal Neutral passive
Collapse 'THEN'-Aktionen
Unit Group - Add hero_hero[1] to hero_HeroGroup
Trigger - Turn on (This trigger)
'ELSE'-Actions
Set hero_hero[1] = No Unit



From those functions above are 10 there, for every player one (10 player)


Trigger:
Hero Full Select
Events
Conditions
Collapse Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse 'IF'-Conditions
hero_hero[(Player number of (Triggering player))] not Equal null
(Owner of hero_hero[(Player number of (Triggering player))]) Gleich Neutral passiv
Collapse 'THEN'-Actions
Set hero_counter = (hero_counter + 1)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse 'IF'-Conditions
hero_counter greater as (Number of players in (All players matching ((((Matching player) slot status) Equal playing) and (((Matching player) controller) Equal User))))
Collapse 'THEN'-Actions
Trigger - Turn off Cam Set <gen>
'ELSE'-Actions
Unit - Change ownership of hero_hero[(Player number of (Triggering player))] to (Triggering player) and keep Color
Set hero_players[(Player number of (Triggering player))] = hero_hero[(Player number of (Triggering player))]
Visibility - Destroy hero_sightfactors[(Player number of (Triggering player))]
Camera - Reset camera for (Triggering player) to standard game-view over 0.00 seconds
Multiboard - Set the icon for mb_multiboard item in column 1, row ((Player number of (Triggering player)) + 1) to hero_icon[(Custom value of hero_players[(Player number of (Triggering player))])]
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse 'IF'-Conditions
(hero_hero[(Player number of (Triggering player))] is in (Units in Hero Selection KilJaeden <gen>)) Equal True
Collapse 'THEN'-Actions
Player - For (Triggering player), turn Shared Sight On toward Player 12 (Brown)
Player - For Player 12 (Brown), turn Shared Sight On toward (Triggering player)
Unit - Move hero_hero[(Player number of (Triggering player))] instantly to (Center of Ghoststart <gen>)
Camera - Pan camera for (Triggering player) to (Center of Ghoststart <gen>) over 0.00 seconds
Collapse 'ELSE'-Actions
Player - For (Triggering player), turn Shared Sight On toward Player 11 (Dark Green)
Player - For Player 11 (Dark Green), turn Shared Sight On toward (Triggering player)
Unit - Move hero_hero[(Player number of (Triggering player))] instantly to (Center of BLstart <gen>)
Camera - Pan camera for (Triggering player) to (Center of BLstart <gen>) over 0.00 seconds
Game - Display to (All players matching ((Matching player) Equal (Triggering player))) the text: (|CFF82CA9CYou selected|R |CFF00A651 + ((Proper name of hero_hero[(Player number of (Triggering player))]) + ( the + (Name of hero_hero[(Player number of (Triggering player))]))))
Set hero_hero[(Player number of (Triggering player))] = Null
'ELSE'-Actions

Thats the absolute pick, if you select a unit with the pick function i use this function to select the hero.

Well, the Events of this functions are added through a loop (for every player a press escape event)
05-05-2008, 10:09 PM#10
Feroc1ty
can you please edit it and use trigger tags? its really hard to read
05-06-2008, 10:57 AM#11
redscores
Changed to trigger tags.
05-07-2008, 02:41 AM#12
Hydrolisk
You can't just detect when a player presses ESC while selecting a pickable Hero?
05-07-2008, 08:01 PM#13
redscores
thats shit :(
05-10-2008, 04:35 PM#14
Neversleeping
I use a similar system on my map when selecting hero.

When you click on the hero, the camera goes down infront of him, he does an animation and some text appears. If you click again you select the hero, but if you press esc you return the camera to see all heroes again "main menu".

Would my hero selection system help you out?