Hmmm... Does your unit have a "Death Time" thats not 0? (That is set in the data editor)
Otherwise just start putting debug messages into your trigger, see whats wrong (For example, have one debug message tell you the name of ReviveUnit to see whether it is actually trying to revive the right unit, and things like that) You can use either "text message" for that or "debug message"
well, it seems the problem is its just not adding the unit to the variable. it pans the camera and displays the message it just doesnt revive the unit.
You still havent answered my death time question. If it has no or a too low death time, the unit will be removed from the game upon death (Or after its time expires), which means it cant be revived anymore. If you did set a high death time, paste the trigger that creates the hero into your next post please :)
death time of 1 = 1 second before the unit is removed from the games memory. Whats the maximum time you want to be able to revive after? If its forever, just make it something absurdly high (Or just make it 1-2 minutes and force revive after just before it expires)
ok... that should work. now somehow the conditions are being weird. i didnt touch them but somehow its ignoring my conditions. its trying to create the probe to get a new hero twice bc for some reason it runs both players triggers even though the conditions say not to.
Yea, the 1 health is normal. Use triggers to change the health, energy and so on of heroes. (I think its "modify unit property" or something like that)
If you have more problems, feel free to PM me or make another post/thread :)
ok... so the revive is working fine, but now my timer and spawn probe is messing up. for the timer i told it to only start if one of player1-12 dies yet it starts when player 15 dies. and also i have two probe triggers one for team 1 and one for team 2, for some reason its using both... i'll post them
revive2Team1EventsDialog-AnyDialogItemisusedbyPlayerAnyPlayerwitheventtypeClickedLocalVariablesConditionsOrConditions(Ownerof(Triggeringunit))==(Player1from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player2from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player3from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player4from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player5from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player6from(Alliesofplayer1))AndConditionsNotConditions(Ownerof(Triggeringunit))==(Player15from(Allplayers))(Triggeringunit)==(Unit(Triggeringplayer)fromprobegroup)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Useddialogitem)==reviveunitdialogitem[0]ThenPlayerGroup-Removeplayer(Triggeringplayer)fromtriggeringplayer2Unit-Reviverespawnunit[(Triggeringplayer)]Debug-Display(Nameofplayer(Triggeringplayer))asdebugoutputusingType1,andDodisplayitinthegamewindowUnit-Moverespawnunit[(Triggeringplayer)]instantlytoPoint002(NoBlend)Dialog-HideReviveunitdialogfor(ActivePlayers)Camera-Panthecameraforplayer(Triggeringplayer)to(CenterofRegion002)over2.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanningElseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Useddialogitem)==reviveunitdialogitem[1]ThenPlayerGroup-Removeplayer(Triggeringplayer)fromtriggeringplayer2Unit-Create1Probeforplayer(Triggeringplayer)atStartLocation001facing270.0degrees(NoOptions)Debug-Display"Team 1 is on"asdebugoutputusingType1,andDodisplayitinthegamewindowUnitGroup-Add(Lastcreatedunit)toprobegroupDialog-HideReviveunitdialogfor(ActivePlayers)Camera-Panthecameraforplayer(Triggeringplayer)to(CenterofRegion004)over2.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanningElse
Team 1 probe spawn ^
revive2Team2EventsDialog-AnyDialogItemisusedbyPlayerAnyPlayerwitheventtypeClickedLocalVariablesConditionsOrConditions(Ownerof(Triggeringunit))==(Player7from(Alliesofplayer7))(Ownerof(Triggeringunit))==(Player8from(Alliesofplayer7))(Ownerof(Triggeringunit))==(Player9from(Alliesofplayer7))(Ownerof(Triggeringunit))==(Player10from(Alliesofplayer7))(Ownerof(Triggeringunit))==(Player11from(Alliesofplayer7))(Ownerof(Triggeringunit))==(Player12from(Alliesofplayer7))AndConditionsNotConditions(Triggeringunit)==(Unit(Triggeringplayer)fromprobegroup)ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Useddialogitem)==reviveunitdialogitem[0]ThenPlayerGroup-Removeplayer(Triggeringplayer)fromtriggeringplayer2Unit-Reviverespawnunit[(Triggeringplayer)]Unit-Moverespawnunit[(Triggeringplayer)]instantlytoPoint001(NoBlend)Dialog-HideReviveunitdialogfor(ActivePlayers)Camera-Panthecameraforplayer(Triggeringplayer)to(CenterofRegion001)over2.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanningElseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Useddialogitem)==reviveunitdialogitem[1]ThenPlayerGroup-Removeplayer(Triggeringplayer)fromtriggeringplayer2Unit-Create1Probeforplayer(Triggeringplayer)atStartLocation002facing270.0degrees(NoOptions)Debug-Display"Team 2 Is on"asdebugoutputusingType1,andDodisplayitinthegamewindowUnitGroup-Add(Lastcreatedunit)toprobegroupDialog-HideReviveunitdialogfor(ActivePlayers)Camera-Panthecameraforplayer(Triggeringplayer)to(CenterofRegion003)over2.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanningElse
Probe 2 spawn ^
reviveTeam1EventsUnit-AnyUnitdiesLocalVariablesConditionsOrConditions(Ownerof(Triggeringunit))==(Player1from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player2from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player3from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player4from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player5from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player6from(Alliesofplayer1))AndConditionsNotConditions(Ownerof(Triggeringunit))==(Player15from(Allplayers))(Triggeringunit)==(Unit(Triggeringplayer)fromprobegroup)ActionsTimer-Showrevivetimer2fortriggeringplayer2Unit-Move(Triggeringunit)instantlytoPoint017(NoBlend)PlayerGroup-Addplayer(Triggeringplayer)totriggeringplayer2Timer-StartrevivetimerasaOneShottimerthatwillexpirein30.0GameTimesecondsTimer-Show(Lastcreatedtimerwindow)fortriggeringplayer2UnitGroup-Add(Triggeringunit)toReviveunitgroupGeneral-Waitforrevivetimertohave0.0secondsRemainingTimer-Hiderevivetimer2for(Allplayers)Timer-Hide(Lastcreatedtimerwindow)for(Allplayers)Dialog-CreateaModaldialogofsize(500,500)at(0,0)relativetoCenterofscreenVariable-SetReviveunitdialog=(Lastcreateddialog)Dialog-CreatealabelfordialogReviveunitdialogwiththedimensions(100,100)anchoredtoTopLeftwithanoffsetof(50,50)withthetext"Revive unit or pick a new one?"colorsettoWhitetextwriteoutsettoFalsewithawriteoutdurationof2.0Dialog-CreateabuttonfordialogReviveunitdialogwiththedimensions(200,200)anchoredtoLeftwithanoffsetof(0,0)settingthetooltipto"Revive your current unit."withbuttontext"Revive"andthehoverimagesetto""Variable-Setreviveunitdialogitem[0]=(Lastcreateddialogitem)Dialog-CreateabuttonfordialogReviveunitdialogwiththedimensions(200,200)anchoredtoRightwithanoffsetof(0,0)settingthetooltipto"Pick a new unit."withbuttontext"Pick a new unit."andthehoverimagesetto""Variable-Setreviveunitdialogitem[1]=(Lastcreateddialogitem)Dialog-ShowReviveunitdialogfortriggeringplayer2
Earlier in this thread i gave you an example of the "Player in player group" condition, use that one instead of one condition per player, makes things more readable.
You don't seem to fully understand how "or" and "and" works. I'll try and explain:
"OR" == ANY of the following
means "Owner == P6 of Allies of player 1" OR (P15 from All player AND Unit from probe group)
What you want is
(Owner of (Triggering unit)) == (Player 15 from (All players))
(Triggering unit) == (Unit (Triggering player) from probe group)
OR
(and then list your actions)
This way all conditions have to be true. For an "OR" to be true, at least ONE from it's list has to be true. For AND to be true, all of its list have to be true. Right now your condition is set up so that any one of those have to be true for the trigger to fire, the "And" part counting as 2 conditions as a single one.
I have a feeling I suck at explaining this >.> I learned this in mathematics in first year of high school, see if you can find anything about this and/or ask your math teacher (I think the lesson it was in was "sets of numbers" for me)
Also, you are using "Triggering unit" in a trigger that is using "Dialog item is used" as an event. That doesn't work - triggering unts are units that trigger events, this event refers to a dialog, not a unit. Just use "Triggering Player", and the condition "Player in player group" (It has to be the first value in a condition I think, not the one that comes after the ==)
(Owner of (Triggering unit)) == (Player 7 from (Allies of player 7))
This won't work as well, unless Player 7 has more than 6 players on his team. You are referring to the 7th ally of that player, not player number 7.
To get lobby positions, use "Player on team" (Player 1 on team 1 == first slot. Player 3 on team 2 == 3rd slot on second team, so if you have 6 slots per team thats player 9)
This is all I can spot for now, it past midnight, I'm tired and didn't read the entire triggers, just the conditions and events for now... Will check back here tomorrow, or later if I'm still awake and you still have a problem.
(Triggering player == Player 1 of Allies of Player 1)
and now it thinks that no one is clicking the dialog so the dialog clicked trigger isnt working now.
revive2Team2EventsDialog-AnyDialogItemisusedbyPlayerAnyPlayerwitheventtypeClickedLocalVariablesConditionsOrConditions(Triggeringplayer)==(Player1from(Alliesofplayer7))(Triggeringplayer)==(Player2from(Alliesofplayer7))(Triggeringplayer)==(Player3from(Alliesofplayer7))(Triggeringplayer)==(Player4from(Alliesofplayer7))(Triggeringplayer)==(Player5from(Alliesofplayer7))(Triggeringplayer)==(Player6from(Alliesofplayer7))ActionsGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Useddialogitem)==reviveunitdialogitem[0]ThenPlayerGroup-Removeplayer(Triggeringplayer)fromtriggeringplayer2Unit-Reviverespawnunit[(Triggeringplayer)]Unit-Moverespawnunit[(Triggeringplayer)]instantlytoPoint002(NoBlend)Dialog-HideReviveunitdialogfor(ActivePlayers)Camera-Panthecameraforplayer(Triggeringplayer)to(CenterofRegion002)over2.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanningElseGeneral-If(Conditions)thendo(Actions)elsedo(Actions)If(Useddialogitem)==reviveunitdialogitem[1]ThenPlayerGroup-Removeplayer(Triggeringplayer)fromtriggeringplayer2Unit-Create1Probeforplayer(Triggeringplayer)atStartLocation002facing270.0degrees(NoOptions)Debug-Display"Team 2 Is on"asdebugoutputusingType1,andDodisplayitinthegamewindowUnitGroup-Add(Lastcreatedunit)toprobegroupDialog-HideReviveunitdialogfor(ActivePlayers)Camera-Panthecameraforplayer(Triggeringplayer)to(CenterofRegion004)over2.0secondswithExistingVelocity%initialvelocity,10%deceleration,andDoNotusesmartpanningElse
Dialog used trigger ^
reviveTeam1EventsUnit-AnyUnitdiesLocalVariablesConditionsNotConditions(Ownerof(Triggeringunit))==(Player15from(Allplayers))OrConditions(Triggeringunit)==(Unit(Triggeringplayer)fromprobegroup)OrConditions(Ownerof(Triggeringunit))==(Player1from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player2from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player3from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player4from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player5from(Alliesofplayer1))(Ownerof(Triggeringunit))==(Player6from(Alliesofplayer1))AndConditionsActionsUnit-Move(Triggeringunit)instantlytoPoint017(NoBlend)PlayerGroup-Addplayer(Triggeringplayer)totriggeringplayer2Timer-Createatimerwindowforrevivetimer,withthetitle"Time before revive",usingRemainingtime(initiallyVisible)Timer-Showrevivetimer2fortriggeringplayer2Timer-StartrevivetimerasaOneShottimerthatwillexpirein30.0GameTimesecondsTimer-Show(Lastcreatedtimerwindow)fortriggeringplayer2UnitGroup-Add(Triggeringunit)toReviveunitgroupGeneral-Waitforrevivetimertohave0.0secondsRemainingTimer-Hiderevivetimer2for(Allplayers)Timer-Hide(Lastcreatedtimerwindow)for(Allplayers)Dialog-CreateaModaldialogofsize(500,500)at(0,0)relativetoCenterofscreenVariable-SetReviveunitdialog=(Lastcreateddialog)Dialog-CreatealabelfordialogReviveunitdialogwiththedimensions(100,100)anchoredtoTopLeftwithanoffsetof(50,50)withthetext"Revive unit or pick a new one?"colorsettoWhitetextwriteoutsettoFalsewithawriteoutdurationof2.0Dialog-CreateabuttonfordialogReviveunitdialogwiththedimensions(200,200)anchoredtoLeftwithanoffsetof(0,0)settingthetooltipto"Revive your current unit."withbuttontext"Revive"andthehoverimagesetto""Variable-Setreviveunitdialogitem[0]=(Lastcreateddialogitem)Dialog-CreateabuttonfordialogReviveunitdialogwiththedimensions(200,200)anchoredtoRightwithanoffsetof(0,0)settingthetooltipto"Pick a new unit."withbuttontext"Pick a new unit."andthehoverimagesetto""Variable-Setreviveunitdialogitem[1]=(Lastcreateddialogitem)Dialog-ShowReviveunitdialogfortriggeringplayer2
other trigger ^
also, the timer is still starting for a player 15 death.
This one doesn't make any sense to me. Why have an OR if there is only 1 condition in it?
Also, instead of "not" you can just change the "==" to "!=" when making the condition. (!= means "not equal")
The OR in the first trigger is done correctly, but can be replaced by the condition at the top of this post.
"(Triggering player == Player 1 of Allies of Player 1)"
"Ally 1 of player 1" is NOT player 1 (You aren't allied to yourself), that's probably your problem. Again, "Player in Player group == true" is the condition I keep talking about. Create a new condition, double click its first value, on the left hand side find "player group", clikc it, and "player in player group" should be one of the last ones left on the list in the bigger window
It worked, thanks :) so now I have one last thing I cant figure out. I want to make a message that tells you who killed you when you die. I know it would be a message and it would use killing player, but it wont let me use both my own text and a function. Also, the killing player isn't in the functions for the message action.
ok i got the player issue working but my unit still wont spawn
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
Hmmm... Does your unit have a "Death Time" thats not 0? (That is set in the data editor)
Otherwise just start putting debug messages into your trigger, see whats wrong (For example, have one debug message tell you the name of ReviveUnit to see whether it is actually trying to revive the right unit, and things like that) You can use either "text message" for that or "debug message"
@TheAlmaity: Go
well, it seems the problem is its just not adding the unit to the variable. it pans the camera and displays the message it just doesnt revive the unit.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
@fishy77: Go
You still havent answered my death time question. If it has no or a too low death time, the unit will be removed from the game upon death (Or after its time expires), which means it cant be revived anymore. If you did set a high death time, paste the trigger that creates the hero into your next post please :)
@TheAlmaity: Go
This is one hero i did the same thing for the other 5. i checked and it has a 0 death time. i noticed the control group action doesnt work too.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
@fishy77: Go
0 death time = Cannot be revived (its data is immediately removed from the game upon death). Give it a fairly long death time.
Variable - Set respawn unit[(Triggering player)] = (Created unit)
It should be "Last Created Unit".
Explanation:
Created Unit = Unit created in the event "Unit is created."
Last Created Unit = Unit created with the "Create Unit" action.
@TheAlmaity: Go
oh, ok. so should i make the death time 1?
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
@fishy77: Go
death time of 1 = 1 second before the unit is removed from the games memory. Whats the maximum time you want to be able to revive after? If its forever, just make it something absurdly high (Or just make it 1-2 minutes and force revive after just before it expires)
ok... that should work. now somehow the conditions are being weird. i didnt touch them but somehow its ignoring my conditions. its trying to create the probe to get a new hero twice bc for some reason it runs both players triggers even though the conditions say not to.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
@fishy77: Go
hmm i made the death time 3 and a half minutes and it wont respawn still. it could have to do with the triggers being weird
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
@fishy77: Go
ok i just moved it to the wrong place... it revives now but it has 1 health
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
@fishy77: Go
Yea, the 1 health is normal. Use triggers to change the health, energy and so on of heroes. (I think its "modify unit property" or something like that)
If you have more problems, feel free to PM me or make another post/thread :)
@fishy77: Go
ok... so the revive is working fine, but now my timer and spawn probe is messing up. for the timer i told it to only start if one of player1-12 dies yet it starts when player 15 dies. and also i have two probe triggers one for team 1 and one for team 2, for some reason its using both... i'll post them
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
Team 1 probe spawn ^
Probe 2 spawn ^
My trigger for the timer. ^
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
Earlier in this thread i gave you an example of the "Player in player group" condition, use that one instead of one condition per player, makes things more readable.
You don't seem to fully understand how "or" and "and" works. I'll try and explain:
"OR" == ANY of the following
so
means "Owner == P6 of Allies of player 1" OR (P15 from All player AND Unit from probe group)
What you want is
(Owner of (Triggering unit)) == (Player 15 from (All players))
(Triggering unit) == (Unit (Triggering player) from probe group)
OR
(and then list your actions)
This way all conditions have to be true. For an "OR" to be true, at least ONE from it's list has to be true. For AND to be true, all of its list have to be true. Right now your condition is set up so that any one of those have to be true for the trigger to fire, the "And" part counting as 2 conditions as a single one.
I have a feeling I suck at explaining this >.> I learned this in mathematics in first year of high school, see if you can find anything about this and/or ask your math teacher (I think the lesson it was in was "sets of numbers" for me)
Also, you are using "Triggering unit" in a trigger that is using "Dialog item is used" as an event. That doesn't work - triggering unts are units that trigger events, this event refers to a dialog, not a unit. Just use "Triggering Player", and the condition "Player in player group" (It has to be the first value in a condition I think, not the one that comes after the ==)
(Owner of (Triggering unit)) == (Player 7 from (Allies of player 7))
This won't work as well, unless Player 7 has more than 6 players on his team. You are referring to the 7th ally of that player, not player number 7.
To get lobby positions, use "Player on team" (Player 1 on team 1 == first slot. Player 3 on team 2 == 3rd slot on second team, so if you have 6 slots per team thats player 9)
This is all I can spot for now, it past midnight, I'm tired and didn't read the entire triggers, just the conditions and events for now... Will check back here tomorrow, or later if I'm still awake and you still have a problem.
@TheAlmaity: Go
Alright. thanks for the help. i shall try those. :)
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
well, i tried the,
(Triggering player == Player 1 of Allies of Player 1)
and now it thinks that no one is clicking the dialog so the dialog clicked trigger isnt working now.
Dialog used trigger ^
other trigger ^
also, the timer is still starting for a player 15 death.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
"((Triggering player) is in (Allies of player 1)) == True"
This is the condition I was talking about earlier.
This one doesn't make any sense to me. Why have an OR if there is only 1 condition in it?
Also, instead of "not" you can just change the "==" to "!=" when making the condition. (!= means "not equal")
The OR in the first trigger is done correctly, but can be replaced by the condition at the top of this post.
"(Triggering player == Player 1 of Allies of Player 1)"
"Ally 1 of player 1" is NOT player 1 (You aren't allied to yourself), that's probably your problem. Again, "Player in Player group == true" is the condition I keep talking about. Create a new condition, double click its first value, on the left hand side find "player group", clikc it, and "player in player group" should be one of the last ones left on the list in the bigger window
@TheAlmaity: Go
It worked, thanks :) so now I have one last thing I cant figure out. I want to make a message that tells you who killed you when you die. I know it would be a message and it would use killing player, but it wont let me use both my own text and a function. Also, the killing player isn't in the functions for the message action.
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here
Right now the only way I found to do it is to make two messages and have one say the player and one say killed you.
Also, I remember seeing it once but I don't remember where it was. Where is the thing that makes the trigger errors not appear?
New to the Editor? Need a tutorial? Click Here
Want data assets? Click Here