• 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.

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.
 
Level 18
Joined
Sep 27, 2005
Messages
2,069
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...
 
Level 6
Joined
Dec 9, 2008
Messages
233
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
 
Level 9
Joined
Apr 3, 2008
Messages
700
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.
 
Level 5
Joined
Aug 11, 2007
Messages
153
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
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
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.
 
Level 19
Joined
Nov 16, 2006
Messages
2,165
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.
Top