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

[Trigger] Need help with bet problems!!!

Status
Not open for further replies.
Level 4
Joined
Oct 28, 2007
Messages
72
Please i beg for help!!!Just this trigger stop me to finish map "Dog beting"
I copy and edit triggers from "Heroes Wars 1.5" i dont know integer and variables to use so i take it.
Can somebody do little easy trigger ,select and set system for run speed??
I want to pick random unit and set that unit speed to xxx.
  • Actions
    • Wait 1.00 seconds
    • For each (Integer A) from 1 to 10, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Unit Group - Add Heroes[(Player number of (Player((Integer A))))] to VictimUnitGroup) else do (Do nothing))
    • Set Victim_Boolean = True
    • Set Victim = (Random unit from (Units in race track <gen>))
    • Player Group - Pick every player in (All players) and do (Camera - Pan camera for (Picked player) to (Position of Victim) over 2.00 seconds)
    • Wait 0.50 seconds
    • Unit - Set Victim movement speed to 400.00
    • Game - Display to (All players) the text: ((Name of (Owner of Victim)) + got realy good chance to be The Winer!)
    • Set Victim_Boolean = False
    • Wait 1.00 seconds
    • Trigger - Run run2 <gen> (checking conditions)
Then when first unit gets speed then starts trigger 2 and pick another unit
without that first picked unit there is 5 unit on tracks my second trigger is same as first one but problem is that pick all unit + first picked unit and
there is 20% chance that unit will be picked and it will get "speed 2"
  • Conditions
    • ((Random unit from (Units in race track <gen>)) is A ground unit) Equal to True
  • Actions
    • For each (Integer A) from 1 to 10, do (If (((Player((Integer A))) slot status) Equal to Is playing) then do (Unit Group - Add Heroes[(Player number of (Player((Integer A))))] to victimunitgroup2) else do (Do nothing))
    • Unit Group - Remove Victim from victimunitgroup2
    • Set victim_boolean2 = True
    • Set victim2 = (Random unit from (Units in race track <gen>))
    • Wait 0.50 seconds
    • Unit - Set victim2 movement speed to 450.00
    • Game - Display to (All players) the text: ((Name of (Owner of victim2)) + its got speed like F1!!!========Maybe will be 1st!=======Holy Shit!)
    • Set victim_boolean2 = False
I try to fix that as you see in trigger 2 that first picked unit set to "fly" unit
so these 4 units are ground ..this didnt help ,too. Can anybody help?if you need more information just ask!
Sorry for my english!
 
Level 4
Joined
Jul 24, 2008
Messages
108
You seem to want to do something very very basic, but are doing it very complicatedly.
What is the point of victim_boolean1 and 2. Why do you have the For each integer loop? it doesnt seem to do anything in your trigger. So what i propose you do,
  • Set Victim = (Random unit from (Units in race track <gen>))
  • Unit - Set Victim movement speed to 400.00
  • Game - Display to (All players) the text: ((Name of (Owner of Victim)) + got realy good chance to be The Winer!)
This is what you already have, now if i understand right, you want it so that there is a 20% chance for the virst victim to get the speed increase, and the next trigger to run, only 4 would be eligable (25% each for the next group).


so do something like this (i dont have WE so i dont have it down exactly right)
  • Set victim2 = (Random unit from (Units in race track <gen>) maching (maching unit is not equal to victim))
    • Unit - Set victim2 movement speed to 450.00
    • Game - Display to (All players) the text: ((Name of (Owner of victim2)) + its got speed like F1!!!========Maybe will be 1st!=======Holy Shit!)
Try something out like that, again tho, i do not know what all the other stuff is there for. But keep it if its being used in other triggers
 
Status
Not open for further replies.
Top