Trigger Help - Selecting Units

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
ive been having a problem that i cant seem to figure out..
for my map i need a command where the map knows when you have three of a specific unit selected so you can type a command to them. for an example having the map know you have three ghouls selected. nothing more or less than three ghouls. if you could explain out the trigger and try not to make it too confusing :rollie

ah and from now on ill start using the ultimate tutorial thread.. ill also read through it tonight :)
 

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
well, the map is:
it starts off like a normal game but if you select three units of a kind (that you trained just like a normal game) and type sacrafice, they are removed and a better unit is spawned at their starting point. can someone give me the exact trigger for that.. using lets say a ghoul.
 

Garthrs

Member!
Joined
Aug 3, 2003
Messages
130
Reaction score
0
Location
Usually buried at work
Website
Visit site
Try:
Untitled Trigger 001
Events
Player - Player 1 (Red) types a chat message containing Sacrifice as An exact match
Conditions
(Number of units in (Units currently selected by Player 1 (Red))) Equal to 3
Actions
Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Picked unit)) Equal to Footman
Then - Actions
Unit - Remove (Picked unit) from the game
Unit - Create 1 Knight for Player 1 (Red) at (Player 1 (Red) start location) facing Default building facing degrees
Else - Actions

Not sure if you can do this in RoC but you get the idea?
 

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
I get the idea, but I'm still looking for the Number of units in (Units currently selected by Player 1 (Red)) Equal to 3 part. I can't find the condition that that's under. Any help? Copy and paste that but put what title its under please.
 

Garthrs

Member!
Joined
Aug 3, 2003
Messages
130
Reaction score
0
Location
Usually buried at work
Website
Visit site
integer comparison
Click on (Number of units in (Units in (playable map area)))
click on the (Units in(Playable map area))
This will default to units in region, Drop down to "units selected"

Let me know...
 

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Picked unit)) Equal to Footman
Then - Actions
Unit - Remove (Picked unit) from the game
Unit - Create 1 Knight for Player 1 (Red) at (Player 1 (Red) start location) facing Default building facing degrees
Else - Actions

At the top you meen using If / Than / Else?

I'm also confused because if the Conditions are already set as "(All Conditions are True)" How do I use "If - Conditions (Unit-type of (Picked unit)) Equal to Footman"?
 

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
As I said, I am a complete newbie. I have tried figuring this out for a few hours. I don't completely understand a few parts of it. If you could just repost it describing where I can find every little thing, what the trigger is called, what it's under, and so on. This is my first time with complex triggers. I'm a fast learner but first, I must learn.
 

jimchu

Member!
Joined
Feb 29, 2004
Messages
52
Reaction score
0
Website
Visit site
Choose boolean comparison under the conditions menu. the condtition your looking for is most likely boolean. Just keep looking around the boolean until you find what your looking for. IF your still lost, ill try to figure it out.
 

daorc

Member!
Joined
Mar 11, 2004
Messages
178
Reaction score
0
Location
where you think
Website
daorcsmaps.tripod.com
lol...hey HellThrone im pretty okay with trigger's myself (if you looked at my Amaroth I map you can tell a little) so if you need any help PM me, im mostly always on the board's.
 

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
I meen, where under that stuff can I find what I want. The actual trigger name. I'm not ganna look through all 200 triggers trying to find what I want. That's crazy
 

jimchu

Member!
Joined
Feb 29, 2004
Messages
52
Reaction score
0
Website
Visit site
Hey, the way you learn is by looking at other maps. So find maps that are unprotected(like lots of roc maps) and check out the triggers in those and see how they did something. You should be able to get a general idea where everything is from that. As for save/load triggers thats a diffrent story, something to do with arrays i suppose, cause noone on here is a guru, so i will probably never get an answer for that post.
 

daorc

Member!
Joined
Mar 11, 2004
Messages
178
Reaction score
0
Location
where you think
Website
daorcsmaps.tripod.com
its not that hard man...lol...be a man you can just open up the trigger editor, create a new catagory, create new trigger, the create a new event and just look, and conditions and such not that hard i can do it in less than 2 mins
 

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
but you also know what each of them does. I don't know what I need to change or anything as well. You see my point?
 

daorc

Member!
Joined
Mar 11, 2004
Messages
178
Reaction score
0
Location
where you think
Website
daorcsmaps.tripod.com
oh... well if you post the map or pm me the map i could do the triggers for it... just tellme how you want it done ( explain what you want to do) and i could see what i can do...if you want me to.
 

Garthrs

Member!
Joined
Aug 3, 2003
Messages
130
Reaction score
0
Location
Usually buried at work
Website
Visit site
Originally posted by Garthrs
Try:
Untitled Trigger 001
Events
Player - Player 1 (Red) types a chat message containing Sacrifice as An exact match
Conditions
(Number of units in (Units currently selected by Player 1 (Red))) Equal to 3
Actions
Unit Group - Pick every unit in (Units currently selected by Player 1 (Red)) and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Picked unit)) Equal to Footman
Then - Actions
Unit - Remove (Picked unit) from the game
Unit - Create 1 Knight for Player 1 (Red) at (Player 1 (Red) start location) facing Default building facing degrees
Else - Actions

Not sure if you can do this in RoC but you get the idea?
Event found in: Player - Chat Message

Conditions found in: Integer Comparrison - Click on first section- Click on (Units in (Playable Map Area)) - Drop down Units in Region to Units selected - select player- and go back to main condition window - set number after "equal to" to 3

Action found in: Unit Group - Pick every unit in group and do (Actions)
Action(s) for that is: If Then Else (Multiple Conditions)
If is: Unit-type Comparrison
Then is: Actions Unit remove and unit create
Else is: do nothing


I can not go into more detail without blocking out three hours of my day, dude... Figure it out... Good Luck!!
 

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
Whoa.. that was in complete detail! I didn't even need that much but it helps a bunch. Just wait until I learn. Once I do I can aid you guys in helping newbies like me :)
 

New threads

Top