setting a victory condition

KickAssKenny

New Member
Reaction score
1
hey i need a little help here im basically clueless
in my WE map there are four kings each with a ring... when a king dies he drops his ring so another king can grab it...
i would like the victory condtion to be when one king has all four of the rings
can anyone help me on how to trigger this victory condition
thanks everyone :)
love this site lol
 

Glaivesrit

New Member
Reaction score
8
i'm kind of an oddball so i like to do things like this :

Code:
Ring Integer
    Events
        Unit - A unit Acquires an item
    Conditions
        (Item being manipulated) Equal to (YOUR "RING")
    Actions
        Set ItemInteger = (ItemInteger + 1)
        Turn off (this trigger)

make 3 more of those triggers so you have 4 triggers representing 4 rings.

-ItemInteger is an integer variable, no array, initial value of 0.

the victory thing is like this:

Code:
Ring Win
    Events
        Unit - A unit Acquires an item
    Conditions
        ItemInteger Equal to 4
    Actions
        Game - Victory Player 1 (Red) (Show dialogs, Show scores)


that just shows that when the 4 rings are collected, you win. i'm not sure about it 100%, but it should work
 

Kahiera

Active Member
Reaction score
9
if you do it like that, you need to reduce the variable by 1 when the item is dropped other wise all you have to do is drop and pick up until u win..
i created this trigger that could work:
Code:
Win
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Triggering unit) has an item of type Shadow Orb +1) Equal to True
        ((Triggering unit) has an item of type Shadow Orb +2) Equal to True
        ((Triggering unit) has an item of type Shadow Orb +3) Equal to True
        ((Triggering unit) has an item of type Shadow Orb +4) Equal to True
    Actions
        Game - Victory (Triggering player) (Show dialogs, Show scores)
        Player Group - Pick every player in TempGroup and do (Actions)
            Loop - Actions
                Player Group - Remove (Triggering player) from TempGroup
                Game - Defeat (Picked player) with the message: Defeat!
 

KickAssKenny

New Member
Reaction score
1
if you do it like that, you need to reduce the variable by 1 when the item is dropped other wise all you have to do is drop and pick up until u win..
i created this trigger that could work:
Code:
Win
    Events
        Unit - A unit Acquires an item
    Conditions
        ((Triggering unit) has an item of type Shadow Orb +1) Equal to True
        ((Triggering unit) has an item of type Shadow Orb +2) Equal to True
        ((Triggering unit) has an item of type Shadow Orb +3) Equal to True
        ((Triggering unit) has an item of type Shadow Orb +4) Equal to True
    Actions
        Game - Victory (Triggering player) (Show dialogs, Show scores)
        Player Group - Pick every player in TempGroup and do (Actions)
            Loop - Actions
                Player Group - Remove (Triggering player) from TempGroup
                Game - Defeat (Picked player) with the message: Defeat!


not if they are four different rings right? and i set the integer value for each one...
cause the four rings arnt the same item.. all different
 

Glaivesrit

New Member
Reaction score
8
thanks for pointing that out...just added "turn off" command. my trigger(s) will work now...its just giving each ring a simple value of 1 and when 1+1+1+1= 4, GG.

EDIT: If it was your intention for the player to hold onto the rings, well then, just make it so the rings aren't droppable if you do it the integer way
 

KickAssKenny

New Member
Reaction score
1
thanks for pointing that out...just added "turn off" command. my trigger(s) will work now...its just giving each ring a simple value of 1 and when 1+1+1+1= 4, GG.

EDIT: If it was your intention for the player to hold onto the rings, well then, just make it so the rings aren't droppable if you do it the integer way

ya thanks bro this works perfect :) + rep
 
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