HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Player Hero Arrays?

07-17-2003, 09:26 PM#1
Bl4ck1E
Ok I have here a bit more or less noobish question, I would like to how to save specified Player heros(after they have choosen their unit) in an array variable and how can I use it later for example lock the camera to the specified unit for the player.

Thanks in advice.
07-17-2003, 10:15 PM#2
zotax
Pretty Easy
Make a unit array (the size of as many players in your map, ill refer to it as playerhero). Then you need a trigger that sets heroes when they are trained:

E Unit-A unit finishes training a unit
C Trained unit is a hero=true
A Set playerhero[(player number of(owner of trained unit)))] = Trained unit

This is the way to do it if the players choose their hero by training it (using an altar type thing). If your using a wisp 2 region type thing please specify so.
07-17-2003, 10:19 PM#3
Bl4ck1E
Quote:
Originally posted by zotax
Pretty Easy
Make a unit array (the size of as many players in your map, ill refer to it as playerhero). Then you need a trigger that sets heroes when they are trained:

E Unit-A unit finishes training a unit
C Trained unit is a hero=true
A Set playerhero[(player number of(owner of trained unit)))] = Trained unit

This is the way to do it if the players choose their hero by training it (using an altar type thing). If your using a wisp 2 region type thing please specify so.


Yes it's a whisp to region system but I think that already helps me..gonna try it

edit: OK I got it to work thx, but how can I use the array later then for example to lock the camera to the specified player hero?
07-17-2003, 11:02 PM#4
dataangel
Quote:
Originally posted by Bl4ck1E
Yes it's a whisp to region system but I think that already helps me..gonna try it

edit: OK I got it to work thx, but how can I use the array later then for example to lock the camera to the specified player hero?


Pick Every player in player group (All Players) and do actions: Lock camera view for picked player to playerheroes[player number of (picked player)].