• 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] a prison system

Status
Not open for further replies.
Level 13
Joined
Sep 24, 2007
Messages
1,023
well i was wondering if it could be possible to amek it so that if a hero dies and he is unallied with a certain player he gets sent to prison and is reallied with the player? also i was wondering if you could amke it so that if a player attacks a certain player he becomes unallied but if he gives x ammount of gold to the computer he becomes allied agian
 
Level 12
Joined
Mar 16, 2006
Messages
992
well i was wondering if it could be possible to amek it so that if a hero dies and he is unallied with a certain player he gets sent to prison and is reallied with the player? also i was wondering if you could amke it so that if a player attacks a certain player he becomes unallied but if he gives x ammount of gold to the computer he becomes allied agian


Yes. It is possible to make it so that whatever you wrote happens.
 
Level 4
Joined
Sep 9, 2004
Messages
112
Actually he answered it just the way you asked.. you asked if it was possible, not if he could show you how :p

Anyways, here ya go! :p

  • Prision
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Dying unit) belongs to an enemy of Player 1 (Red)) Equal to True
        • Then - Actions
          • Player - Make (Owner of (Dying unit)) treat Player 1 (Red) as an Ally with shared vision
          • Hero - Instantly revive (Dying unit) at (Center of (Playable map area)), Hide revival graphics
          • Camera - Pan camera for (Owner of (Reviving Hero)) to (Center of (Playable map area)) over 0.50 seconds
        • Else - Actions
          • Do nothing
  • Betray
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Owner of (Attacked unit)) Equal to Player 1 (Red)
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • ((Attacking unit) belongs to an ally of Player 1 (Red)) Equal to True
        • Then - Actions
          • Player - Make (Owner of (Attacking unit)) treat Player 1 (Red) as an Enemy
        • Else - Actions
          • Do nothing
If you use them some rep would be nice! Also if u need anything else just ask! :p
 
Level 4
Joined
Sep 9, 2004
Messages
112
Hmm I suppose I did oO.. I can post a revamped version if you need but I think you should be able to get it..
 
Level 12
Joined
Mar 16, 2006
Messages
992
but what if you dont have the ogld?

I'm not really following what you want to do with the trigger because I haven't read into it, but if you want to set up an "if you don't have the gold" trigger, then you need an "If has gold, remove gold, then <the rest of trigger>".

Do you follow at all?
 
Level 4
Joined
Sep 9, 2004
Messages
112
but what if you dont have the ogld?

Don't really understand what your getting at but u can just make a new dialog trigger that comes up when u enter a chat line such as "-Ally Red" and then check to see if they are unallied and if they are check their gold amount and make shure its equal or greater than the gold required. And if they click yes, remove the gold and change their alligence!

Hope that helps, if you need a trigger exampl just say something..
 
Level 4
Joined
Sep 9, 2004
Messages
112
I understand that you want it so you have to pay them to avoi being attacked. If you do what I told you it will play out like this:

A player enters "-Bribe Red" (or whatever you want it to say, maybe -Ally Red) as a chat string

A dialog appears for the triggering player. Asking if they want to pay red to keep them from being attacked by red.

If they click the "yes" button, it will check if they have the right amount of gold and if they do, deduct the gold from their current gold and add it to reds and then change them to allied without vision with red, or with vision if you want, if they don't.. then just send them a message saying they don't have enough gold.

If they click "No" then do nothing, or you could just have a yes/ok option.

Also don't forget to add into the yes option to check if they are already an ally with red or not. No sense in paying for nothing..

If you need me to make an example trigger, just say something.
 
Level 3
Joined
Jul 24, 2007
Messages
40
Trigger Bribe
  • Events
    • Player - Player 1 (Red) types a chat message containing -bribe computer as An an exact match
  • Conditions
  • Actions
    • Player Group - Add (Triggering player) to Group
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Triggering player) Current gold) Greater than or equal to 1000
      • Then - Actions
        • Player - Add -1000 to (Triggering player) Current gold
        • Player - Add 1000 to Player 12 (Brown) Current gold
        • Player - Make (Triggering player) treat Player 12 (Brown) as an Ally with shared vision
        • Player - Make Player 12 (Brown) treat (Triggering player) as an Ally with shared vision
      • Else - Actions
        • Game - Display to Group the text: Insufficient funds.
    • Player Group - Remove (Triggering Player) from Group
//Group is a global variable for playergroup
replace 1000 with any value you like
This will first check if the player has sufficient funds and if he does, it will ally him
Player 12 (Brown is the assumed computer
 
Status
Not open for further replies.
Top