• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Need Help Fast!!!

Status
Not open for further replies.
Level 5
Joined
Aug 11, 2007
Messages
153
Hi can any help me im making a map. I want so a player gets a random unit (Not Hero) in random place on the map and when it dies it makes a agian and agian please can you help me. And i want a Scoreboard that see how much you have killed and that player got 100 kills wins please help me.
 
Create a integer variable

trigerr 1
time elapsed = 1

Set integer = math random number between 1 and 5
if integer = 1 create paladin at random point in entire map
else
if integer = 2 create bloodmage at random point in entire map
esle if integer = 3 etc...

triger 2
unt dyes
dying unit = hero

Set integer = math random number between 1 and 5
if integer = 1 create paladin for owner of dying unit at random point in entire map
else
if integer = 2 create bloodmage at random point in entire map
esle if integer = 3 etc...
 
Multiboard
Map initialization - create multiboard for player 1,2 (depends if it's multilayer map)
Unit dies
dying unit equal to ( unit you'll randomize spawn)
set i= i+1
Show i

integer=100 or greater
Set victory for player
 
1. MB can't be created while map init.
2. You need array for integer variable i.
3. You can create MB by pick every player loop.
4.You don't need a variable for random number also. You can create a variable of type unittype for the units you wanna to give to player, then
  • Unit - create Unit[random number between * and *] for player.
 
Now i need only help with the winning Please help look when you have killed 100 units you win. Please help and Can you show it in triggers or more better explains
 
That's a tripple bump!
But for the heck of it.
You can learn how to create a multiboard here and for your 'random spawn' I'll give you an example but without LEAK removing.

First you'll need a trigger like this:
  • Spawn
    • Events
      • Time - Elapsed game time is 1.00 seconds
    • Conditions
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Random point in (Playable map area)) facing Default building facing degrees
It will spawn the first unit. You can destroy the trigger if you want after it.
Secondary trigger for if a unit dies:
  • DeadandRespawn
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Owner of (Dying unit)) controller) Equal to User
      • ((Owner of (Dying unit)) slot status) Equal to Is playing
    • Actions
      • Unit - Create 1 Footman for Player 1 (Red) at (Random point in (Playable map area)) facing Default building facing degrees
This just DEMONSTRATED how to do so, those triggers are simple as hell but also leak as hell. I assume you know how to work with variables and to create points.
 
No I didn't read your message, so that's why should trimple BUMP this one and CREATE a new post.
Example trigger:
  • n00b
    • Events
      • Unit - A unit Dies
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • KillsInteger Equal to 100
        • Then - Actions
          • Game - Victory Player 1 (Red) (Show dialogs, Show scores)
        • Else - Actions
          • Set KillsInteger = (KillsInteger + 1)
 
Status
Not open for further replies.
Back
Top