• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Mana degeneration and then health degeneration - AGAIN

Status
Not open for further replies.
Level 2
Joined
Apr 27, 2013
Messages
19
I asked this question earlier before but there weren't much answers for me to work with (Or I didn't understand) and now I know the right place to ask, I'll repost my question here:

A few years back, I was working on a old project called Wolf Legacy. It was my best project but looking back, it was really lacking and didn't have much replay value like say LOAP or Dark Deeds. I was still diving into the wonderful realm of triggers and now just three days ago, I decided to start working on WL's sequel Wolf Legacy Reborn. (Great title, I know. So original. Lawl.)

Its been a few years, four I think? I don't know but its been a very long time since I played around with triggers and I've been following tips from this site on how to use some of them. Now, I'm trying to implement a sort of hunger system much like Wolf Pack had but I'm hitting dead ends. I want the mana to decrease and then once it hits zero, to have the health to go down... I have other questions but I don't want to spam the site with all of them so I'll ask as I hit more and more dead ends. Here's the screen shot of the trigger thus far:


http://s1285.photobucket.com/user/L...Hungertrigger_zpsc5f72d12.png.html?sort=3&o=0


Can I get a thorough answer to this? Something of a walkthrough or screenshots on how to do this please?


http://s1285.photobucket.com/user/L...SpawnTriggers_zps7f7934a3.png.html?sort=3&o=0 The spawning triggers.
 
Last edited:
plz post triggers on this site using trigger tags. http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/

as for ur question u need a periodic trigger and 2 groups in the on group u lower the persons mana 1 per second after lowering use an ITE to see if the mana is at 0 if it is remove from group 1 put in group 2. in group 2 lower health by 1 per second and there u go.

also check this tutorial out it may be able to help u http://www.hiveworkshop.com/forums/tutorial-submission-283/things-gui-user-should-know-233242/
 
Level 2
Joined
Apr 27, 2013
Messages
19
plz post triggers on this site using trigger tags. http://www.hiveworkshop.com/forums/miscellaneous-tutorials-456/how-easily-post-triggers-163285/

as for ur question u need a periodic trigger and 2 groups in the on group u lower the persons mana 1 per second after lowering use an ITE to see if the mana is at 0 if it is remove from group 1 put in group 2. in group 2 lower health by 1 per second and there u go.

also check this tutorial out it may be able to help u http://www.hiveworkshop.com/forums/tutorial-submission-283/things-gui-user-should-know-233242/
Still learning how to use this site xD Forums are harder to use than they look! Oi xD Sorry for being so nooby, man.

Periodic trigger you say? And what do you mean by two groups? Can I get this in more detail?

And thanks c:
 
Level 2
Joined
Apr 27, 2013
Messages
19
I think death meant that in one group you decrease mana of all units in that group, the second group decreases health.
Ah, that makes more sense... The group thing is a trigger, am I right? Also, another trigger I'm working with is a 'birth' system. I got it to work but I'm worried that the pups that teleport to the area will die from the hunger system xD Or that when they rech lvl 10 and grow up, the hunger system will not work anymore xD Any help on that? I also got a problem that pups are born to the player who isn't playing the female o-o
 
Level 2
Joined
Apr 27, 2013
Messages
19
The group thing is a trigger. It's a unit group action called "Pick every unit and do action(s)"

as to your other systems:
It's hard to help you with anything when you don't provide triggers :D
I can post some screenshots now if you wanted xD I need all the help I can get. I'm trying to get this map ready for beta testing by this Summer xD
 
Level 2
Joined
Apr 27, 2013
Messages
19
So lemme get this straight so I don't mess up again with this forum posting thing xD I post trigger help here by going along those guide lines right?
 
here are the triggers.

in the register trigger u need to change no unit to a preplaced unit on the map.

  • Register
    • Events
      • Unit - A unit comes within 256.00 of No unit
    • Conditions
      • (Owner of (Triggering unit)) Equal to (Owner of No unit)
    • Actions
      • Unit Group - Add (Triggering unit) to unitManaGroup
      • Set unitManaGroupBoolean = True
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • unitManaGroupBoolean Equal to True
        • Then - Actions
          • Trigger - Turn on Periodic <gen>
        • Else - Actions
here is the loop to reduce life and mana
  • Periodic
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in unitManaGroup and do (Actions)
        • Loop - Actions
          • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 1.00)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Life of (Picked unit)) Less than or equal to 0.00
            • Then - Actions
              • Unit Group - Remove (Picked unit) from unitLifeGroup
              • Set lifeGroupCounter = (lifeGroupCounter - 1)
            • Else - Actions
      • Unit Group - Pick every unit in unitManaGroup and do (Actions)
        • Loop - Actions
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 1.00)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Mana of (Picked unit)) Less than or equal to 0.00
            • Then - Actions
              • Unit Group - Add (Picked unit) to unitLifeGroup
              • Set lifeGroupCounter = (lifeGroupCounter + 1)
              • Unit Group - Remove (Picked unit) from unitManaGroup
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • lifeGroupCounter Less than or equal to 0
        • Then - Actions
          • Trigger - Turn on Periodic <gen>
        • Else - Actions
 
Level 2
Joined
Apr 27, 2013
Messages
19
here are the triggers.

in the register trigger u need to change no unit to a preplaced unit on the map.

  • Register
    • Events
      • Unit - A unit comes within 256.00 of No unit
    • Conditions
      • (Owner of (Triggering unit)) Equal to (Owner of No unit)
    • Actions
      • Unit Group - Add (Triggering unit) to unitManaGroup
      • Set unitManaGroupBoolean = True
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • unitManaGroupBoolean Equal to True
        • Then - Actions
          • Trigger - Turn on Periodic <gen>
        • Else - Actions
here is the loop to reduce life and mana
  • Periodic
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in unitManaGroup and do (Actions)
        • Loop - Actions
          • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 1.00)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Life of (Picked unit)) Less than or equal to 0.00
            • Then - Actions
              • Unit Group - Remove (Picked unit) from unitLifeGroup
              • Set lifeGroupCounter = (lifeGroupCounter - 1)
            • Else - Actions
      • Unit Group - Pick every unit in unitManaGroup and do (Actions)
        • Loop - Actions
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 1.00)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Mana of (Picked unit)) Less than or equal to 0.00
            • Then - Actions
              • Unit Group - Add (Picked unit) to unitLifeGroup
              • Set lifeGroupCounter = (lifeGroupCounter + 1)
              • Unit Group - Remove (Picked unit) from unitManaGroup
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • lifeGroupCounter Less than or equal to 0
        • Then - Actions
          • Trigger - Turn on Periodic <gen>
        • Else - Actions
Oh mai. Thank you so much! This is just what I needed! A good screenshot of how to do this c: I owe you big time buddy 'ol mine.
 
Level 2
Joined
Apr 27, 2013
Messages
19
here are the triggers.

in the register trigger u need to change no unit to a preplaced unit on the map.

  • Register
    • Events
      • Unit - A unit comes within 256.00 of No unit
    • Conditions
      • (Owner of (Triggering unit)) Equal to (Owner of No unit)
    • Actions
      • Unit Group - Add (Triggering unit) to unitManaGroup
      • Set unitManaGroupBoolean = True
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • unitManaGroupBoolean Equal to True
        • Then - Actions
          • Trigger - Turn on Periodic <gen>
        • Else - Actions
here is the loop to reduce life and mana
  • Periodic
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in unitManaGroup and do (Actions)
        • Loop - Actions
          • Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 1.00)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Life of (Picked unit)) Less than or equal to 0.00
            • Then - Actions
              • Unit Group - Remove (Picked unit) from unitLifeGroup
              • Set lifeGroupCounter = (lifeGroupCounter - 1)
            • Else - Actions
      • Unit Group - Pick every unit in unitManaGroup and do (Actions)
        • Loop - Actions
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) - 1.00)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Mana of (Picked unit)) Less than or equal to 0.00
            • Then - Actions
              • Unit Group - Add (Picked unit) to unitLifeGroup
              • Set lifeGroupCounter = (lifeGroupCounter + 1)
              • Unit Group - Remove (Picked unit) from unitManaGroup
            • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • lifeGroupCounter Less than or equal to 0
        • Then - Actions
          • Trigger - Turn on Periodic <gen>
        • Else - Actions
I'm just having some trouble finding the (Owner of (Triggering unit)) Equal to (Owner of No unit) in the comparison part. I'm so sorry for being so pesteringly nooby xD ^^'
 
Level 2
Joined
Apr 27, 2013
Messages
19
its not a screenshot lol

and u do have to change the values like i said for it to work. also this will only work for preplaced units. it will not work for towers u build as the game goes on.
Whatever it is. Lol. It gives me a skeleton to work with. Hmm. If thats the case I'll need to rework the aging trigger for the pups so their mana bars will decrease... I just don't want any of 'em dying before they're selected to be played xD Oi, nobody said triggers were easy c:

Values... This will be trial and error for me xD Hopefully this map will be worth it once I somehow get these triggers to work xD My next goals are weather and crafting :I Thanks btw good sir and or madam :3
 
Level 2
Joined
Apr 27, 2013
Messages
19
I'm just having some trouble finding the (Owner of (Triggering unit)) Equal to (Owner of No unit) in the comparison part. I'm so sorry for being so pesteringly nooby xD ^^'
Also, as for the managroup thing, where do I find that? Is it something I have to customly make myself?
 
Level 28
Joined
Sep 26, 2009
Messages
2,520
Stop double posting. Death already wrote you - if your post is last, then hit the edit button and edit that post.

The "screen" as you put it is a copy from WE and put here in the [ trigger ][ /trigger ] (without space in those brackets).

For the managroup - yes you will need to create it. It's variable. You crete it in variable editor (its in trigger editor's top bar, it has an icon of golden X I think)
 
Level 2
Joined
Apr 27, 2013
Messages
19
Again, sorry for being so spammy. I just joined this site about two days ago and I usually never use forums so I'm very new at this ^^' And alright, thank you. Um, I'll just stay quiet now, I feel like I'm irking all of you with my questions. Hehe ^^;
 
Level 2
Joined
Apr 27, 2013
Messages
19
I'm just very new to all this so I don't know any better. I've been looking around for answers for awhile so I'm the type who asks a lot of questions so I have everything solid xD So again, I apologize.
 
Status
Not open for further replies.
Top