• 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] Its Possible?

Status
Not open for further replies.
Level 5
Joined
May 8, 2007
Messages
70
i have a question... cause today i played a game called island of frogs...
and that map have a rare tigger...
a build turn into a destructible "tree" and that have 10% tu turn into a tree...

and thats a tigger...

can a tigger have 10% chance to run?
or 20% 40% 50% 69% etc.?
 
Level 15
Joined
Jun 28, 2007
Messages
1,424
The randomness of a trigger running is somting i don't know how to do but there needs to be a variable like game time but to spawn the tree here's a trigger that suld work

  • To Form A tree
    • Events
      • Unit - A unit Finishes construction
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Some Unit
    • Actions
      • Destructible - Create a Some tree at (Position of (Triggering unit)) facing (Random angle) with scale 1.00 and variation 0
      • Unit - Remove (Triggering unit) from the game
 
Level 4
Joined
Jul 30, 2007
Messages
79
  • Actions
    • Set RandomInt = (Random integer number between 1 and 10)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • RandomInt Equal to 1
      • Then - Actions
        • Destructible - Create a Some tree at (Position of (Triggering unit)) facing (Random angle) with scale 1.00 and variation 0
        • Unit - Remove (Triggering unit) from the game
      • Else - Actions
        • Do Nothing
RandomInt would be an integer variable
i would make it an array with array number = player number to make sure there was no overlapping

but that is it
 
  • Actions
    • Set RandomInt = (Random integer number between 1 and 10)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • RandomInt Equal to 1
      • Then - Actions
        • Destructible - Create a Some tree at (Position of (Triggering unit)) facing (Random angle) with scale 1.00 and variation 0
        • Unit - Remove (Triggering unit) from the game
      • Else - Actions
        • Do Nothing
RandomInt would be an integer variable
i would make it an array with array number = player number to make sure there was no overlapping

but that is it


that sounds right
 
Level 5
Joined
May 8, 2007
Messages
70
  • Actions
    • Set RandomInt = (Random integer number between 1 and 10)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • RandomInt Equal to 1
      • Then - Actions
        • Destructible - Create a Some tree at (Position of (Triggering unit)) facing (Random angle) with scale 1.00 and variation 0
        • Unit - Remove (Triggering unit) from the game
      • Else - Actions
        • Do Nothing
RandomInt would be an integer variable
i would make it an array with array number = player number to make sure there was no overlapping

but that is it



oh hell yeah that works!
Thanks! :infl_thumbs_up:
 
Level 11
Joined
Aug 15, 2004
Messages
710
  • Actions
    • Set RandomInt = (Random integer number between 1 and 10)
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • RandomInt Equal to 1
      • Then - Actions
        • Destructible - Create a Some tree at (Position of (Triggering unit)) facing (Random angle) with scale 1.00 and variation 0
        • Unit - Remove (Triggering unit) from the game
      • Else - Actions
        • Do Nothing
RandomInt would be an integer variable
i would make it an array with array number = player number to make sure there was no overlapping

but that is it

You should probably save the position of Triggeringunit to a location variable, remove the unit first and then create the destructible. So then there's no problem with collision.
 
Level 12
Joined
Aug 20, 2007
Messages
866
Yeah

If you want the percent to get even more in depth, u can make it a random number from 1-100 or 1-1000 (If your going to use 1000, there should probably be another effect that you want to happen, besides turning into a tree)
 
Status
Not open for further replies.
Top