HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero Name = String Variable

11-29-2004, 06:01 PM#1
Tim.
Ok heres the deal, for my map I have the player choose a character, and then choose the craft they want to drive/pilot.

Such as:

OrcSmasher999=Player Name

Player chooses chacter JOE from the set JOE, SMITH, BOB, TOM, JOHN

Player is then issued a CAR hero.

The CAR hero's NAME is now JOE, hense: Joe (Level 1 CAR)


How is this possible OTHER than creating a hero for each character?

Thanks as always.
11-29-2004, 06:59 PM#2
PitzerMike
Really it's not possible other than by creating a new unit for each name.
11-29-2004, 07:25 PM#3
Tim.
Crap, not even via JASS?
11-29-2004, 07:43 PM#4
Luzif3r
jass cannot do everything...
11-29-2004, 08:56 PM#5
Captain Griffen
I suppose you could give each car each of the names and then make it, check if it is the correct name, and if not, remove it and make another. Eventually you'll get the right one.
11-29-2004, 10:05 PM#6
-={tWiStÄr}=-
no you wouldnt. the hero names dont repeat. they add I, II, VI... There is no way to do this besides having a different unit for each name.
11-30-2004, 07:38 PM#7
Tim.
Alrighty then, there goes that idea...Oh well, time for plan B.

Thanks guys.
11-30-2004, 07:45 PM#8
Captain Griffen
Quote:
Originally Posted by -={tWiStÄr}=-
no you wouldnt. the hero names dont repeat. they add I, II, VI... There is no way to do this besides having a different unit for each name.

Err..what you talking about?

You see the proper names of heroes thing? Well, add each of the names to the car hero, and set the number of proper names correctly.

Next, when you create the trigger, have it run a create hero trigger that checks if the hero's proper names is = to the string variable, and if not, remove the hero and create a new one.
12-01-2004, 11:41 PM#9
-={tWiStÄr}=-
no, if you have Joe in the proper names and it is the only name, the first Joe created will have the name Joe, the second will be named Joe II
12-02-2004, 04:33 PM#10
Captain Griffen
Will it?

Ahhh well...

If each one could be used only once, you could create them all at start and then give the appropriate one.
12-03-2004, 04:48 PM#11
Tim.
Hmmm, yea but people can change thier ships mid game ect...the number of triggers would be quite anoying. Ill just give the class 'Starship' or 'Walker' ect, and change thier player name to C-3P0, Han Solo, ect...

Thanks anyways guys.