HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Picking A Hero By selecting (PROBLEMZORZ)

01-03-2007, 12:55 PM#1
Night-raider
ok new problem: when i select my hero that i want 2 pick in my map it doesnt spawn him on the spot i said it had 2 spawn, it just does nuthing
so how do i fix that??, no JASS plz
(im not that good with the selecting a hero stuff)
1 thing that can be the couse is that is maybe cant find the triggering player (the player taht selects)
01-03-2007, 01:30 PM#2
Fireeye
Make this Trigger
Trigger:
Selection
Events
Collapse Conditions
HeroChoosen[(Player number of (Triggering player))] Equal to False
Collapse Actions
Set tempgroup = (Units currently selected by (Triggering player))
Collapse Unit Group - Pick every unit in tempgroup and do (Actions)
Collapse Loop - Actions
Unit - Create 1 (Unit-type of (Picked unit)) for (Triggering player) at <Your Location> facing Default building facing (270.0) degrees
Set HeroChoosen[(Player number of (Triggering player))] = True
Custom script: call DestroyGroup(udg_tempgroup)
and add the events through another Trigger.
Trigger:
Trigger - Add to Selection the event (Player - Player 1 (Red) Selects a unit)
01-03-2007, 01:43 PM#3
Night-raider
urm ok il try but i think i found another way, in weu you can set a option: enable hero selection system.
i didnt see that befor but il try both k?
anyway thx for helping
01-03-2007, 01:47 PM#4
Fireeye
Ahh, forgot to change
Trigger - Add to (This Trigger) the event (Player - Player 1 (Red) Selects a unit)
to
Trigger - Add to Selection the event (Player - Player 1 (Red) Selects a unit)
01-03-2007, 01:53 PM#5
Night-raider
1 question what thingy did you use for herochoosen?
and what variable is herochoosen (if it is a variable)
01-03-2007, 02:26 PM#6
Fireeye
herochoosen is a boolean array so you are only able to pick 1 hero.
01-03-2007, 02:46 PM#7
Night-raider
not working
01-03-2007, 02:55 PM#8
Fireeye
Uhm, then you do something wrong or you WC3 isn't latest version.
I just tested the triggers before i posted them and they worked.
01-03-2007, 04:36 PM#9
Night-raider
it can be the second part cozz i didnt realy understand taht so can you explane that a little further?
01-03-2007, 05:23 PM#10
Fireeye
argh, though the selection event is one you which doesn't appear, just change it this way and it should work (made too much trigger work )
Trigger:
Selection
Collapse Events
Player - Player 1 (Red) Selects a unit
//And so on (for every player 1 event)
Collapse Conditions
HeroChoosen[(Player number of (Triggering player))] Equal to False
Collapse Actions
Unit - Create 1 (Unit-type of (Triggering unit)) for (Triggering player) at (Center of (Playable map area)) facing Default building facing (270.0) degrees
set HeroChoosen[(Player number of (Triggering player))] = true
01-03-2007, 06:22 PM#11
Night-raider
ok this i do understand, AND THIS WORKS 2, thx thx thx this makes me happy 2 cozz now i can continue