• 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.

Making "Chances"

Status
Not open for further replies.
Level 5
Joined
Mar 12, 2005
Messages
117
The chances will be made like a td. in which you need variables. This may not be the easiest way (if there is one) but this is the way i would do it.

Event
Map Intialization

conditions

Action

Set Variable, (click edit variables and type chances then click integer there is a drop down menu) set the number (0 is default) to the number of chances you want to give. the you should have Chances=variable change the variable (in red) to Chances-1 that sets up your chances.

then make a new trigger for each player

Event
Unit - Player Owned by player dies

Conditions

Action
Set Variable, (create a new variable call it teamdeaths or something. leave the number default and change to integer again.) do the same you did last time but this time change it to teamdeaths=Teamdeaths+1

then another trigger

Event
Map Initiazation

Conditions
Integer Comparison - change options to teamdeaths equal to number of players (for example we will use 8 players so the integer number will be 8)

Action
Set - Variabe Chances=Chances-1
Respawn players etc
set - Variable teamdeaths=teamdeaths-8

the for the end of the game trigger same as above but with chances equal to zero player 1-2-3-4 etc defeat.

i Hope thats some help to you as for working it out for players leaving etc, you should know enough about variables now and how they work to do the last bit yourself ^^
 
Level 7
Joined
Jul 30, 2004
Messages
451
Eziekiel_Rage said:
the integer number should be 8 not a smiley face xD

also note that if you do it that way you have to also take into account players leaving, and if they leave while they have died then subtract 1 from deaths

of course i know a lot of other ways to do this, but i'll only post other ways if you want me to
 
Level 5
Joined
Mar 12, 2005
Messages
117
Raptir wrote

also note that if you do it that way you have to also take into account players leaving, and if they leave while they have died then subtract 1 from deaths

of course i know a lot of other ways to do this, but i'll only post other ways if you want me to


if you look at the bottom of my post the last few words say you should see that it says

i Hope thats some help to you as for working it out for players leaving etc, you should know enough about variables now and how they work to do the last bit yourself ^^

and raptor is right you need to learn these things to progress and you'll never be able to reach your map making potential.
 
Level 5
Joined
Mar 12, 2005
Messages
117
someone doing it for you is being lazy. and you wont learn, however i have practically written it step by step. if you just follow what it says you will find learning and understanding it a lot easier, believe me i had the same problem when i was learning how to use them and i followed a tutorial that had nothing to do with my map which made it a bit harder trying to implicate it into my map. save the page on to your desktop and open while you got world edit open then it can be easier to refrence with offline. if you still dont want to do after this post, then its your loss.
 
Level 2
Joined
Apr 13, 2005
Messages
9
a very easy alternative to having chances, is just a simple redo. if you have ever played stay off the grass, then you know what im talking about.

event:
player 1 types chat message "-redo"
condition:
none
action:
trigger - turn off this trigger
unit group - pick every unit in (units of type "mazer") and revive unit at respawn

this will enable 1 redo. very simple.
 
Level 4
Joined
Jan 9, 2005
Messages
106
actions
trigger - turn off this trigger
unit group - pick every unit in (units of type "mazer") and revive unit at respawn
I've had trouble with this b4, if it doesnt work for youu switch them around to read like this:

actions
unit group - pick every unit in (units of type "mazer") and revive unit at respawn
trigger - turn off this trigger

try to keep the trigger turning off at the end. also if you are talking about everyone having their own life set why not just give their unit a custom value like so:

event
w/e you have that spawns their units, or if they are preplaced on the map then set it on a timer, probably like 2 seconds or something
condition
none
actions
Unit Group - Pick every unit (Units in (Playable map area) matching (((Owner of (Picked unit)) slot status) Equal to Is playing)) and do (Unit - Set the custom value or (picked unit) to 9)

one single long string that should work with no problems if i remember right. as long as there is a person playing that slot, their units(all of them) will recieve a 9 custom value. chnge the 9 to how ever many lives you want to let them have.
then the fun part to make it so those lives disappear as they die:

event
Unit - A unit dies
Conditions
((Owner of (triggering unit)) slot status) Equal to Is playing
(custom value of (triggering unit)) Is not equal to 0
Actions
Unit - Set the custom value of (triggering unit) to ((custom value of (triggering unit)) - 1)
Hero - instantly revive (Triggering unit at (center of(wherever_you_want_them_to)), show/hide revival graphic
//pick either show or hide for the revival graphics, the "wherever_you_want_them_to" is any region you specify

hope i helped some :) - took about 5 minutes to remember all of that and find it in the editor to make surei said it right :) if u need someone to do it for you just say so, I've got all kinds of extra time immediately, and could knock that out for you

edit: :roll: then again if you want to bypass the triggers completely just give them an ankh of reincarnation with as many lives as you want to give them as charges... then make is so it is undropable :D
 
Status
Not open for further replies.
Top