Question

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
I think I might have asked this before but the trigger wasnt correct. I want a trigger that when I select 3 of a unit..lets say a peasant, and type sacrafice, it explodes the peasants and makes a footman. I need an exact trigger as simple as possible. This is my 2nd map so I'm not a pro at it yet. I'll give credit in my map to whoever helps the most.
 

IceDevil9

BattleForums Senior Member
Joined
Feb 19, 2003
Messages
3,418
Reaction score
3
Location
CA
Website
www.rcthaven.com
Well, I tried figure out your problem, ended up writing some triggers in this little box here, but it didn't work out right, so why don't you have them go to an area to ransform their peons to footmen. Again, I triued working thisa out and couldn't a way to do it for multiple units.

If someone else can help him that would be great.

-Frank :cool:
 

Darimus

BattleForums Addict
Joined
Oct 2, 2003
Messages
681
Reaction score
0
Website
www.spaceman.vze.com
Player types Sacrifice and An Exact Match

Unit Group - Pick Every Unit in playable map area owned by triggering player and do:

If [BOOLEAN COMPARISON] (Picked Unit) is selected by (triggering player) = true

then: explode - picked unit
unit - create 1 footman at unit - position of picked unit

else: do nothing
 

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
Events
Player - Player 1 (Red) types a chat message containing sacrafice as An exact match


Conditions


Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)

If - Conditions
((Picked unit) is selected by Player 1 (Red)) Equal to True

Then - Actions
Unit - Explode (Picked unit)
Unit - Create 1 Footman for Player 1 (Red) at (Position of (Picked unit)) facing Default building facing (270.0) degrees

Else - Actions
Do nothing


That's it word for word. Will someone tell me what's wrong there because that's not working.
 

x42bn6

Retired Staff
Joined
Nov 11, 2002
Messages
15,150
Reaction score
2
Location
London, United Kingdom
Spell sacrifice properly?

...

1) You can't use 'Picked Unit' - The Event is a text-message event.

EVENT: Unit Group - Pick Every Unit in playable map area owned by [Triggering Player] and do

...

[large If statement]

If (([Picked Unit] is selected by [Triggering Player]) and ([Picked Unit] is equal to [Peasant]))

Darimus, do you see the problem? He has three peasants, not one to be selected.

Here, the only thing I can see is variables.....

But I'll need some time to think this one out without having 5-level brackets.
 

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
haha i actually did check to make sure i spelled sacrafice prperly and i did. anyone else have any ideas as x42 thinks it over?
 

x42bn6

Retired Staff
Joined
Nov 11, 2002
Messages
15,150
Reaction score
2
Location
London, United Kingdom
I have one idea. But I'm not sure if it works with multiple selects.

First, is there an event for when a unit is selected?

*unable to check on work machine*
 

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
theres no event. its ganna be something like when u select 3 peasants and type sacrafice a super unit (in this case a super peasant) appears. my idea is a super peasant would be 2ce as fast as a normal peasant. same idea for every other unit. but to make it simple i said from peasant to footman.
 

x42bn6

Retired Staff
Joined
Nov 11, 2002
Messages
15,150
Reaction score
2
Location
London, United Kingdom
I just realised, this involves functions and scripting because I can't see any workaround. :|

Sorry, my WE scripting is zero.
 

IceDevil9

BattleForums Senior Member
Joined
Feb 19, 2003
Messages
3,418
Reaction score
3
Location
CA
Website
www.rcthaven.com
x42 I don't think this is possible, as simple as it sounds. I tried about 6 different ways suing varibales and just couldn't figure it out.

-Frank :cool:
 

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
we can always step it down a notch if we have to, to make it where 3 peasants go to a selected area. peasants die, footman spawns. but that is LAST RESORT and i would love it if we could get the real one or something near it workin first.
 

x42bn6

Retired Staff
Joined
Nov 11, 2002
Messages
15,150
Reaction score
2
Location
London, United Kingdom
What I was thinking was scripting, because that is the only way, knowing which units are selected.

One way would be to 'mark' the unit to a variable, loop three times, ignore 'marked' units and detect if three Peasants are selected.

Let me get my thinking cap on overnight.

-.-;
 

HellThrone

Member!
Joined
Oct 17, 2003
Messages
295
Reaction score
0
Location
Hell
okay that doesnt make sense yet i understand it.. i guess thats what ill have to do.. if you guys CAN find something out, post it here. ill be checking for updates once or 2ce a day.
 

New threads

Top