• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Need Help with Survival start trigger(choose evil one and add ability)

Status
Not open for further replies.
Level 5
Joined
Aug 23, 2008
Messages
116
Hi!

I tried to make a trigger for the described problem, but it dont work.

The trigger should choose a random player.
Then a special unit of this player
This special unit should get a specific ability

I tried to work with variables, but now I stop trying, because its annoying :p

Maybe one of you know the perfect trigger that I need?

MfG

Cyrax
 
Level 5
Joined
Aug 23, 2008
Messages
116
Thx it works :)
But how can I hide the units owner so that the other players dont know that his owner is (e.g) their 'good friend blue'?
 
Level 5
Joined
Aug 23, 2008
Messages
116
hm no - I mean he should run around and kill people. They should see him , but dont recognize who is the owner of the unit.
 
Level 2
Joined
Jan 29, 2005
Messages
8
create a computer controlled player (e.g. player 12: the murderers) and give the control of the randomly chosen players unit to player 12, then set player 12 to share control of his units with player X. This might still be discovered, but its the best thing I can think of.
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
You mean that you do not want them to see the owner of the unit is suggest you to make an computer player which has no name use alt + 0160 to do that if it doesn't allow empty space and then use the folowing actions:
  • Player Group - Pick 1 random player from (all players) and do actions
    • Actions set Killer = picked player
    • Custom Script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit owned by Killer of type *yourspecialunit* and do:
      • Unit - Add *your* ability to picked unit
  • Player set name of "no name to something"
  • Player set name of Killer to " "
  • Player Make All Players treat Killer as an ally with shared vision
Or you could make the owner of *yourspecialunit* has the same name as some random player and make it periodic like this:
  • Every 30 second of game time
  • Action Player set name of Killer to Player name(1 Random player from all players matching matching player not equal Killer
 
Level 5
Joined
Aug 23, 2008
Messages
116
Yes , it works, but how can I prevent the message: you got control over the units of player x ?
 
Level 2
Joined
Aug 26, 2008
Messages
26
hmm, first off you shouldn't make them treat the killer as an ally with shared vision, they would see him transform. Just make it "ally"

i have a map of that sort, my trigger for picking a player to be killer is:
  • Events
    • Time - Elapsed game time is 5.00 seconds
  • Conditions
  • Actions
    • Set killer = (Random integer number between 1 and 10)
    • If (((Player(killer)) slot status) Equal to Is playing) then do (Trigger - Run create death <gen> (checking conditions)) else do (Trigger - Run (This trigger) (checking conditions))
you can change the "Integer between" to whatever you want, mine is 1-10 because there are 10 players. not including the computer, which is player 12 anyway.

Then I made an identical human with the same name, except he has the Killer Form ability. I did this because when I tried the Add Ability method, once you transform back to Human as Killer, you don't have the ability anymore. Unless there's a way to change this.

What I did though, was this:

  • create death
    • Events
    • Conditions
      • ((Player(killer)) slot status) Equal to Is playing
    • Actions
      • Unit - Remove (Random unit from (Units owned by (Player(killer)) of type (real Human)) from the game
      • Unit - Create 1 (fake human) for (Player(killer)) at (Random point in spawn humans <gen>) facing Default building facing degrees
      • Player - Make (Player(killer)) treat Player 12 (Brown) as an Ally with shared vision and full shared units
      • Player - Make Player 12 (Brown) treat (Player(killer)) as an Ally with shared vision and full shared units
      • Game - Display to (Player group((Player(killer)))) the text: You are the killer.
 
Status
Not open for further replies.
Top