Yea, I think I'll wait til I (or someone else) figures out some of the more advanced stuff like pausing. I mean I guess there might be an event that could trigger when an ability is first selected, then you could use the action pause all units, but I would imagine Blizzard probably uses something fancier than that. But I could be wrong.
I know how to do the targeting UI, but i can't find the pausing which is annoying. I'm wondering if they have it like the menu and make it so that it pauses the game.
edit: The only thing i can find that even seems like it pauses the game, is the set screen mode to fullscreen action.
PM_SoATargetingModeEnterOptions:ActionReturnType:(None)ParametersGrammarText:PM_SoATargetingModeEnter()HintText:(None)CustomScriptCodeLocalVariablesCount=0<Integer>ActionsTrigger-TurnPM_SoATargetingCancelOnTrigger-TurnPM_SoATargetingClearAllOnTrigger-TurnPM_SoATargetingForceOffOnGeneral-Waitfor(Conditions),checkingevery0.0625GameTimesecondsConditionsPM_SoATargetingTransitioning==FalseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(InCinematicMode)==TrueThenGeneral-SkipremainingactionsElseVariable-SetPM_SoAExitInstantly=FalseVariable-SetPM_SoAForceExit=FalseUI-Disablemousedragselectionfor(Allplayers)PU_TargetingSetCharges(PM_SoATargetingChargesTotal,PM_SoATargetingChargesTotal)General-If(Conditions)thendo(Actions)elsedo(Actions)IfPM_SoATargetingOrder!=NoOrderThenUI-SetTargetingOrderfor(Playergroup(1))andPU_GPCasterGrouptoPM_SoATargetingOrderandDoNotmakesticky.ElseVariable-SetPM_SoATargetingCycling=FalseVariable-SetPM_SoATargetingTransitioning=TruePU_TargetingShowHide(Show,False)PU_TargetingSetInstructionText((PC_PerkTargetingText(PM_SoATargetingAbilityInstance,1)))PM_SetFogAlphaOverTime(100.0,0.5)Camera-ApplycameraobjectDistance50.0forplayer1over1.0secondswithExistingVelocity%initialvelocityand10.0%decelerationCamera-ApplycameraobjectAngleOfAttack70.0forplayer1over1.0secondswithExistingVelocity%initialvelocityand10.0%deceleration-------SOATargetingModeCameraisthesameasdefaultcameraexceptitcan't zoom Camera - Set SOA Targeting Mode Camera as the active camera data for (All players) General - If (Conditions) then do (Actions) else do (Actions) If (PM_SoATargetingPauseEnabled()) == True Then Unit - Pause PM_SoACasterUnit General - Repeat (Actions) 16 times Actions General - If (Conditions) then do (Actions) else do (Actions) If PM_SoAForceExit == True Then General - Break Else Game - Set the global time scale to ((Global Time Scale) * 0.8178) General - Wait 0.0625 Game Time seconds Game - Set the global time scale to 0.04 General - If (Conditions) then do (Actions) else do (Actions) If PM_SoAForceExit == True Then ------- In case force off already ran, we might have snuck in an update to time scale so just reset it to 1. Game - Set the global time scale to 1.0 Trigger - Run PM_SoATargetingForceOff (Check Conditions, Don'tWaituntilitfinishes)General-SkipremainingactionsElseUnitGroup-Pickeachunitin(Anyunitsin(Entiremap)ownedbyplayerAnyPlayermatchingExcluded:Missile,Dead,Hidden,withatmostAnyAmount)anddo(Actions)ActionsActor-Sendactormessage"AnimSetPausedAll"tomainactorofunit(Pickedunit)Actor-Sendactormessage"Signal SOATargetingOn"tomainactorofunit(Pickedunit)Unit-PauseallunitsPC_TimeMissionTemporarySet(Pause)PC_TimeAITemporarySet(Pause)ElseVariable-SetPM_SoATargetingTransitioning=FalseVariable-ModifyPM_SoATargetingTimesUsed:+1Timer-StartPM_SoATargetingTimerasaOneShottimerthatwillexpireinInfiniteRealTimeseconds
It does just pause the unit. But it also pauses their actors as well.
I just found out that you can hook up enemy/neutral players to the command panel and give them orders, but it'll still act as if that player did them. So using an enemy scanner sweep would reveal it for the enemy. Could make for interesting gameplay mechanics.
Yes, it does disable it. However, unselectable and untargetable are ok (Still allow you to use the ability)
I've run into a new problem with command panel dialogs. It seems whenever I go into targeting mode (whether or not it's the same unit or an unrelated one), the command panel changes to look like the targeting mode of the command card (example, left click to target, right click to cancel). Looking into fixing it now...
Hmm. Could you post a copy of the map your doing this in. I just tried doing it with the test map (changed the warp gate to player 2) you posted earlier and it doesn't let me control the unit, just pops up with the generic "Enemy unit, you cannot control this unit" on the command card.
Oh you know what. I think in my init cheats trigger I had a share control action. My bad.
Edit: Still trying to get the dialog to only show the buttons though. I don't want that other info like right/left click info. I was able to make my custom ability not show it (instead it hides the buttons altogether). But when I select other units and use a target ability, it shows the right/left click for them... Even though they are units unrelated to the ability/unit group completely...
It seems one method is to just hide it whenever any targeting mode is entered using the event "Target Mode Updated", then show it when targeting mode is left. This would probably also be a good event to use for the targeting UI that you were talking about.
Though personally I would still like to have the button visible when the player is doing other stuff.
check out triggers, you can create a command card from dialog triggers and specify the unit and the command card for this dialog item. i tested it and it works. you can basically show unlimited amount of abilities to the player with this method.
i dont have LotV but i assume they do a custom command card in UI-editor for the DummySpear unit.
Could you explain more about the specifying a command card? I've tried the "set dialog item submenu" action. It asks for a string, and I'm not really sure what to put for it.
I'm still having trouble where the dialog will change when entering target mode with unrelated units. Maybe this action would help? I'd rather not have to hide the whole thing whenever an unrelated unit is targeting an ability.
string is 0002 ... 000X. yeah target mode is a bit stupid but i havent tried anything yet. if i were you i would checkout the lotv template and see if there is anything you can use.
Like funky says 000x is the most common, as long as you don't do spacial command card menu names it should work fine. The targeting thing is likely a byproduct of how the normal command card works.
Based on what others said, I think I figured it out. It's pretty easy once I put that stuff together. Here's a test map. I'll make a short video tutorial on it later. Though I haven't looked into advanced stuff like pausing the map such as the spear of adun bombardment abilities do. This is just hooking a super warp gate into a dialog box.
is it possible to catch like 1 button from command card #0005? i dont need to show whole command card for unit, just few buttons on panel like spear of adun.
I want to make an addition command cart that have 4 buttons and linking abilities from units command card #0005
Yea, I think I'll wait til I (or someone else) figures out some of the more advanced stuff like pausing. I mean I guess there might be an event that could trigger when an ability is first selected, then you could use the action pause all units, but I would imagine Blizzard probably uses something fancier than that. But I could be wrong.
@MaskedImposter: Go
I know how to do the targeting UI, but i can't find the pausing which is annoying. I'm wondering if they have it like the menu and make it so that it pauses the game.
edit: The only thing i can find that even seems like it pauses the game, is the set screen mode to fullscreen action.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Maybe it doesn't pause the game but all units?
@OutsiderXE: Go
I've finally found the trigger
It does just pause the unit. But it also pauses their actors as well.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
Huh interesting. Also pauses mission time and AI time from the looks of it.
I just found out that you can hook up enemy/neutral players to the command panel and give them orders, but it'll still act as if that player did them. So using an enemy scanner sweep would reveal it for the enemy. Could make for interesting gameplay mechanics.
Hmm interesting, A hacker unit maybe :D Would definitely be interesting to see.
Edit: Does making that unit uncontrollable disable the created command card?
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@willuwontu: Go
Yes, it does disable it. However, unselectable and untargetable are ok (Still allow you to use the ability)
I've run into a new problem with command panel dialogs. It seems whenever I go into targeting mode (whether or not it's the same unit or an unrelated one), the command panel changes to look like the targeting mode of the command card (example, left click to target, right click to cancel). Looking into fixing it now...
@MaskedImposter: Go
Hmm. Could you post a copy of the map your doing this in. I just tried doing it with the test map (changed the warp gate to player 2) you posted earlier and it doesn't let me control the unit, just pops up with the generic "Enemy unit, you cannot control this unit" on the command card.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@willuwontu: Go
Oh you know what. I think in my init cheats trigger I had a share control action. My bad.
Edit: Still trying to get the dialog to only show the buttons though. I don't want that other info like right/left click info. I was able to make my custom ability not show it (instead it hides the buttons altogether). But when I select other units and use a target ability, it shows the right/left click for them... Even though they are units unrelated to the ability/unit group completely...
It seems one method is to just hide it whenever any targeting mode is entered using the event "Target Mode Updated", then show it when targeting mode is left. This would probably also be a good event to use for the targeting UI that you were talking about.
Though personally I would still like to have the button visible when the player is doing other stuff.
Could you explain more about the specifying a command card? I've tried the "set dialog item submenu" action. It asks for a string, and I'm not really sure what to put for it.
I'm still having trouble where the dialog will change when entering target mode with unrelated units. Maybe this action would help? I'd rather not have to hide the whole thing whenever an unrelated unit is targeting an ability.
@MaskedImposter: Go
string is 0002 ... 000X. yeah target mode is a bit stupid but i havent tried anything yet. if i were you i would checkout the lotv template and see if there is anything you can use.
@MaskedImposter: Go
Like funky says 000x is the most common, as long as you don't do spacial command card menu names it should work fine. The targeting thing is likely a byproduct of how the normal command card works.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
I found this triggers,that make UI panel,but it not work,who can fix it!
You need to have those variables in your map, you also need to set the unit group for the command panel.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
@willuwontu: Go
can you make a example,please,thank you!
@memego: Go
Do you have the variables in your map? You can create a variable by clicking the create new variable button up top in the triggers.
You set the unit group by setting the command panels unit group. Look at the stuff i posted earlier in the thread.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)
is it possible to catch like 1 button from command card #0005? i dont need to show whole command card for unit, just few buttons on panel like spear of adun.
I want to make an addition command cart that have 4 buttons and linking abilities from units command card #0005
@uroboros1987: Go
Move them off the screen in the layout.
Still alive and kicking, just busy.
My guide to the trigger editor (still a work in progress)