need help with condition

zentel

New Member
Reaction score
0
I dont know anything about jass.. i want to add some conditions on this Trigger but i cant do a thing can some one convert it to GUI manually.... i am pasting the codes at Image Please take a look ..

jasshelp.jpg


if this cant be converted to GUI then please add this condition to this trigger.

I want to add a condition on reviving hero ... IF reviving hero is belong to player group A then revive to the region 001

else

revive the hero on region 002

Please help me out
 

Laiev

Hey Listen!!
Reaction score
188
post the trigger instead the imagem (right click on the trigger name inside the trigger and copy as text)

and it can't be full converted because local just exist in jass

but to do what you want....

look to the line:

'[ljass]call PolledWait( HEROWAIT )[/ljass]' after this line put a If (in gui.. don't matter) and then put the condition what you want and move the '[ljass]call ReviveHeroLoc(...)[/ljass]' inside the if and copy it to the else too..

example:


Trigger:
  • .
    • Custom Script: call PolledWait( HEROWAIT )
    • If triggering unit is in Group A
      • then
        • Custom Script: call ReviveHeroLoc(OURHERO, GetRectCenter(gg_rct_Region_000))
      • else
        • Custom Script: call ReviveHeroLoc(OURHERO, GetRectCenter(gg_rct_Region_001))


PS: Region 000 and Region 001 is the rect which the hero will revive, you must need to change it to the name of your rect and remember, space in gui equal to _ in jass :p
 

zentel

New Member
Reaction score
0
Trigger:
  • Events
    • Unit - A unit Dies
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Custom script: local timerdialog WINDOW
      • Custom script: local integer HEROWAIT
      • Custom script: local timer OURTIMER
      • Custom script: local unit OURHERO
      • Custom script: set OURHERO = GetDyingUnit()
      • Custom script: set HEROWAIT = ( GetHeroLevel(OURHERO) * 5 )
      • Custom script: set OURTIMER = CreateTimer()
      • Custom script: call StartTimerBJ( OURTIMER, false, ( I2R(HEROWAIT) ))
      • Custom script: call CreateTimerDialogBJ( OURTIMER, GetPlayerName(GetOwningPlayer(OURHERO)) )
      • Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
      • Custom script: call TimerDialogDisplayForPlayerBJ( true, WINDOW, GetOwningPlayer(OURHERO) )
      • Custom script: call PolledWait( HEROWAIT )
      • Custom script: call ReviveHeroLoc(OURHERO, GetRectCenter(GetPlayableMapRect()), true )
      • Custom script: call PanCameraToTimedLocForPlayer( GetOwningPlayer(OURHERO), GetUnitLoc(OURHERO), 0.60 )
      • Custom script: call DestroyTimerDialog(WINDOW)



This is the full Trigger and i have tried your way Laiev it's not working right..The Condition of respawn the hero should be like this ..if hero is in the Player Group A then IT should be respawn to Region_000 Else Respawn to Region_001.. Instead this Every time when the hero revive it spawn on the region_001 .. Conditions are not working right...

It will be much easier if some one Convert it into GUI it will be much easier for me to change the value ETC.
 

zentel

New Member
Reaction score
0
Or Please make me hero revive system with timer on it with 2 region conditions Player Group A..
 

Laiev

Hey Listen!!
Reaction score
188
probably the condition is right but the hero inst in the group, so the condition always return false, so run the else
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top