• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Need help with a couple of things...

Status
Not open for further replies.
Level 4
Joined
Feb 23, 2008
Messages
102
Hello.

1. question about make waves of units. I would like help on making the trigger for making units come at waves of 10 units then 9 units then 8 units and so on of being a different kind of unit.

2. a: how do i get it so that when the game starts the players look at one area?
b:how do i make a hero selection kind of thing where a player double clicks the hero they want and then the hero is removed from the selection area and is teleported somewhere els?

3. I downloaded the yoda model and when i use him in the game, every time he attacks i see a corpse fall out right behind him, how do i fix it?

If you would like to see my map:
http://www.hiveworkshop.com/forums/pastebin.php?id=rf39v9
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
1) You need to set the unit types to variables at map init, then simply reduce a variable every wave and spawn X units, where X is the variable.

  • Trigger
    • Events
      • Map Initialization
    • Conditions
    • Actions
      • Set SpawnType[3] = Footman
      • Set SpawnType[2] = Knight
      • Set SpawnType[1] = Paladin
  • Trigger
    • Events
      • Every 10 seconds of gameplay
    • Conditions
      • SpawnAmount greater than 0
    • Actions
      • Set TempLoc = Center of (YourRegion)
      • Unit - Spawn SpawnAmount SpawnType[SpawnAmount] for Some Player at TempLoc
      • Custom script: call RemoveLocation(udg_TempLoc)
2)
a) Create a camera at the spot you want the player to look at, then use the trigger:

  • Events
    • Map Initialization
    • Conditions
    • Actions
      • Player Group - Pick every player in (All Players) and do
        • Loop actions
          • Camera - pan camera over YourCamera for (Picked player) over 0.00 seconds
b) Use a variable (with array) to count how many times a player selected a unit (also check if the selected unit matches the previously selected unit), if the amount = 2, then teleport the hero.

  • Trigger
    • Events
      • Selection event - a player selects a unit
    • Conditions
      • PlayerChose[Player number of (triggering player)] = false
      • Owner of (selected unit) = Player (to prevent stealing other people's heroes)
    • Actions
      • If then else - multiple conditions
        • If - Conditions
          • (Selected Unit) equal to SelectedUnit[Player number of (triggering player)]
        • Loop - actions
          • Set SelectedAmount[Player number of (triggering player)] = (SelectedAmount[Player number of (triggering player)] + 1
          • If then else - multiple actions
            • If - Conditions
              • SelectedAmount[Player number of (triggering player)] = 2
            • Loop - actions
              • Set PlayerChose[Player number of (triggering player)] = true
              • Set TempLoc = Center of StartingRegion
              • Unit - move SelectedUnit[Player number of (triggering player)] to TempLoc
              • Change owner of [Player number of (triggering player)] to (Triggering Player)
              • Custom script: call RemoveLocation(udg_TempLoc)
            • Else - actions
        • Else - actions
          • Set SelectedUnit[Player number of (triggering player)] = (Selected Unit)
          • Set SelectedAmount[Player number of (triggering player)] = 1
Okay, this is kind of hard without WE open, but I hope you understand it xD


3) Lol, I just checked the model and it seems to have bones attached to the attack animation, the only thing I could suggest is that you open up the model with some kind of model editor and remove those bones in the animation (it isn't trigger-related, more model-related afaik).
 
Level 13
Joined
Sep 14, 2008
Messages
1,407
1. The idea of apocalpyse is basicly right.
But I suggest using 2 arrays.

1. Unit-type Array with 1 unit type for every round
2. Integer Array saving the number of units being spawned each round

Then you go like:

Code:
Event: Every x seconds of gametime
Condition: ...
Actions: Spawn IntegerArray[RoundNumber] units of type UnitTypeArray[Roundnumber] at position.

That makes the whole thing easier in my opinion.


2.

i don't really like the way apocalypse is doing it :/

I suggest using a trigger like this:

Code:
Event: Player selects unit
Condition: 
PlayerChosen[Player Number of triggering player] = false (same as apoca)
Owner of selected unit = neutral passive (I suggest placing them as neutral passive)
Action:
If(PlayerChoseUnit[Player Number of triggering player] not equal Selected unit)
Then: 
Set PlayerChosenUnit[Player Number of triggering player] = selected unit
Else
Move unit, change ownership.

I don't like the counting thing Apocalypse :/ Nothing against you.


If you want me to do the selection thingi for you just send me the map :)

I can add some fancy grafic things:)
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
DarkAngelAzazel said:
But I suggest using 2 arrays.
So do I actually... (I just noticed how good the unit arrays and SpawnAmount matched eachother, so I fused them out of laziness :p)

DarkAngelAzazel said:
I don't like the counting thing Apocalypse :/ Nothing against you.
Not at all, I just replied to what he wanted ^^ ("where a player double clicks the hero"), but your method is indeed easier to implement.

DarkAngelAzazel said:
If you want me to do the selection thingi for you just send me the map :)

I can add some fancy grafic things:)
I completely agree with this xD
(If you like to do it at least :X).
 
Level 4
Joined
Feb 23, 2008
Messages
102
my map is in the pastbin link is in the first post =) thanks guys, so im guessing i should first put apocalypse first then edit it with darkangel?
 
Status
Not open for further replies.
Top