• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

select a unit button, what would be equivalent for orpg?

Status
Not open for further replies.
Level 1
Joined
Aug 7, 2009
Messages
5
For single player rpg it is very easy to set the hero in trigger by simply choosing [select a unit] button and selecting a unit for example blademaster001<gen>

What is the equivalent for that in orpgs or multiplayer rpg? Since I cannot select a hero like mentioned above as it hasn't even spawned in the beginning of the map or 2 people may choose the same hero.

I made a custom skill system that works wonderfully in single player but i have no idea how to get it work for a multiplayer version of the map due to having lack of knowledge.

Please enlighten, and guide me to the right way. Thank you
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
Create variables, of type unit. Name them something like P1Hero, P2Hero. Or you can create an array.

Then when a player selects his unit, just set the selected unit to the corresponding variable.

  • Actions
    • Unit - Create 1 Footman for Player 1 (Red) at (Center of (Playable map area)) facing Default building facing (270.0) degrees
    • Set Hero1 = (Last created unit)
If you're using an array, set HeroArray[1] = hero of player 1 for example.

Is this what you're asking?
 
Level 1
Joined
Aug 7, 2009
Messages
5
I am SO grateful for your help. You set me in the right direction. It worked like a charm. :thumbs_up:
I just got it to work and I immediately came back here to post to let you know that your advice really helped me. Thanks so much. It's exactly what I was looking for and its working perfectly.:cute:
Repped you and I feel a bit embarrassed that I have such little reps to give to you, you deserve way more.
 
Status
Not open for further replies.
Top